[PATCH] D67539: [ARM][LowOverheadLoops] Add LR def safety check

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 17 05:03:50 PDT 2019


samparker marked an inline comment as done.
samparker added inline comments.


================
Comment at: lib/Target/ARM/ARMLowOverheadLoops.cpp:169
+  MachineInstr *PredLRDef =
+    SearchForDef<MachineBasicBlock::reverse_iterator>(Start, MBB->rend(),
+                                                      ARM::LR);
----------------
dmgreen wrote:
> dmgreen wrote:
> > Is the template type needed, or can it be left implicit?
> I meant can it just be: MachineInstr *PredLRDef =SearchForDef(Start, MBB->rend(), ARM::LR), and it picks up the reverse_iterator automatically from the rend type. So SearchForDef is the same template, it's just that the template type is implicit from the args. I'm not sure if this will work or not (or if it's actually better!)
Well every day is a school day - I didn't know that was a thing! Will change before committing. Thanks!


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

https://reviews.llvm.org/D67539





More information about the llvm-commits mailing list