[PATCH] D69416: [Examples] Add IRTransformations directory to examples.

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 11 14:56:16 PST 2019


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

LGTM aside from typos



================
Comment at: llvm/examples/IRTransforms/SimplifyCFG.cpp:75
+    // incoming values from BB from PHIs in the successors. Note that this will
+    // not actually remote BB from the predecessor lists of its successors.
+    for (BasicBlock *Succ : successors(&BB))
----------------
s/remote/remove/


================
Comment at: llvm/examples/IRTransforms/SimplifyCFG.cpp:116
+    // incoming values from BB from PHIs in the successors. Note that this will
+    // not actually remote BB from the predecessor lists of its successors.
+    for (BasicBlock *Succ : successors(&BB)) {
----------------
s/remote/remove/


================
Comment at: llvm/examples/IRTransforms/SimplifyCFG.cpp:156
+    BasicBlock *RemovedSucc = BI->getSuccessor(CI->isOne());
+    // Tell RemovedSucc we will remove BB from its predecerssors.
+    RemovedSucc->removePredecessor(&BB);
----------------
typo: predecessors


================
Comment at: llvm/examples/IRTransforms/SimplifyCFG.cpp:192
+    BasicBlock *RemovedSucc = BI->getSuccessor(CI->isOne());
+    // Tell RemovedSucc we will remove BB from its predecerssors.
+    RemovedSucc->removePredecessor(&BB);
----------------
typo on predecessors here too


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69416





More information about the llvm-commits mailing list