[LLVMdev] Related to LLVM MemoryDependenceAnalysis

Md Shamsuddin shamsuddinshams044 at gmail.com
Wed Feb 18 22:29:32 PST 2015


I am getting error after executing these lines

MemoryDependenceAnalysis mda;

MemDepResult mdr = mda.getDependency(inst);

if (mdr.isDef())
{
Instruction *dep = mdr.getInst ();
if (isa <LoadInst>(inst))
{
if (isa <StoreInst>(dep))
{
outs()<<"READ AFTER WRITE";

}
}
if (isa <StoreInst>(inst))
{
if (isa <LoadInst>(dep))
{
outs()<<"WRITE AFTER READ";

}
if (isa <StoreInst>(dep))
{


outs()<<"WRITE AFTER WRITE";

}
}
}

---ERROR---

0  opt 0x090a9dbb llvm::sys::PrintStackTrace(_IO_FILE*) + 43
Stack dump:
0.    Program arguments: opt -load ../../../Release+Asserts/lib/shams.so
-shams
1.    Running pass 'Function Pass Manager' on module '<stdin>'.
2.    Running pass 'Function Argument Count Pass' on function '@swap'
Segmentation fault (core dumped)

Please help.
Thanks
-- 
With Regards
Md.Shamsuddin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150219/97b25d75/attachment.html>


More information about the llvm-dev mailing list