This patch improves SimplifyCFG to catch things like:
if (a > 5) {
if (a > 4) <- known to be true; remove branch
alive();
}and
if (a > 5) {
if (a < 4) <- known to be false; remove branch and call
dead();
}This is very similar to (and has a dependency on) http://reviews.llvm.org/D18905.
Please take a look,
Chad
Comments to explain what this function does?