g++ optimization question

Diego Novillo dnovillo@google.com
Sat Sep 29 20:10:00 GMT 2007


On 9/29/07, Peng Yu <pengyu.ut@gmail.com> wrote:

> Are there any compiler options which generate more
> information and help me to read the assembly code and compare it with
> the source code?

You can request dumps of the intermediate forms and transformations
done during compilation.  See -fdump-rtl-xxx and -fdump-tree-xxx in
the GCC manual.

To get an annotated assembly output with source code try the following flags:

$ gcc -Wa,-ahlsdn -gstabs file.c



More information about the Gcc-help mailing list