[llvm] 748a6ad - [RISCV] Remove extra insertVSETVLI method. NFC
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 10 04:57:41 PDT 2024
Author: Luke Lau
Date: 2024-07-10T19:57:18+08:00
New Revision: 748a6ad68ba31d242e3f86eddd5b0fd7b2a02ff9
URL: https://github.com/llvm/llvm-project/commit/748a6ad68ba31d242e3f86eddd5b0fd7b2a02ff9
DIFF: https://github.com/llvm/llvm-project/commit/748a6ad68ba31d242e3f86eddd5b0fd7b2a02ff9.diff
LOG: [RISCV] Remove extra insertVSETVLI method. NFC
There's only one user of it, and to remove it we just need to pass
along the DebugLoc.
Added:
Modified:
llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp b/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
index f1aace79cea07..1f7d322be4d2a 100644
--- a/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
+++ b/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
@@ -903,8 +903,6 @@ class RISCVInsertVSETVLI : public MachineFunctionPass {
const VSETVLIInfo &CurInfo) const;
bool needVSETVLIPHI(const VSETVLIInfo &Require,
const MachineBasicBlock &MBB) const;
- void insertVSETVLI(MachineBasicBlock &MBB, MachineInstr &MI,
- const VSETVLIInfo &Info, const VSETVLIInfo &PrevInfo);
void insertVSETVLI(MachineBasicBlock &MBB,
MachineBasicBlock::iterator InsertPt, DebugLoc DL,
const VSETVLIInfo &Info, const VSETVLIInfo &PrevInfo);
@@ -1080,13 +1078,6 @@ RISCVInsertVSETVLI::computeInfoForInstr(const MachineInstr &MI) const {
return InstrInfo;
}
-void RISCVInsertVSETVLI::insertVSETVLI(MachineBasicBlock &MBB, MachineInstr &MI,
- const VSETVLIInfo &Info,
- const VSETVLIInfo &PrevInfo) {
- DebugLoc DL = MI.getDebugLoc();
- insertVSETVLI(MBB, MachineBasicBlock::iterator(&MI), DL, Info, PrevInfo);
-}
-
void RISCVInsertVSETVLI::insertVSETVLI(MachineBasicBlock &MBB,
MachineBasicBlock::iterator InsertPt, DebugLoc DL,
const VSETVLIInfo &Info, const VSETVLIInfo &PrevInfo) {
@@ -1436,7 +1427,7 @@ void RISCVInsertVSETVLI::emitVSETVLIs(MachineBasicBlock &MBB) {
// we *do* need to model the state as if it changed as while the
// register contents are unchanged, the abstract model can change.
if (!PrefixTransparent || needVSETVLIPHI(CurInfo, MBB))
- insertVSETVLI(MBB, MI, CurInfo, PrevInfo);
+ insertVSETVLI(MBB, MI, MI.getDebugLoc(), CurInfo, PrevInfo);
PrefixTransparent = false;
}
More information about the llvm-commits
mailing list