Enable the shrink wrapping optimization for PPC64.

Description

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.

Phabricator review: http://reviews.llvm.org/D11817

Details

Committed
kbartonSep 9 2015, 6:55 PM
Parents
rL247236: [AArch64] Match FI+offset in STNP addressing mode.
Branches
Unknown
Tags
Unknown