[PATCH] D19688: Fixes PR27241 by enabling the X86 call frame optimization for 64-bit targets

David Kreitzer via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 28 14:09:08 PDT 2016


DavidKreitzer created this revision.
DavidKreitzer added reviewers: rnk, mkuper, delena, hans.
DavidKreitzer added a subscriber: llvm-commits.

The source changes are fairly straightforward. The most interesting change is the new code at lines 489-499 that promotes a 32-bit value to 64 bits. I'd appreciate a careful review to make sure I am doing that correctly.

I would also appreciate any suggestions for improving the unit test. I modeled the test after the existing movtopush.ll that was written for 32-bit targets. I am testing all the same things, though naturally the details are different due to differences between the calling conventions.

Not surprisingly, the code size improvements are small compared to IA-32 due the in-register 64-bit calling convention. I measured 0.2% improvement across cpu2k. Performance is basically flat. There are further improvement opportunities, e.g. adding support for scheduling the pushes and relaxing the early bail-out at line 351.

http://reviews.llvm.org/D19688

Files:
  lib/Target/X86/X86CallFrameOptimization.cpp
  lib/Target/X86/X86InstrInfo.cpp
  test/CodeGen/X86/movtopush64.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19688.55466.patch
Type: text/x-patch
Size: 13944 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160428/3b8eb517/attachment.bin>


More information about the llvm-commits mailing list