[cfe-dev] Reproducing Clang behavior using opt

Alexander Potapenko glider at google.com
Thu Apr 12 06:26:57 PDT 2012


Hi all,

We've a problem in AddressSanitizer
(http://code.google.com/p/address-sanitizer/issues/detail?id=61) that
is probably related to the order in which Clang executes the
optimization passes.
Namely, the ASan pass jumps in too early and prevents a bunch of
memory accesses from being moved to the registers.

I wonder if it's possible to reconstruct Clang's compilation pipeline
using opt, i.e. dump the bitcode, obtain the list of passes being ran
and run them one by one on the target file.
This will perhaps help to pinpoint the problem, because otherwise I'll
need to try Clang extension points, which may take some time (and may
be insufficient).

-- 
Alexander Potapenko
Software Engineer
Google Moscow



More information about the cfe-dev mailing list