Skip to content

Commit aad2eac

Browse files
[replaycache] Implement proof-of-concept of final pass
1 parent b3d2c50 commit aad2eac

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

llvm/llvm-16.0.2/llvm/lib/Target/RISCV/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ add_llvm_target(RISCVCodeGen
4646
GISel/RISCVInstructionSelector.cpp
4747
GISel/RISCVLegalizerInfo.cpp
4848
GISel/RISCVRegisterBankInfo.cpp
49+
ReplayCache/ReplayCacheFinal.cpp
4950

5051
LINK_COMPONENTS
5152
Analysis

llvm/llvm-16.0.2/llvm/lib/Target/RISCV/RISCV.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ InstructionSelector *createRISCVInstructionSelector(const RISCVTargetMachine &,
7575
RISCVSubtarget &,
7676
RISCVRegisterBankInfo &);
7777
void initializeRISCVDAGToDAGISelPass(PassRegistry &);
78+
79+
FunctionPass *createReplayCacheFinalPass();
80+
void initializeReplayCacheFinalPass(PassRegistry &);
7881
} // namespace llvm
7982

8083
#endif

llvm/llvm-16.0.2/llvm/lib/Target/RISCV/RISCVTargetMachine.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVTarget() {
8282
initializeRISCVExpandPseudoPass(*PR);
8383
initializeRISCVInsertVSETVLIPass(*PR);
8484
initializeRISCVDAGToDAGISelPass(*PR);
85+
initializeReplayCacheFinalPass(*PR);
8586
}
8687

8788
static StringRef computeDataLayout(const Triple &TT) {
@@ -336,6 +337,8 @@ void RISCVPassConfig::addPreEmitPass2() {
336337
// possibility for other passes to break the requirements for forward
337338
// progress in the LR/SC block.
338339
addPass(createRISCVExpandAtomicPseudoPass());
340+
341+
addPass(createReplayCacheFinalPass());
339342
}
340343

341344
void RISCVPassConfig::addMachineSSAOptimization() {

0 commit comments

Comments
 (0)