Make regalloc visit fallthrough_return instructions.

Add an explicit "is_ghost" property to selected instructions, and use
that to determine whether reload and coloring should visit instructions.
This allows them to visit fallthrough_return instructions and insert
fills and register moves as needed.
This commit is contained in:
Dan Gohman
2018-10-26 06:39:44 -07:00
committed by Benjamin Bouvier
parent 681cb5e20a
commit 88bbbca6cd
5 changed files with 101 additions and 60 deletions

View File

@@ -844,7 +844,7 @@ vsplit = Instruction(
the lanes from ``x``. The result may be two scalars if ``x`` only had
two lanes.
""",
ins=x, outs=(lo, hi))
ins=x, outs=(lo, hi), is_ghost=True)
Any128 = TypeVar(
'Any128', 'Any scalar or vector type with as most 128 lanes',
@@ -864,7 +864,7 @@ vconcat = Instruction(
It is possible to form a vector by concatenating two scalars.
""",
ins=(x, y), outs=a)
ins=(x, y), outs=a, is_ghost=True)
c = Operand('c', TxN.as_bool(), doc='Controlling vector')
x = Operand('x', TxN, doc='Value to use where `c` is true')
@@ -2009,7 +2009,7 @@ isplit = Instruction(
Returns the low half of `x` and the high half of `x` as two independent
values.
""",
ins=x, outs=(lo, hi))
ins=x, outs=(lo, hi), is_ghost=True)
NarrowInt = TypeVar(
@@ -2029,6 +2029,6 @@ iconcat = Instruction(
the same number of lanes as the inputs, but the lanes are twice the
size.
""",
ins=(lo, hi), outs=a)
ins=(lo, hi), outs=a, is_ghost=True)
GROUP.close()