This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
How do optimization flags work on hp
- From: Stéphane Graziani <graziani at isoft dot fr>
- To: <gcc at gcc dot gnu dot org>
- Cc: "developpeurs" <developpeurs at domaineisoft dot isoft dot fr>
- Date: Mon, 19 Apr 2004 13:29:32 +0200
- Subject: How do optimization flags work on hp
Hello,
I have several problems on hp-ux with gcc3.3.3 concerning optimizations:
1) compiling with -O1 will generate strange assemble errors :
/var/tmp//ccf73H41.s: Assembler messages:
/var/tmp//ccf73H41.s:3137: Error: Field out of range [-262144..262143] (295096).
/var/tmp//ccf73H41.s:3140: Error: Field out of range [-262144..262143] (285756).
/var/tmp//ccf73H41.s:3143: Error: Field out of range [-262144..262143] (299004).
/var/tmp//ccf73H41.s:3146: Error: Field out of range [-262144..262143] (303064).
/var/tmp//ccf73H41.s:3149: Error: Field out of range [-262144..262143] (313484).
/var/tmp//ccf73H41.s:3152: Error: Field out of range [-262144..262143] (317056).
/var/tmp//ccf73H41.s:3155: Error: Field out of range [-262144..262143] (319812).
/var/tmp//ccf73H41.s:3158: Error: Field out of range [-262144..262143] (328184).
/var/tmp//ccf73H41.s:3161: Error: Field out of range [-262144..262143] (339616).
/var/tmp//ccf73H41.s:3164: Error: Field out of range [-262144..262143] (351304).
/var/tmp//ccf73H41.s:3167: Error: Field out of range [-262144..262143] (343100).
/var/tmp//ccf73H41.s:3170: Error: Field out of range [-262144..262143] (282744).
/var/tmp//ccf73H41.s:3173: Error: Field out of range [-262144..262143] (353264).
/var/tmp//ccf73H41.s:3176: Error: Field out of range [-262144..262143] (348516).
/var/tmp//ccf73H41.s:3179: Error: Field out of range [-262144..262143] (356100).
/var/tmp//ccf73H41.s:3182: Error: Field out of range [-262144..262143] (383524).
/var/tmp//ccf73H41.s:3185: Error: Field out of range [-262144..262143] (276496).
/var/tmp//ccf73H41.s:3188: Error: Field out of range [-262144..262143] (270148).
/var/tmp//ccf73H41.s:3191: Error: Field out of range [-262144..262143] (266984).
/var/tmp//ccf73H41.s:3227: Error: Field out of range [-262144..262143] (383068).
/var/tmp//ccf73H41.s:3230: Error: Field out of range [-262144..262143] (383060).
/var/tmp//ccf73H41.s:3245: Error: Field out of range [-262144..262143] (383020).
/var/tmp//ccf73H41.s:3248: Error: Field out of range [-262144..262143] (383012).
/var/tmp//ccf73H41.s:3251: Error: Field out of range [-262144..262143] (383004).
/var/tmp//ccf73H41.s:3254: Error: Field out of range [-262144..262143] (382996).
/var/tmp//ccf73H41.s:3266: Error: Field out of range [-262144..262143] (382964).
/var/tmp//ccf73H41.s:3269: Error: Field out of range [-262144..262143] (382956).
/var/tmp//ccf73H41.s:3275: Error: Field out of range [-262144..262143] (358724).
/var/tmp//ccf73H41.s:3305: Error: Field out of range [-262144..262143] (382860).
/var/tmp//ccf73H41.s:3323: Error: Field out of range [-262144..262143] (327744).
/var/tmp//ccf73H41.s:3341: Error: Field out of range [-262144..262143] (382764).
/var/tmp//ccf73H41.s:3344: Error: Field out of range [-262144..262143] (382756).
/var/tmp//ccf73H41.s:3347: Error: Field out of range [-262144..262143] (382748).
/var/tmp//ccf73H41.s:3350: Error: Field out of range [-262144..262143] (382740).
/var/tmp//ccf73H41.s:3368: Error: Field out of range [-262144..262143] (382692).
/var/tmp//ccf73H41.s:3371: Error: Field out of range [-262144..262143] (382684).
/var/tmp//ccf73H41.s:3374: Error: Field out of range [-262144..262143] (363344).
/var/tmp//ccf73H41.s:3377: Error: Field out of range [-262144..262143] (367588).
2)Having problems of differences between the execution of my application compiled with -O0 and with -O2, I tried to locate the option responsible for this difference. So, I tried to compile with all options corresponding to -O2 : -fdefer-pop -finline-limit=1000 -fmerge-constants -fthread-jumps -floop-optimize -fcrossjumping -fif-conversion -fif-conversion2 -fdelayed-branch -fguess-branch-probability -fcprop-registers -fforce-mem -foptimize-sibling-calls -fstrength-reduce -fcse-follow-jumps -fcse-skip-blocks -frerun-cse-after-loop -frerun-loop-opt -fgcse -fgcse-lm -fgcse-sm -fdelete-null-pointer-checks -fexpensive-optimizations -fregmove -fschedule-insns -fschedule-insns2 -fsched-interblock -fsched-spec -fcaller-saves -fpeephole2 -freorder-blocks -freorder-functions -fstrict-aliasing -falign-functions -falign-jumps -falign-loops -falign-labels
... but I did not get the same result (file size is different) as with -O2... and the execution is slow and gives the same result as with -O0...
Even on solaris, I get a difference in size when compiling with -O2 and with the list of its sub-options...
Could somebody explain this to me? And how to find the option responsible for the observed differences in execution?
Thank-you in advance,
Stéphane