[PATCH] D17294: Fix for PR 26500
Kit Barton via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 18 09:30:09 PST 2016
kbarton added inline comments.
================
Comment at: lib/Target/PowerPC/PPCFrameLowering.cpp:570
@@ -566,3 +569,3 @@
*ScratchRegister = R0;
// If MBB is an entry or exit block, use R0 as the scratch register
----------------
Need to give ScratchRegisterCR a default value
================
Comment at: lib/Target/PowerPC/PPCFrameLowering.cpp:572
@@ -568,2 +571,3 @@
// If MBB is an entry or exit block, use R0 as the scratch register
+ // and don't change the CR spill register.
if ((UseAtEnd && MBB->isReturnBlock()) ||
----------------
No, you shouldn't do this this. You should define what you want the ScratchRegisterCR to be here, don't assume it is defined elsewhere.
================
Comment at: lib/Target/PowerPC/PPCFrameLowering.cpp:647
@@ -616,1 +646,3 @@
+ return findScratchRegister(TmpMBB, true, nullptr, nullptr,
+ /*Needs2ScratchRegs*/ false);
}
----------------
Remove /*Needs2ScratchRegs*/ in comments
================
Comment at: lib/Target/PowerPC/PPCFrameLowering.h:51
@@ -50,3 +50,3 @@
* was not found and R0 is being used as the default.
*/
bool findScratchRegister(MachineBasicBlock *MBB,
----------------
Please updated the doxygen comments for this function.
Repository:
rL LLVM
http://reviews.llvm.org/D17294
More information about the llvm-commits
mailing list