Commits
Mark Lacey committed 0ec7617a2ca
Simplify enum and Int1 integer_literal instructions.
In cases like the one below, replace the integer_literal instructions
with the condition branching to the block that the instruction is in.
cond_br %10, bb1, bb3
bb1:
%13 = integer_literal $Builtin.Int1, -1
br bb2(%13 : $Builtin.Int1)
bb3:
%18 = integer_literal $Builtin.Int1, 0
br bb2(%18 : $Builtin.Int1)
Similarly, for
switch_enum %0 : $Bool, case #Bool.true!enumelt: bb1
bb1:
%1 = enum $Bool, #Bool.true!enumelt
we'll replace the enum with %0.
Use this functionality from within the CFG simplification pass to
simplify basic block args in an attempt to expose opportunities for
further CFG simplification.
Swift SVN r9968