[PATCH] D37343: [CGP] Merge empty case blocks if no extra moves are added.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 28 17:05:31 PDT 2017


efriedma added inline comments.


================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:713
 
+    if (DT && ModifiedDT) {
+      DT->recalculate(F);
----------------
This usage of "ModifiedDT" is weird; if the CFG is ever modified, you recompute every time you visit a basic blocK?


================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:720
+      DT->changeImmediateDominator(DestBB, NewIDom);
+      DT->eraseNode(BB);
+    }
----------------
New code should be using insertEdge/deleteEdge/applyUpdates to do domtree updates.


https://reviews.llvm.org/D37343





More information about the llvm-commits mailing list