[PATCH] D43677: [PowerPC] Disable shrink-wrapping when PC address is acquired through the link register

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 23 07:23:48 PST 2018


nemanjai created this revision.
nemanjai added reviewers: hfinkel, kbarton, echristo.

When we need to acquire the address of the next instruction through the link register, this will always be added to the entry block. Of course, since we're clobbering the link register, we need to make sure we save it first. However, the fact that we need to do this is only apparent at PEI time (i.e. after shrink-wrapping).

This patch simply disables shrink-wrapping on functions that need to do this - there's no sense at looking at anything further in this function since we are positive that we won't be able to shrink-wrap the function.

This fixes PR33547.


Repository:
  rL LLVM

https://reviews.llvm.org/D43677

Files:
  lib/Target/PowerPC/PPCFrameLowering.cpp
  lib/Target/PowerPC/PPCISelDAGToDAG.cpp
  lib/Target/PowerPC/PPCMachineFunctionInfo.h
  test/CodeGen/PowerPC/pr33547.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43677.135636.patch
Type: text/x-patch
Size: 5370 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180223/64bbf7f9/attachment.bin>


More information about the llvm-commits mailing list