[LLVMdev] dynamic data dependence extraction using llvm

mobi phil mobi at mobiphil.com
Thu Dec 11 14:55:20 PST 2014

Veterans could tell you more, what I say may be wrong, it is just based on
my still enough poor understanding of clang and LLVM nonetheless poor
understanding of the paper.

What I mean with AST is that you can static-analyze your AST to find the
"to dynamically analyze" points and inject code (also in form of AST) in
form of "report now that there is a read from array (memory)" or "now there
is a save to memory". This would give though tons of false positives as the
compiler will optimize out lot of stuff, so I think it would be a false
positives. To understand this in details you should read how the clang
compiler works.

But I think nobody could give you a precise answer without reading the
paper in question you marked with [1] especially that you did not provide a
link to it.

tools/libraries like vallgrind, dynamorio, intel.pin are in my opinion more
specialized for what you probably want to do. Anyway I think mainly there
are two approaches. You either inject analysis code near the instructions
to be observed or you run your code through an interpreter (vallgrind or
llvm) and try to "catch" what you are interested in. With "AST" hacking you
could inject code I think more precisely than any of the other tools... but
all depends on what exactly you want to measure.

Think also about performance. Running such an analyzis through an
interpreter often is impossible (valgrind, llvm). Myself I had to do some
profiling with valgrind, but given that starting the server in real
situation took half an hour. Running it through valgrind (thus intepreter)
took one day (if it was not crashing) ;) which made it impossible to use at
the end...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141211/5088f644/attachment.html>

More information about the llvm-dev mailing list