public class ConditionDetection extends java.lang.Object implements BlockTransformer
| Constructor and Description |
|---|
ConditionDetection() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
inlineExitBranch(Block block,
BlockTransformContext ctx)
Only inlines branches that are strictly dominated by this block (incoming edge count == 1)
|
static void |
invertIf(IfInstruction ifInsn,
MethodTransformContext ctx)
Invert an IfInstruction.
|
void |
transform(Block block,
BlockTransformContext ctx)
Runs the transform on the specified block.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, stepTypepublic void transform(Block block, BlockTransformContext ctx)
BlockTransformertransform in interface BlockTransformerblock - The block to transform.ctx - Additional context provided to the transform.public static boolean inlineExitBranch(Block block, BlockTransformContext ctx)
...; br nextBlock;
->
...; { nextBlock... }
block - The block.public static void invertIf(IfInstruction ifInsn, MethodTransformContext ctx)
if (cond) { then... }
else...;
exit;
->
if (!cond) { else...; exit }
then...;
ifInsn - The IfInstruction.ctx - The transform context.