I have been using LLVM and I was confused how to use a different already present pass from my own pass ? Precisely my program needs Dominance Frontier Calculation for any given instruction. LLVM already has the Dominance function Class that is implemented as a function pass. How can i invoke it/make use of it in my Module Pass ?
Share
WARNING: I have no real experience and answer may be incorrect or outdated. (it is based largely on outdated LLVM sources: version 1.3.)
Add an include:
If your pass if Function Pass, add to your class the method (if it is not implemented):
And put this into it:
Then, in your class
runOnFunctionmethod:After this you can use: