Remove layout::Cursor from the legalizer::split API.

We still use the cursor internally, but don't require callers to use it
too.
This commit is contained in:
Jakob Stoklund Olesen
2017-09-21 13:06:28 -07:00
parent 1cd91b6f30
commit 8e93aa7ce7
4 changed files with 39 additions and 26 deletions

View File

@@ -331,12 +331,14 @@ fn convert_to_abi<PutArg>(
let ty = dfg.value_type(value);
match legalize_abi_value(ty, &arg_type) {
ValueConversion::IntSplit => {
let (lo, hi) = isplit(dfg, cfg, pos, value);
let curpos = pos.position();
let (lo, hi) = isplit(dfg, pos.layout, cfg, curpos, value);
convert_to_abi(dfg, cfg, pos, lo, put_arg);
convert_to_abi(dfg, cfg, pos, hi, put_arg);
}
ValueConversion::VectorSplit => {
let (lo, hi) = vsplit(dfg, cfg, pos, value);
let curpos = pos.position();
let (lo, hi) = vsplit(dfg, pos.layout, cfg, curpos, value);
convert_to_abi(dfg, cfg, pos, lo, put_arg);
convert_to_abi(dfg, cfg, pos, hi, put_arg);
}