[PATCH] Do not incorrectly set the inverted flag.

Hongbin Zheng etherzhhb at gmail.com
Thu Nov 27 06:50:49 PST 2014


Hi grosser,

In TempScopInfo::buildCondition we extract the conditions to guard the
BB *in addition of* loop bounds. This means we should only consider the
conditions in the paths (in CFG) that do not contain cycles (loops).

At the same time, we set the invert flag if the FalseBB of the current
branch dominates our target BB to indicate that we reach the target BB
with an inverted condition from the current branch.

In this case, the path from the FalseBB contains a cycle if the FalseBB
is the target of a backedge. The conditions implied by such a path should
not be consider. We can identify such a case by checking if the TrueBB
also dominates our target BB, which means we can also reach our target
BB from the TrueBB, without going through the backedge.

http://reviews.llvm.org/D6438

Files:
  lib/Analysis/TempScopInfo.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6438.16695.patch
Type: text/x-patch
Size: 1082 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141127/4b1dd5d6/attachment.bin>


More information about the llvm-commits mailing list