[cfe-dev] Dataflow analysis with LLVM/Clang

João Paulo Rechi Vita joao.vita at gmail.com
Sat Oct 4 16:47:43 PDT 2008

On Fri, Oct 3, 2008 at 7:15 PM, Mike Stump <mrs at apple.com> wrote:
> On Oct 2, 2008, at 4:05 AM, João Paulo Rechi Vita wrote:
>> The final product has to be instrumented C source code, that can be
>> compiled with any C compiler.
> Hum...  This is so old skool...  but possible.

I understand that, but unfortunately I can't make all the decisions :-(

> Normally we'd try and talk you out of this, and just say, portability to any
> system on which clang runs should be sufficient.
> The next question is, do you want readable C code that matches the input, or
> what looks like assembly code output of an optimizing compiler translated
> into C?

Readable C

> If the former, you can use the clang rewriter.  If the later, you can use C
> back end of llvm and implement your code as an llvm pass.
>> The insertions has to be easily verifiable,
> Hum, strikes me as weird, but, if you want that, then I'd predict you want
> to go the way of the rewriter.  The output of the C backend for lang doesn't
> yet contain a proof of transformation that you can easily verify.  :-)

Ok, thanks a bunch for all the info. I really have a better idea of
how this should work right now.

João Paulo Rechi Vita
MSc Computer Science Student
Computer Engineer
IC / Unicamp

More information about the cfe-dev mailing list