We are exiting E->src, see if E->dest ends with a conditional
jump which has a known value when reached via E.
Special care is necessary if E is a back edge in the CFG as we
may have already recorded equivalences for E->dest into our
various tables, including the result of the conditional at
the end of E->dest. Threading opportunities are severely
limited in that case to avoid short-circuiting the loop
incorrectly.
Note it is quite common for the first block inside a loop to
end with a conditional which is either always true or always
false when reached via the loop backedge. Thus we do not want
to blindly disable threading across a loop backedge.
DUMMY_COND is a shared cond_expr used by condition simplification as scratch,
to avoid allocating memory.
HANDLE_DOMINATING_ASSERTS is true if we should try to replace operands of
the simplified condition with left-hand sides of ASSERT_EXPRs they are
used in.
STACK is used to undo temporary equivalences created during the walk of
E->dest.
SIMPLIFY is a pass-specific function used to simplify statements.
There should be no edges on the path, so no need to walk through
the vector entries.
We were unable to determine what out edge from E->dest is taken. However,
we might still be able to thread through successors of E->dest. This
often occurs when E->dest is a joiner block which then fans back out
based on redundant tests.
If so, we'll copy E->dest and redirect the appropriate predecessor to
the copy. Within the copy of E->dest, we'll thread one or more edges
to points deeper in the CFG.
This is a stopgap until we have a more structured approach to path
isolation.
If E->dest has abnormal outgoing edges, then there's no guarantee
we can safely redirect any of the edges. Just punt those cases.
Look at each successor of E->dest to see if we can thread through it.
Avoid threading to any block we have already visited.
Record whether or not we were able to thread through a successor
of E->dest.
If we were able to thread through a successor of E->dest, then
record the jump threading opportunity.
Referenced by simplify_cond_using_ranges().