[PATCH] D138502: [RISCV] Simplify eliminateFrameIndex in advance of reuse [nfc-ish]
Fraser Cormack via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 24 02:05:12 PST 2022
frasercrmck accepted this revision.
frasercrmck added a comment.
LGTM too, with some minor suggestions
================
Comment at: llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp:158
+void RISCVRegisterInfo::adjustReg(MachineBasicBlock::iterator II, Register DestReg,
+ Register SrcReg, StackOffset Offset) const {
----------------
Some comments/documentation about what `adjustReg` does would be handy, I think.
================
Comment at: llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp:265
+ adjustReg(II, DestReg, FrameReg, Offset);
+ MI.getOperand(FIOperandNum).ChangeToRegister(DestReg, false, false,
+ true);
----------------
Since we're refactoring anyway, maybe we could add `/*IsDef*/false, /*IsImp*/false, /*IsKill*/true`? Might make things that bit easier to understand.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138502/new/
https://reviews.llvm.org/D138502
More information about the llvm-commits
mailing list