[PATCH] D81460: [PowerPC] Implement probing for prologue

Kai Luo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 29 04:49:49 PDT 2020


lkail marked 7 inline comments as done.
lkail added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCFrameLowering.cpp:678
+// allocation in prologue MBB.
+bool PPCFrameLowering::findCRRegister(MachineBasicBlock *MBB,
+                                      Register *CRReg) const {
----------------
jsji wrote:
> We are in prologue,  there shouldn't be any use of cr before this, why can't we simply always use `CR0` here?
Might be unavailable for complex case due to shrinkwrap. Now changed to CTR loop, looks not a concern any more.


================
Comment at: llvm/lib/Target/PowerPC/PPCFrameLowering.cpp:1448
+    bool FoundCRReg = findCRRegister(&PrologMBB, &CRReg);
+    assert(FoundCRReg && "Can't find available cr register");
+    (void)FoundCRReg;
----------------
jsji wrote:
> What if we can't find CR and we don't build with assert on?
Changed to CTR loop.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81460/new/

https://reviews.llvm.org/D81460





More information about the llvm-commits mailing list