[PATCH] D22143: [SimplifyCFG] Rewrite SinkThenElseCodeToEnd
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 5 18:49:48 PDT 2016
sanjoy requested changes to this revision.
sanjoy added a comment.
This revision now requires changes to proceed.
> I think all comments are now addressed.
I think you missed two?
================
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:1322
@@ -1321,9 +1321,3 @@
-/// Given an unconditional branch that goes to BBEnd,
-/// check whether BBEnd has only two predecessors and the other predecessor
-/// ends with an unconditional branch. If it is true, sink any common code
-/// in the two predecessors to BBEnd.
-static bool SinkThenElseCodeToEnd(BranchInst *BI1) {
- assert(BI1->isUnconditional());
- BasicBlock *BB1 = BI1->getParent();
- BasicBlock *BBEnd = BI1->getSuccessor(0);
+static bool areValuesTriviallySame(Value *V0, BasicBlock::const_iterator At0,
+ Value *V1, BasicBlock::const_iterator At1) {
----------------
This one wasn't addressed.
================
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:1337
@@ +1336,3 @@
+ if (!I0->mayReadOrWriteMemory())
+ return true;
+
----------------
This one wasn't addressed.
Repository:
rL LLVM
https://reviews.llvm.org/D22143
More information about the llvm-commits
mailing list