This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug driver/19848] "options passed" from -verbose-asm do not adequately reflect optimization
- From: "Thomas dot Koenig at online dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Feb 2005 21:19:56 -0000
- Subject: [Bug driver/19848] "options passed" from -verbose-asm do not adequately reflect optimization
- References: <20050209124042.19848.Thomas.Koenig@online.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From Thomas dot Koenig at online dot de 2005-02-09 21:19 -------
Same thing on i686-pc-linux-gnu with the gcc driver:
$ cat main.c
int main()
{
return 0;
}
$ gcc -S -fverbose-asm -o main-o0.s main.c
$ gcc -S -fno-cprop-registers -fno-defer-pop -fno-guess-branch-probability
-fno-if-conversion -fno-if-conversion2 -fno-loop-optimize -fno-merge-constants
-fno-tree-ccp -fno-tree-ch -fno-tree-copyrename -fno-tree-dce
-fno-tree-dominator-opts -fno-tree-dse -fno-tree-fre -fno-tree-lrs -fno-tree-sra
-fno-tree-ter -fverbose-asm -O1 -o main-o1.s main.c
$ diff -u main-o0.s main-o1.s
--- main-o0.s 2005-02-09 22:17:54.000000000 +0100
+++ main-o1.s 2005-02-09 22:18:14.000000000 +0100
@@ -2,7 +2,12 @@
# GNU C version 4.0.0 20050208 (experimental) (i686-pc-linux-gnu)
# compiled by GNU C version 4.0.0 20050203 (experimental).
# GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
-# options passed: -mtune=pentiumpro -auxbase-strip -fverbose-asm
+# options passed: -mtune=pentiumpro -auxbase-strip -O1
+# -fno-cprop-registers -fno-defer-pop -fno-guess-branch-probability
+# -fno-if-conversion -fno-if-conversion2 -fno-loop-optimize
+# -fno-merge-constants -fno-tree-ccp -fno-tree-ch -fno-tree-copyrename
+# -fno-tree-dce -fno-tree-dominator-opts -fno-tree-dse -fno-tree-fre
+# -fno-tree-lrs -fno-tree-sra -fno-tree-ter -fverbose-asm
# options enabled: -falign-loops -fargument-alias -fbranch-count-reg
# -fcommon -feliminate-unused-debug-types -ffunction-cse -fgcse-lm -fident
# -fivopts -fkeep-static-consts -fleading-underscore -floop-optimize2
@@ -21,13 +26,8 @@
movl %esp, %ebp #,
subl $8, %esp #,
andl $-16, %esp #,
- movl $0, %eax #, tmp60
- addl $15, %eax #, tmp61
- addl $15, %eax #, tmp62
- shrl $4, %eax #, tmp63
- sall $4, %eax #, tmp64
- subl %eax, %esp # tmp64,
- movl $0, %eax #, D.1118
+ subl $16, %esp #,
+ movl $0, %eax #, <result>
leave
ret
.size main, .-main
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19848