search for: functionpassmanagermodulepass

Displaying 2 results from an estimated 2 matches for "functionpassmanagermodulepass".

2007 Jun 21
2
[LLVMdev] PassManager vs FunctionPassManager
...File requires a FunctionPassManager. If I'm working with code that uses a plain PassManager and want it to generate code, are there any options better than doing this: /** * Wrapper class to run a FunctionPassManager as a ModulePass so that it * can be added to a plain PassManager. */ class FunctionPassManagerModulePass : public ModulePass { FunctionPassManager &Passes; public: static char ID; // Pass ID, replacement for typeid explicit FunctionPassManagerModulePass(FunctionPassManager &FPM) : ModulePass((intptr_t)&ID), Passes(FPM) {} bool runOnModule(Module &M) { bool Change...
2007 Jun 21
0
[LLVMdev] PassManager vs FunctionPassManager
...r itself is a module level pass. FunctionPassManager is external stand alone interface hence it does not derive from ModulePass. - Devang > /** > * Wrapper class to run a FunctionPassManager as a ModulePass so that > it > * can be added to a plain PassManager. > */ > class FunctionPassManagerModulePass : public ModulePass { > FunctionPassManager &Passes; > public: > static char ID; // Pass ID, replacement for typeid > explicit FunctionPassManagerModulePass(FunctionPassManager &FPM) : > ModulePass((intptr_t)&ID), > Passes(FPM) > {} > > bool runOnMo...