[llvm-dev] ThinLTO promotion is ending up with "invalid" IR before IR-Linking

Mehdi Amini via llvm-dev llvm-dev at lists.llvm.org
Thu Dec 22 20:55:43 PST 2016


Hey,

As I’m playing with Metadata lazy-loading, I added a verifier right before running the IRLinker in FunctionImport.cpp, and it does not pass (on current trunk) in a few cases. One that I looked at ended up with aliases pointing to available_externally functions for instance.

I’m hesitant about breaking the IR verifier like that before calling the IRLinker. The alternative I can see now would be:
- to perform any handling that requires breaking the verifier as part of the IRLinker process,
- or to perform the verifier-breaking changes that we do as a pre-process step to the IRLinker as a post-process step on the linked module.

Any thoughts on this? 

— 
Mehdi



More information about the llvm-dev mailing list