diff options
author | paperchalice <liujunchang97@outlook.com> | 2024-06-02 14:31:52 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-02 14:31:52 +0800 |
commit | 8917afaf0ec2ebe390284e3727e720eaf97967eb (patch) | |
tree | a27b331fbd47fb4e7623442371912eda70991487 /llvm/lib/Target/PowerPC | |
parent | de37c06f01772e02465ccc9f538894c76d89a7a1 (diff) | |
download | llvm-8917afaf0ec2ebe390284e3727e720eaf97967eb.zip llvm-8917afaf0ec2ebe390284e3727e720eaf97967eb.tar.gz llvm-8917afaf0ec2ebe390284e3727e720eaf97967eb.tar.bz2 |
Revert "[NewPM][CodeGen] Port selection dag isel to new pass manager" (#94146)
This reverts commit de37c06f01772e02465ccc9f538894c76d89a7a1 to
de37c06f01772e02465ccc9f538894c76d89a7a1
It still breaks EXPENSIVE_CHECKS build. Sorry.
Diffstat (limited to 'llvm/lib/Target/PowerPC')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPC.h | 2 | ||||
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp | 18 | ||||
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | 2 |
3 files changed, 8 insertions, 14 deletions
diff --git a/llvm/lib/Target/PowerPC/PPC.h b/llvm/lib/Target/PowerPC/PPC.h index 94a59d1..eb8886d 100644 --- a/llvm/lib/Target/PowerPC/PPC.h +++ b/llvm/lib/Target/PowerPC/PPC.h @@ -78,7 +78,7 @@ class ModulePass; void initializePPCMIPeepholePass(PassRegistry&); void initializePPCExpandAtomicPseudoPass(PassRegistry &); void initializePPCCTRLoopsPass(PassRegistry &); - void initializePPCDAGToDAGISelLegacyPass(PassRegistry &); + void initializePPCDAGToDAGISelPass(PassRegistry &); void initializePPCMergeStringPoolPass(PassRegistry &); extern char &PPCVSXFMAMutateID; diff --git a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp index 275b333..26560dc 100644 --- a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp @@ -147,10 +147,12 @@ namespace { unsigned GlobalBaseReg = 0; public: + static char ID; + PPCDAGToDAGISel() = delete; explicit PPCDAGToDAGISel(PPCTargetMachine &tm, CodeGenOptLevel OptLevel) - : SelectionDAGISel(tm, OptLevel), TM(tm) {} + : SelectionDAGISel(ID, tm, OptLevel), TM(tm) {} bool runOnMachineFunction(MachineFunction &MF) override { // Make sure we re-emit a set of the global base reg if necessary @@ -445,19 +447,11 @@ private: void transferMemOperands(SDNode *N, SDNode *Result); }; - class PPCDAGToDAGISelLegacy : public SelectionDAGISelLegacy { - public: - static char ID; - explicit PPCDAGToDAGISelLegacy(PPCTargetMachine &tm, - CodeGenOptLevel OptLevel) - : SelectionDAGISelLegacy( - ID, std::make_unique<PPCDAGToDAGISel>(tm, OptLevel)) {} - }; } // end anonymous namespace -char PPCDAGToDAGISelLegacy::ID = 0; +char PPCDAGToDAGISel::ID = 0; -INITIALIZE_PASS(PPCDAGToDAGISelLegacy, DEBUG_TYPE, PASS_NAME, false, false) +INITIALIZE_PASS(PPCDAGToDAGISel, DEBUG_TYPE, PASS_NAME, false, false) /// getGlobalBaseReg - Output the instructions required to put the /// base address to use for accessing globals into a register. @@ -7927,5 +7921,5 @@ void PPCDAGToDAGISel::PeepholePPC64() { /// FunctionPass *llvm::createPPCISelDag(PPCTargetMachine &TM, CodeGenOptLevel OptLevel) { - return new PPCDAGToDAGISelLegacy(TM, OptLevel); + return new PPCDAGToDAGISel(TM, OptLevel); } diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp index 1ef891d..714cf69 100644 --- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -141,7 +141,7 @@ extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializePowerPCTarget() { initializePPCExpandAtomicPseudoPass(PR); initializeGlobalISel(PR); initializePPCCTRLoopsPass(PR); - initializePPCDAGToDAGISelLegacyPass(PR); + initializePPCDAGToDAGISelPass(PR); initializePPCMergeStringPoolPass(PR); } |