Skip to content

Commit 16f53d9

Browse files
committed
Remove RISCVLoadStoreOptimizer
This will be added in a separate commit.
1 parent 524e5a7 commit 16f53d9

File tree

8 files changed

+1
-937
lines changed

8 files changed

+1
-937
lines changed

llvm/lib/Target/RISCV/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ add_llvm_target(RISCVCodeGen
4848
RISCVISelLowering.cpp
4949
RISCVLandingPadSetup.cpp
5050
RISCVMachineFunctionInfo.cpp
51-
RISCVLoadStoreOptimizer.cpp
5251
RISCVMergeBaseOffset.cpp
5352
RISCVOptWInstrs.cpp
5453
RISCVPostRAExpandPseudoInsts.cpp

llvm/lib/Target/RISCV/RISCVInstrInfo.cpp

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2738,46 +2738,6 @@ MachineInstr *RISCVInstrInfo::emitLdStWithAddr(MachineInstr &MemI,
27382738
.setMIFlags(MemI.getFlags());
27392739
}
27402740

2741-
bool RISCVInstrInfo::isPairableLdStInstOpc(unsigned Opc) {
2742-
switch (Opc) {
2743-
default:
2744-
return false;
2745-
case RISCV::SH:
2746-
case RISCV::LH:
2747-
case RISCV::LHU:
2748-
case RISCV::SW:
2749-
case RISCV::FSW:
2750-
case RISCV::LW:
2751-
case RISCV::FLW:
2752-
case RISCV::SD:
2753-
case RISCV::FSD:
2754-
case RISCV::LD:
2755-
case RISCV::FLD:
2756-
return true;
2757-
}
2758-
}
2759-
2760-
bool RISCVInstrInfo::isLdStSafeToPair(const MachineInstr &LdSt,
2761-
const TargetRegisterInfo *TRI) {
2762-
// If this is a volatile load/store, don't mess with it.
2763-
if (LdSt.hasOrderedMemoryRef() || LdSt.getNumExplicitOperands() != 3)
2764-
return false;
2765-
2766-
if (LdSt.getOperand(1).isFI())
2767-
return true;
2768-
2769-
assert(LdSt.getOperand(1).isReg() && "Expected a reg operand.");
2770-
// Can't cluster if the instruction modifies the base register
2771-
// or it is update form. e.g. ld x5,8(x5)
2772-
if (LdSt.modifiesRegister(LdSt.getOperand(1).getReg(), TRI))
2773-
return false;
2774-
2775-
if (!LdSt.getOperand(2).isImm())
2776-
return false;
2777-
2778-
return true;
2779-
}
2780-
27812741
bool RISCVInstrInfo::getMemOperandsWithOffsetWidth(
27822742
const MachineInstr &LdSt, SmallVectorImpl<const MachineOperand *> &BaseOps,
27832743
int64_t &Offset, bool &OffsetIsScalable, LocationSize &Width,

llvm/lib/Target/RISCV/RISCVInstrInfo.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -301,12 +301,6 @@ class RISCVInstrInfo : public RISCVGenInstrInfo {
301301
std::unique_ptr<TargetInstrInfo::PipelinerLoopInfo>
302302
analyzeLoopForPipelining(MachineBasicBlock *LoopBB) const override;
303303

304-
/// Return true if pairing the given load or store may be paired with another.
305-
static bool isPairableLdStInstOpc(unsigned Opc);
306-
307-
static bool isLdStSafeToPair(const MachineInstr &LdSt,
308-
const TargetRegisterInfo *TRI);
309-
310304
protected:
311305
const RISCVSubtarget &STI;
312306

0 commit comments

Comments
 (0)