[PATCH] D35528: [Dominators] Teach LoopUnswitch to use the incremental API

Tobias Grosser via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 17 20:31:55 PDT 2017


grosser accepted this revision.
grosser added a comment.
This revision is now accepted and ready to land.

This looks good to me! Thank you.



================
Comment at: lib/Transforms/Scalar/LoopUnswitch.cpp:1260
+  // The OldBr was replaced by a new one and removed (but not erased) by
+  // EmitPreheaderBranchOnCondition. It no longer needed, so delete it.
+  delete OldBR;
----------------
It IS no longer needed, so delete it.


================
Comment at: lib/Transforms/Utils/BreakCriticalEdges.cpp:227
+    DT->insertEdge(NewBB, DestBB);
+    DT->deleteEdge(TIBB, DestBB);
   }
----------------
Very nice cleanup, indeed!


https://reviews.llvm.org/D35528





More information about the llvm-commits mailing list