[LLVMdev] The "scope" of passes

ether zhhb etherzhhb at gmail.com
Sat Apr 10 00:43:31 PDT 2010


hi all,

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
--ether
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100410/bfbffe61/attachment.html>


More information about the llvm-dev mailing list