willi19 / swpp202301-compiler-team6

MIT License
0 stars 0 forks source link

Some fatal errors regarding Loop2SumPass #32

Open germanium32 opened 1 year ago

germanium32 commented 1 year ago

After the custom optimizations, the output LLVM IR seems nothing wrong in the verbose output. However, some errors occur after the backend pass/register allocation steps.

  1. Segmentation Fault occurs after Backend Pass is done. The program shows correct outputs after After backend passes steps, but it fails after this. It doesn't show other messages, so I have no idea where it fails.
  2. Unresolved Symbol Error occurs after Register Allocation. The program shows correct outputs after After register allocation steps, but it fails after this. Error message is as: Exception thrown from backend. Unresolved symbol error: [Value* Name] does not exist in the symbol map.

Any ideas about such error? I think the latter is occurring because of incomplete additions of instructions, such as not linking values by its names etc. However, there is no clue about the first one.

willi19 commented 1 year ago

Can you show me the c code or llvm code?

willi19 commented 1 year ago

I think the value you use in instruction is not existing. Maybe you change the name of variable after unrolling the loop but haven't changed it's uses after the loop.