Skip to content

Commit 9c34e71

Browse files
committed
SystemZ part
1 parent e4430c6 commit 9c34e71

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

llvm/lib/Target/SystemZ/SystemZ.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ FunctionPass *createSystemZPostRewritePass(SystemZTargetMachine &TM);
199199
FunctionPass *createSystemZTDCPass();
200200

201201
void initializeSystemZCopyPhysRegsPass(PassRegistry &);
202-
void initializeSystemZDAGToDAGISelPass(PassRegistry &);
202+
void initializeSystemZDAGToDAGISelLegacyPass(PassRegistry &);
203203
void initializeSystemZElimComparePass(PassRegistry &);
204204
void initializeSystemZLDCleanupPass(PassRegistry &);
205205
void initializeSystemZLongBranchPass(PassRegistry &);

llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -351,12 +351,10 @@ class SystemZDAGToDAGISel : public SelectionDAGISel {
351351
SDValue expandSelectBoolean(SDNode *Node);
352352

353353
public:
354-
static char ID;
355-
356354
SystemZDAGToDAGISel() = delete;
357355

358356
SystemZDAGToDAGISel(SystemZTargetMachine &TM, CodeGenOptLevel OptLevel)
359-
: SelectionDAGISel(ID, TM, OptLevel) {}
357+
: SelectionDAGISel(TM, OptLevel) {}
360358

361359
bool runOnMachineFunction(MachineFunction &MF) override {
362360
const Function &F = MF.getFunction();
@@ -382,15 +380,24 @@ class SystemZDAGToDAGISel : public SelectionDAGISel {
382380
// Include the pieces autogenerated from the target description.
383381
#include "SystemZGenDAGISel.inc"
384382
};
383+
384+
class SystemZDAGToDAGISelLegacy : public SelectionDAGISelLegacy {
385+
public:
386+
static char ID;
387+
explicit SystemZDAGToDAGISelLegacy(SystemZTargetMachine &TM,
388+
CodeGenOptLevel OptLevel)
389+
: SelectionDAGISelLegacy(
390+
ID, std::make_unique<SystemZDAGToDAGISel>(TM, OptLevel)) {}
391+
};
385392
} // end anonymous namespace
386393

387-
char SystemZDAGToDAGISel::ID = 0;
394+
char SystemZDAGToDAGISelLegacy::ID = 0;
388395

389-
INITIALIZE_PASS(SystemZDAGToDAGISel, DEBUG_TYPE, PASS_NAME, false, false)
396+
INITIALIZE_PASS(SystemZDAGToDAGISelLegacy, DEBUG_TYPE, PASS_NAME, false, false)
390397

391398
FunctionPass *llvm::createSystemZISelDag(SystemZTargetMachine &TM,
392399
CodeGenOptLevel OptLevel) {
393-
return new SystemZDAGToDAGISel(TM, OptLevel);
400+
return new SystemZDAGToDAGISelLegacy(TM, OptLevel);
394401
}
395402

396403
// Return true if Val should be selected as a displacement for an address

llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeSystemZTarget() {
4242
initializeSystemZShortenInstPass(PR);
4343
initializeSystemZPostRewritePass(PR);
4444
initializeSystemZTDCPassPass(PR);
45-
initializeSystemZDAGToDAGISelPass(PR);
45+
initializeSystemZDAGToDAGISelLegacyPass(PR);
4646
}
4747

4848
static std::string computeDataLayout(const Triple &TT) {

0 commit comments

Comments
 (0)