This is an archive of the discontinued LLVM Phabricator instance.

[PPC64] Enable shrink wrapping for PPC64 LE.
ClosedPublic

Authored by kbarton on Nov 18 2015, 8:37 AM.

Details

Summary

Re-enable shrink wrapping for PPC64 Little Endian.

One minor modification to PPCFrameLowering::findScratchRegister was necessary to handle fall-thru blocks (blocks with no terminator) correctly.

Tested with all LLVM test, clang tests, and the self-hosting build, with no problems found.

Diff Detail

Event Timeline

kbarton updated this revision to Diff 40517.Nov 18 2015, 8:37 AM
kbarton retitled this revision from to [PPC64] Enable shrink wrapping for PPC64 LE..
kbarton updated this object.
kbarton added reviewers: hfinkel, nemanjai, seurer, qcolombet.
kbarton added a subscriber: llvm-commits.
qcolombet added inline comments.Nov 18 2015, 2:56 PM
lib/Target/PowerPC/PPCFrameLowering.cpp
581

Period.

585

You still need to check that “begin” is not the terminator, otherwise, you’ll get the available register after the terminator, not before.

kbarton added inline comments.Nov 19 2015, 7:17 AM
lib/Target/PowerPC/PPCFrameLowering.cpp
585

Maybe I misunderstand, but this check should cover that.
MBBI is initialized to MBB->getFirstTerminator() above, so the iterator will not move forward if begin is the terminator.

qcolombet added inline comments.Nov 19 2015, 9:15 AM
lib/Target/PowerPC/PPCFrameLowering.cpp
585

You’re right. Looks like I need vacations :).

hfinkel accepted this revision.Nov 23 2015, 4:36 PM
hfinkel edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Nov 23 2015, 4:36 PM
kbarton closed this revision.Nov 30 2015, 11:03 AM

Committed r254314