[PATCH] D61754: [PowerPC] Custom lower known CR bit spills

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 10 13:25:14 PDT 2019


hfinkel added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:725
+  MachineBasicBlock::reverse_iterator Ins;
+  for (Ins=MI; Ins!=MBB.rend(); Ins++) {
+    if (Ins->modifiesRegister(SrcReg, TRI))
----------------
lei wrote:
> hfinkel wrote:
> > I think that this makes sense, but I'm a bit concerned that, without a cutoff, this makes the spilling process quadratic. Can you please add a cl::opt search cutoff for this?
> How about `--ppc-max-crbit-spill-dist` with an initial value of 20?
Sounds good. Make the initial value a bit larger, however. It's easy to have blocks with more than 20 instructions. I'd start with 100. Also, remember to skip the debug instructions when counting, so you don't end up with differences between the debugging-enabled and debugging-disabled cases.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D61754





More information about the llvm-commits mailing list