This patch allows JumpThreading also thread through guards.
Virtually, guard(cond) is equivalent to the following construction:
if (cond) { do something } else {deoptimize}
Yet it is not explicitly converted into IFs before lowering.
This patch enables early threading through guards in simple cases.
Currently it covers the following situation:
if (cond1) { // code A } else { // code B } // code C guard(cond2) // code D
If there is implication cond1 => cond2 or !cond1 => cond2, we can transform
this construction into the following:
if (cond1) { // code A // code C } else { // code B // code C guard(cond2) } // code D
Thus, removing the guard from one of execution branches.
The general idiom I've seen used in LLVM is to open the PatternMatch namespace in the functions that use it (so for here only JumpThreadingPass::ProcessGuards).