[Bug target/39148] -Os increase code size when stack is aligned
--- Comment #7 from hjl dot tools at gmail dot com 2009-02-12 02:37 --- (In reply to comment #6) > So simply enable ACCUMULATE_OUTGOING_ARGS for stack realign isn't be the best > option for all cases either. > OK. I am closing as WONTFIX. -- hjl dot tools at gmail dot com changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||WONTFIX http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39148
[Bug target/39148] -Os increase code size when stack is aligned
--- Comment #6 from Joey dot ye at intel dot com 2009-02-12 02:33 --- (In reply to comment #5) > If ACCUMULATE_OUTGOING_ARGS is off, ECX will be used > for stack alignment and it may lead to code size > increase due to register spill since ia32 has very > few registers. The code increase resulted from stack realign are mainly from prologue increase. ECX is only used as hard register in prologue/epilogue and the impact to function body is low. If ACCUMULATE_OUTGOING_ARGS does increase code size, then for big functions, benefit of !ACCUMULATE_OUTGOING_ARGS will offset increase of prologue/epilogue. So simply enable ACCUMULATE_OUTGOING_ARGS for stack realign isn't be the best option for all cases either. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39148
[Bug target/39148] -Os increase code size when stack is aligned
--- Comment #5 from hjl dot tools at gmail dot com 2009-02-12 00:44 --- I tried -maccumulate-outgoing-args on 2.6 kernel: textdata bss dec hex filename 5136786 600084 1003520 6740390 66d9a6 vmlinux 5086759 600084 1003520 6690363 66163b /tmp/vmlinux.old It does increase binary size. Should we consider to turn on ACCUMULATE_OUTGOING_ARGS when stack is aligned? If ACCUMULATE_OUTGOING_ARGS is off, ECX will be used for stack alignment and it may lead to code size increase due to register spill since ia32 has very few registers. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39148
[Bug target/39148] -Os increase code size when stack is aligned
--- Comment #4 from hjl dot tools at gmail dot com 2009-02-11 17:16 --- (In reply to comment #3) > If you mean setting ACCUMULATE_OUTGOING_ARGS to true, I bet that could help Oops. Yes, I meant setting ACCUMULATE_OUTGOING_ARGS to true when stack alignment is needed. > very small functions that need dynamic realignment, but certainly for larger > functions !ACCUMULATE_OUTGOING_ARGS results in smaller code, even if > realignment is done. > Joey and Xuepeng are running http://www.inf.u-szeged.hu/csibe/ to see how ACCUMULATE_OUTGOING_ARGS affects code size. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39148
[Bug target/39148] -Os increase code size when stack is aligned
--- Comment #3 from jakub at gcc dot gnu dot org 2009-02-11 17:11 --- If you mean setting ACCUMULATE_OUTGOING_ARGS to true, I bet that could help very small functions that need dynamic realignment, but certainly for larger functions !ACCUMULATE_OUTGOING_ARGS results in smaller code, even if realignment is done. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39148
[Bug target/39148] -Os increase code size when stack is aligned
--- Comment #2 from hjl dot tools at gmail dot com 2009-02-11 15:54 --- One way to fix this is to set ACCUMULATE_OUTGOING_ARGS to false when we need stack alignment. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39148
[Bug target/39148] -Os increase code size when stack is aligned
--- Comment #1 from hjl dot tools at gmail dot com 2009-02-10 20:46 --- The problem is static rtx ix86_get_drap_rtx (void) { if (ix86_force_drap || !ACCUMULATE_OUTGOING_ARGS) crtl->need_drap = true; -Os turns off ACCUMULATE_OUTGOING_ARGS, which turns on DRAP. Does ACCUMULATE_OUTGOING_ARGS really increase code size? -- hjl dot tools at gmail dot com changed: What|Removed |Added CC||jh at suse dot cz, ubizjak ||at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39148
[Bug target/39148] -Os increase code size when stack is aligned
-- hjl dot tools at gmail dot com changed: What|Removed |Added Target Milestone|--- |4.4.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39148