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/39137] [4.4 Regression] -mpreferred-stack-boundary=2 causes lots of dynamic realign



------- Comment #15 from hubicka at gcc dot gnu dot org  2009-02-12 16:47 -------
The DFmode and DImodes are different. Aligning DFmode on stack is very
performance critical, while DImodes on 32bit machine can quite safely be
misaligned (if we ignore their possible use in MMX intrincisc).
I think we ought to be able to handle this case without any extra options: when
function use DFmode variables trigger stack realign at
-mpreferred-stack-boundary=2 and -O2, while do not trigger it with DImode. 

(I would bet that this behaviour would be SPECfp win for
-mpreferred-stack-boundary=2 -O2 compared tot he bahviour where we misalign
both by default. it would perhaps even be win for 32bit distro build compared
to current default of preferred-stack-boundary=3)

I will try to look deeper into this tomorrow, but I guess we will need new
target macro to declare this? (i.e. macro that would declare for DImode the
fact "we like to align this type to given boundary, but we don't want to work
too hard, in particular we don't want to trigger stack realignment"). This
could be achievable by ADJUST_ALIGNMENT trick if it wasn't breaking Ada
unfortunately.


-- 


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


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