[PATCH] D11817: Enable Shrink Wrapping for PPC64.

Kit Barton via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 6 14:00:38 PDT 2015


kbarton created this revision.
kbarton added reviewers: hfinkel, wschmidt, nemanjai, seurer.
kbarton added subscribers: llvm-commits, qcolombet.
Herald added a subscriber: aemerson.

This patch will enable the shrink wrapping optimization for PPC64.

The changes in this patch are as follows:
  1. Modify the emitPrologue and emitEpilogue methods to work properly when the prologue and epilogue blocks are not the first/last blocks in the function
  2. Fix a bug in PPCEarlyReturn optimization caused by an empty entry block in the function
  3. Override the runShrinkWrap PredicateFtor (defined in TargetMachine) to check whether shrink wrapping should run:
      - Shrink wrapping will run on PPC64 (Little Endian and Big Endian) unless -enable-shrink-wrap=false is specified on command line
 
A new test case, ppc-shrink-wrapping.ll was created based on the existing shrink wrapping tests for x86, arm, and arm64. 

http://reviews.llvm.org/D11817

Files:
  lib/CodeGen/ShrinkWrap.cpp
  lib/Target/PowerPC/PPCEarlyReturn.cpp
  lib/Target/PowerPC/PPCFrameLowering.cpp
  lib/Target/PowerPC/PPCTargetMachine.cpp
  test/CodeGen/PowerPC/ppc-shrink-wrapping.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11817.31471.patch
Type: text/x-patch
Size: 27340 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150806/aa2a12a4/attachment.bin>


More information about the llvm-commits mailing list