[llvm-dev] Instrumenting IR being transformed for debugging

Vaivaswatha Nagaraj via llvm-dev llvm-dev at lists.llvm.org
Tue Sep 15 06:34:57 PDT 2015


Hi,

Is there a simple way to insert printf calls into the IR to print an LLVM
Value at run time?
I am looking for something like TraceValues
<https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_15/lib/Transforms/Instrumentation/TraceValues.cpp>
that has long been deprecated.

Such a utility would be useful when writing/debugging transformation
passes. To see if a Value contains the *value* we expect it to at run time,
we could add a call to printf, that prints the value.
Would writing such a utility be useful to the community?

Thanks,

  - Vaivaswatha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150915/395a7ec5/attachment.html>


More information about the llvm-dev mailing list