[cfe-dev] Reproducing Clang behavior using opt

Chandler Carruth chandlerc at google.com
Thu Apr 12 06:51:55 PDT 2012


Try '-mllvm -debug-pass=Arguments' -- it should help you understand what
passes Clang is running.

You should also look at 'opt -help-hidden'. There are a ton of debugging
and printing options, many of which can be passed through a Clang
compilation using '-mllvm'.

On Thu, Apr 12, 2012 at 2:26 PM, Alexander Potapenko <glider at google.com>wrote:

> 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
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120412/33f99e50/attachment.html>


More information about the cfe-dev mailing list