[PATCH] D89048: [ARM][LowOverheadLoops] Insert loop start at end of block in more cases
Sam Parker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 15 04:54:10 PDT 2020
samparker added a comment.
Sorry, I didn't realise this had been updated.
================
Comment at: llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp:1083
+ if (FirstNonTerminator != MBB->end()) {
+ if (RDA.hasSameReachingDef(Start, &*FirstNonTerminator, CountReg) &&
+ RDA.hasSameReachingDef(Start, &*FirstNonTerminator, ARM::LR))
----------------
I seem to remember being concerned that though we've already chosen an InsertPt, we then compare reaching defs against Start instead... In the case where InsertPt != Start, it means there's a mov lr, after Start and so RDA.isReachingDefLiveOut(Start, ARM::LR) shouldn't be true and RDA.hasSameReachingDef(Start, &*FirstNonTerminator, ARM::LR) may also not be true. Would you mind making another patch to compare against InsertPt and then rebase this on top of that?
================
Comment at: llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp:1092
+ auto LastMI = &*MBB->getLastNonDebugInstr();
+ if (RDA.hasSameReachingDef(LastMI, &*InsertPt, CountReg)) {
+ for (auto &Op : InsertPt->operands()) {
----------------
nit: your indentations are too wide.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89048/new/
https://reviews.llvm.org/D89048
More information about the llvm-commits
mailing list