[hir] Remove unnecessary null check

This commit is contained in:
Sathya Gunasekaran
2023-02-07 15:08:38 +00:00
parent 9cac0b0068
commit 1f7cd2ff21
+4 -7
View File
@@ -202,13 +202,10 @@ export default function enterSSA(func: HIRFunction) {
for (const instr of block.instructions) {
mapInstructionOperands(instr, (place) => builder.getPlace(place));
if (instr.lvalue != null) {
const oldPlace = instr.lvalue.place;
let newPlace: Place;
newPlace = builder.definePlace(oldPlace);
instr.lvalue.kind = InstructionKind.Const;
instr.lvalue.place = newPlace;
}
const oldPlace = instr.lvalue.place;
const newPlace = builder.definePlace(oldPlace);
instr.lvalue.kind = InstructionKind.Const;
instr.lvalue.place = newPlace;
}
mapTerminalOperands(block.terminal, (place) => builder.getPlace(place));