<div dir="ltr">Hey all,<br><br>We have been working on a pass that uses another pass to count loads and stores prior to performing its own instrumentation.  The second pass adds the first as required via the usual getAnalysisUsage function.  On one machine, it has been tested and proven to function correctly.  On another machine, whenever the second pass is run, it consistently fails the assertion:<br>
<br>opt: /home/tmason/llvm/llvm/include/llvm/PassAnalysisSupport.h:193: AnalysisType& llvm::Pass::getAnalysisID(const llvm::PassInfo*) const [with AnalysisType = <unnamed>::LdStCallCounter]: Assertion `ResultPass && "getAnalysis*() called on an analysis that was not " "'required' by pass!"' failed.<br>
<br>We have modified opt.cpp with the following lines:<br>  addPass(PM, createLdStCallCounter());         // tmason<br>  addPass(PM, createLAMPProfilerPass());         // tmason<br><br>We have modified Instrumentation.h with the following lines:<br>
ModulePass* createLdStCallCounter();<br>BasicBlockPass *createLAMPProfilerPass();<br><br>The .cpp file generating the error is attached.<br><br>Both machines run Ubuntu 8.0.4 with gcc <a href="http://4.2.3.">4.2.3.</a>  Does anyone know what could be causing this error to occur on one machine but not another?<br>
<br><br>Thanks,<br>Thomas<br></div>