danielmarjamaki added inline comments. ================ Comment at: lib/Analysis/CFG.cpp:2986 @@ -2985,3 +2985,1 @@ - if (!KnownVal.isFalse()) { - // Add an intermediate block between the BodyBlock and the ---------------- dcoughlin wrote: > You need to keep this check so that the optimized CFG still removes edges > that are trivially known to be false. Thanks
================ Comment at: lib/Analysis/CFG.cpp:2994 @@ -2993,3 @@ - Succ = BodyBlock; - CFGBlock *LoopBackBlock = createBlock(); - LoopBackBlock->setLoopTarget(D); ---------------- dcoughlin wrote: > To keep the unoptimized and optimized blocks in sync, this block creation > needs to be done regardless of whether the branch condition is known to be > false. My advice would be to hoist the creation (and the FIXME comments) to > above the check for whether KnownVal is false. Thanks https://reviews.llvm.org/D24759 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits