[llvm-commits] Intel Atom optimization - use LEA to adjust stack pointer

Zhang, Andy andy.zhang at intel.com
Wed Dec 21 14:28:29 PST 2011


Hi all,

Please find attached a patch that implements an optimization for the Intel Atom processor. We can avoid an ALU to AGU dependency by using the LEA instruction to update the stack pointer so as to prevent a stall, as recommended by the Intel Optimization Reference Manual (coding rule 5, specifically).

Commit message:	

Use LEA instruction to adjust stack pointer when generating code for Atom to
avoid an ALU to AGU dependency (and subsequent stall).
- Modified stack pointer adjustment in X86FrameLowering to emit LEA
  instructions instead of SUB/ADD when Atom is specified or detected.
- Created lit tests for allocating on the stack (array and scalars), and
  calling a function with many arguments.
- Modified TableGen to use 'const uint64_t' instead of an anonymous enum
  when there are more than 32 subtarget features. When compiling with
  Visual C++, enums are always 'int's, so "1 << 32" overflows.

I'd like to commit this to LLVM trunk; your feedback would be most appreciated.

Thanks,
Andy


-------------- next part --------------
A non-text attachment was scrubbed...
Name: lea_sp.diff
Type: application/octet-stream
Size: 11139 bytes
Desc: lea_sp.diff
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111221/215e9e21/attachment.obj>


More information about the llvm-commits mailing list