[PATCH] D10909: PrologEpilogInserter: Improve API to determine callee save regsiters.
hfinkel at anl.gov
hfinkel at anl.gov
Mon Jul 13 20:59:45 PDT 2015
hfinkel added a subscriber: hfinkel.
hfinkel accepted this revision.
hfinkel added a reviewer: hfinkel.
hfinkel added a comment.
This revision is now accepted and ready to land.
LGTM.
================
Comment at: lib/Target/AArch64/AArch64FrameLowering.cpp:356
@@ -355,4 +355,3 @@
// Use the first callee-saved register as a scratch register
- assert(MF.getRegInfo().isPhysRegUsed(AArch64::X9) &&
- "No scratch register to align SP!");
+ assert(!MFI->getPristineRegs(MF).test(AArch64::X9));
scratchSPReg = AArch64::X9;
----------------
Please don't remove the descriptive string from the assert.
================
Comment at: lib/Target/ARM/ARMFrameLowering.cpp:803
@@ -802,4 +802,3 @@
// Use the first callee-saved register as a scratch register.
- assert(MF.getRegInfo().isPhysRegUsed(ARM::R4) &&
- "No scratch register to restore SP from FP!");
+ assert(!MFI->getPristineRegs(MF).test(ARM::R4));
emitT2RegPlusImmediate(MBB, MBBI, dl, ARM::R4, FramePtr, -NumBytes,
----------------
Same here.
Repository:
rL LLVM
http://reviews.llvm.org/D10909
More information about the llvm-commits
mailing list