[cfe-dev] Default stack alignment for x86 changed

palparni palparni at gmail.com
Thu Jan 15 08:23:33 PST 2015


Hi Everyone,

I have noticed that on certain machines there is a significant execution
speed degradation for a 32-bit application making intense use of double
precision floating-point. The application was compiled with no optimizations
with a customized build of Clang on Windows 7 64-bit.

I have tracked down the slowdown to a stack alignment problem. It looks like
certain machines/processors manifest different performance hits on unaligned
memory access. LLVM change 147888 a while back modified the alignment from 8
to 4 without giving more concrete reasons for it. Note that having many
computations with 'doubles' can be a rather common use-case. I was hoping
that someone could give more information on this.
http://llvm.org/viewvc/llvm-project?view=revision&revision=147888

I found that it is possible to override the default alignment from the
command line but the question is if you foresee any bad effects of this,
besides slightly increased stack usage?

Thanks in advance,
Alpar



--
View this message in context: http://clang-developers.42468.n3.nabble.com/Default-stack-alignment-for-x86-changed-tp4043481.html
Sent from the Clang Developers mailing list archive at Nabble.com.



More information about the cfe-dev mailing list