On Tue, May 10, 2011 at 1:43 PM, fanqifei <fanqi...@gmail.com> wrote: > On Tue, May 10, 2011 at 6:23 PM, Richard Guenther > <richard.guent...@gmail.com> wrote: >> On Tue, May 10, 2011 at 12:08 PM, fanqifei <fanqi...@gmail.com> wrote: >>> Hi all, >>> >>> I am poring gcc 4.3.2 for a micro-controller and use it to compile C >>> source code. >>> I found that gcc is very sensitive to small changes in C source code >>> even if the change doesn't affect any function of the source code. >>> For example, a source file foo.c includes a header file foo.h. >>> If one macro definition is added to foo.h and the macro is not used in >>> foo.c. The assembly file foo.s is still changed and a few instructions >>> swapped positions . >>> I checked foo.c.129t.final_cleanup and found difference in it. >>> >>> I am wondering what caused the change in foo.o. Is there any >>> randomization in gcc? >>> How can I make the assembly file foo.s same no matter foo.h is changed or >>> not? >> >> alias analysis behavior depends on DECL_UIDs for partitioning which >> unfortunately shows this behavior in older releases (fixed as of GCC 4.5 >> at least). >> >> Richard. > Which file or fucntion should I look into? Maybe I can work around in 4.3.2
Look into tree-ssa-alias.c and tree-ssa-structalias.c > What change in 4.5 fixed it? A complete rewrite of the above ... Richard. > Thanks. > -Qifei Fan >