[PATCH] D57163: [DebugInfo][DAG] PR40427: Avoid accidentally re-ordering DBG_VALUEs due to assumptions about inst creation

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 24 09:36:04 PST 2019


aprantl added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp:823
+    auto GetPrevInsn = [&](MachineBasicBlock::iterator I) {
+      bool BadPos = BB->begin() == BB->end() || I == BB->begin();
+      if (BadPos)
----------------
if `BB->begin() == BB->end()` doesn't that imply `I == BB->begin()`, too?



================
Comment at: lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp:844
+      }
+    } else {
+      // No new instruction.
----------------
early return instead?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D57163





More information about the llvm-commits mailing list