Displaying 1 result from an estimated 1 matches for "earlyasposs".
2018 Jun 12
2
ModulePass cannot be registered as EarlyAsPossible
Hello all,
I've followed the example in
https://github.com/CompilerTeaching/SimplePass/blob/master/SimplePass.cc in
order to create a custom pass.
The pass needs to be added before any transformation, so I used
EP_EarlyAsPossible extension point to register it. Furthermore, I need to
access to every GlobalVariable in the IR, so my pass has to be a
ModulePass, like this:
struct MyPass : public ModulePass {
static char ID;
MyPass(): ModulePass(ID) {}
virtual bool runOnModule(Module &M) {...}
......