This patch will enable the shrink wrapping optimization for PPC64.
The changes in this patch are as follows:
- Modify the emitPrologue and emitEpilogue methods to work properly when the prologue and epilogue blocks are not the first/last blocks in the function
- Fix a bug in PPCEarlyReturn optimization caused by an empty entry block in the function
- 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.