Hello everyone !<br><br>I am trying to get the dependencies for the variables of ICMP instructions. Do you know if I can use an already existing method?<br><br>I tried to use getDependency() method of class MemoryDependenceAnalysis. Does it work only for particular instruction types? Its definition is <br>
<br> MemDepResult MemoryDependenceAnalysis::getDependency ( Instruction * QueryInst ) <br>When I running my pass<br><br> if ( !(Inst->getOpcode() == Instruction::ICmp) )<br> continue;<br> ......<br> MemDepResult Res = MDA.getDependency(Inst);<br>
..... <br> if (!Res.isNonLocal()) { <br> Deps[Inst].insert(std::make_pair(getInstTypePair(Res),<br> static_cast<BasicBlock *>(0)));<br> } else //it does not enter here<br>
.....<br> .....<br> errs()<<*Inst;<br> errs() << DepTypeStr[type];<br> if (DepBB) {<br> errs() << DepBB; <br> }<br> if (DepInst) {<br> errs() << *DepInst;<br> .....<br>
It prints all the imcp instructions and UNKNOWN. So I think I cannot use <a href="http://llvm.org/docs/doxygen/html/MemoryDependenceAnalysis_8h_source.html#l00151">http://llvm.org/docs/doxygen/html/MemoryDependenceAnalysis_8h_source.html#l00151</a> for ICMP. Do you know if I can use this method or another one?<br>
<br>Thank you !<br><br> <br>