mirror of
https://github.com/ziglang/zig.git
synced 2025-12-30 10:03:21 +00:00
Don't assume a write if an operand is not in function parameters
Liveness assumes that if the operand is not in the parameters of a function call it is being written to, resulting in pointless memcpies.
This commit is contained in:
parent
eff58d6c18
commit
2ab78937dd
@ -489,7 +489,7 @@ pub fn categorizeOperand(
|
||||
for (args, 0..) |arg, i| {
|
||||
if (arg == operand_ref) return matchOperandSmallIndex(l, inst, @as(OperandInt, @intCast(i + 1)), .write);
|
||||
}
|
||||
return .write;
|
||||
return .none;
|
||||
}
|
||||
var bt = l.iterateBigTomb(inst);
|
||||
if (bt.feed()) {
|
||||
@ -504,7 +504,7 @@ pub fn categorizeOperand(
|
||||
if (arg == operand_ref) return .write;
|
||||
}
|
||||
}
|
||||
return .write;
|
||||
return .none;
|
||||
},
|
||||
.select => {
|
||||
const pl_op = air_datas[@intFromEnum(inst)].pl_op;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user