PLC-lang / rusty

Structured Text Parser and LLVM Frontend
GNU Lesser General Public License v3.0
204 stars 52 forks source link

Our generated IR is often not valid for llc/lli/clang #529

Closed ghaith closed 1 year ago

ghaith commented 2 years ago

Describe the bug The generate IR will often fail if executed by llc, lli or clang, this doesn't always cause issues but sometimes the compiler just segfaults (on oscat for example). We can add a module.validate() right after generation to prevent that

The main issue with fixing this right now is that a lot of tests might already fail, but I think it's important to get a valid IR when generating.

Below is a list of issues detected by our tests when activating validate():

The following tests in correctness still need investigation, they are probably similar to the cases above:

99NIMI commented 1 year ago

the remaining tests are mentioned in #689