Skip to content

Commit

Permalink
ConstProp: use SetWriteCursorBefore
Browse files Browse the repository at this point in the history
Signed-off-by: Alyssa Rosenzweig <[email protected]>
  • Loading branch information
alyssarosenzweig committed Apr 23, 2024
1 parent 1a11343 commit 2372c94
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions FEXCore/Source/Interface/IR/Passes/ConstProp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -639,10 +639,7 @@ bool ConstProp::ConstantPropagation(IREmitter* IREmit, const IRListView& Current
IROp->Op = OP_ADDWITHFLAGS;
}

// Set the write cursor to just before this operation.
auto CodeIter = CurrentIR.at(CodeNode);
--CodeIter;
IREmit->SetWriteCursor(std::get<0>(*CodeIter));
IREmit->SetWriteCursorBefore(CodeNode);

// Negate the constant.
auto NegConstant = IREmit->_Constant(-Constant2);
Expand Down

0 comments on commit 2372c94

Please sign in to comment.