This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/54063] [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54063

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amodra at gmail dot com

--- Comment #2 from Alan Modra <amodra at gmail dot com> 2012-07-23 02:13:53 UTC ---
Gultiy as charged.  Not splitting the address early loses some opportunities
for common subexpression eliminiation.

However, splitting the address early
a) is inconsistent with the treatment of other powerpc addresses
b) can result in incorrect code and/or require hacks (that pessimise
scheduling) to prevent incorrect code in other cases, eg. indirect function
call sequence.
c) can result in silly uses of call-saved regs for the high part of an address
calculation around a call or outside of a loop, when it would be far better to
just recalculate an address thus freeing the reg for better uses.
d) can allow the high/low parts to move in ways that result in the linker
disabling optimisation of these sequences for the entire object file (or
generating bad code if you have an old linker).  eg. another kernel case where
the low part moved to a different (hot/cold) section.

Overall, I think we get better code by *not* splitting early, particularly for
larger functions that run into (c).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]