[LLVMdev] llvm getDependency() for ICMP instructions is UNKNOWN
Alexandru Ionut Diaconescu
alexandruionutdiaconescu at gmail.com
Fri Jan 18 03:12:27 PST 2013
Hello everyone !
I am trying to get the dependencies for the variables of ICMP instructions.
Do you know if I can use an already existing method?
I tried to use getDependency() method of class MemoryDependenceAnalysis.
Does it work only for particular instruction types? Its definition is
MemDepResult MemoryDependenceAnalysis::getDependency ( Instruction *
QueryInst )
When I running my pass
if ( !(Inst->getOpcode() == Instruction::ICmp) )
continue;
......
MemDepResult Res = MDA.getDependency(Inst);
.....
if (!Res.isNonLocal()) {
Deps[Inst].insert(std::make_pair(getInstTypePair(Res),
static_cast<BasicBlock *>(0)));
} else //it does not enter here
.....
.....
errs()<<*Inst;
errs() << DepTypeStr[type];
if (DepBB) {
errs() << DepBB;
}
if (DepInst) {
errs() << *DepInst;
.....
It prints all the imcp instructions and UNKNOWN. So I think I cannot use
http://llvm.org/docs/doxygen/html/MemoryDependenceAnalysis_8h_source.html#l00151for
ICMP. Do you know if I can use this method or another one?
Thank you !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130118/d54829fe/attachment.html>
More information about the llvm-dev
mailing list