[LLVMdev] The "scope" of passes
etherzhhb at gmail.com
Sat Apr 10 00:43:31 PDT 2010
i have some thing not so sure about "scope" of llvm passes:
suppose i have a function pass PassF and a BasicBlock analysis pass PassB.
if i want to use the analysis result of PassB for a BasicBlock in PassF, i
think i can create PassB in runOnFunction of PassF, and call runOnBasicBlock
manually to get the result:
PassB pb; //create a PassB
//we also need consider the analysis usage of PassB
pb.runOnBasicBlock(bb); // run PassB on bb manually
.... use the result of pb ......
is there any other better way?
thanks very much
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev