arcana-lab / noelle

NOELLE Offers Empowering LLVM Extensions
MIT License
75 stars 36 forks source link

Fixed remaining compilation errors for v18 branch #155

Closed tommymcm closed 3 months ago

tommymcm commented 3 months ago

Fixed compilation errors dealing with the following changes in LLVM 18.1.6

src/core/pdg_generator used llvm::ModRefInfo::Must{,Mod,Ref,ModRef} , which are deprecated in 18.1.6. Removed all case branches that reference them, as far as I can tell, this result is always treated the same as the May variant so I don't expect any actual impact.

src/core/loop_whilifier made direct use of the instruction list in llvm::BasicBlock. A note in LLVM source code says to use llvm::BasicBlock::{erase,insert,splice} instead, which is what I did.

src/core/loop_whilifier and src/core/loop_transformer use llvm::OptimizationRemarkEmitter, which was moved into its own header file. I have added the include.

src/core/loop_unroll had a type error caused by llvm::LoopUnrollResults. I think this was caused by an interaction between auto and enum class. Qualifying the declaration with its type fixed the error.

Updated tests/unit and examples/passes to use LLVM 18.1.6 in CMakeLists.txt.

With these changes, top-level make runs without errors.

tommymcm commented 3 months ago

Two recent commits fix a bug for NoellePass registration. There can be only one implementation of llvmGetPassPluginInfo per plugin so it was removed from LoopMetadataPass and added to NoellePass.

I have tested this update with MEMOIR and it works with these two changes.