<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi,</div><div><br></div><div>I found an existing pass "CalledValuePropagation" that can solve the problem I raised a few days ago regarding the "callees" metadata (<a href="https://groups.google.com/forum/#!topic/llvm-dev/yjtZVMH_aC4">https://groups.google.com/forum/#!topic/llvm-dev/yjtZVMH_aC4</a>). Now I have difficulty in calling this pass in my own pass.</div><div><br></div><div>In my own pass, I called <br></div><div>"getAnalysis<CalledValuePropagationPass>()"</div><div><br></div><div>and in the  "getAnalysisUsage(AnalysisUsage &AU)" function, I called</div><div>"AU.addRequired<CalledValuePropagationPass>();"</div><div><br></div><div>I got compilation errors:</div><div>----------------------------------------------------------</div><div>.....<br></div><div>include/llvm/PassAnalysisSupport.h:223:38: error: ‘ID’ is not a member of ‘llvm::CalledValuePropagationPass’<br>   return getAnalysisID<AnalysisType>(&AnalysisType::ID);\</div><div>.....<br></div><div>install/include/llvm/PassAnalysisSupport.h:67:39: error: ‘ID’ is not a member of ‘llvm::CalledValuePropagationPass’<br>     return addRequiredID(PassClass::ID);<br></div><div>......<br></div><div>-----------------------------------------------------------</div><div><br></div><div>Looking at the source code of "CalledValuePropagationPass" (<a href="http://llvm.org/doxygen/CalledValuePropagation_8h_source.html">http://llvm.org/doxygen/CalledValuePropagation_8h_source.html</a>), I found that the class "CalledValuePropagationPass" does not have a public member "ID" as the passes in the "Transforms/Utils" directory. All the passes in the "IPO" directory only have a "run()" function that inherits from the "llvm/IR/PassManager.h". I am not quite sure how to invoke these passes in my own pass. I used "UnifyFunctionExitNodes" in my pass and this one worked fine. <br></div><div><br></div><div>It will be a great help if anyone can point out how to call the "CalledValuePropagationPass" in my own pass.</div><div><br></div><div>Thanks,</div><div><br></div><div>Zi<br></div></div></div></div></div></div></div></div></div></div></div></div>