[PATCH] D19051: [mips] Fix forbidden slot hazard handling

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 29 04:05:10 PDT 2016


dsanders accepted this revision.
dsanders added a reviewer: dsanders.
dsanders added a comment.
This revision is now accepted and ready to land.

LGTM with a couple nits


================
Comment at: lib/Target/Mips/MipsHazardSchedule.cpp:98-99
@@ +97,4 @@
+  Iter I = Position, E = Position->getParent()->end();
+  while (I != E && I->isTransient())
+    I++;
+
----------------
This loop seems equivalent to:
  return std::find_if(I, E, [](const auto &Insn) { return !Insn->isTransient(); })

Also, we should assert that we don't return E.


Repository:
  rL LLVM

http://reviews.llvm.org/D19051





More information about the llvm-commits mailing list