@@ -26,11 +26,7 @@ namespace {
26
26
class SystemZShortenInst : public MachineFunctionPass {
27
27
public:
28
28
static char ID;
29
- SystemZShortenInst (const SystemZTargetMachine &tm );
30
-
31
- StringRef getPassName () const override {
32
- return " SystemZ Instruction Shortening" ;
33
- }
29
+ SystemZShortenInst ();
34
30
35
31
bool processBlock (MachineBasicBlock &MBB);
36
32
bool runOnMachineFunction (MachineFunction &F) override ;
@@ -56,12 +52,17 @@ class SystemZShortenInst : public MachineFunctionPass {
56
52
char SystemZShortenInst::ID = 0 ;
57
53
} // end anonymous namespace
58
54
55
+ INITIALIZE_PASS (SystemZShortenInst, DEBUG_TYPE,
56
+ " SystemZ Instruction Shortening" , false , false )
57
+
59
58
FunctionPass *llvm::createSystemZShortenInstPass(SystemZTargetMachine &TM) {
60
- return new SystemZShortenInst (TM );
59
+ return new SystemZShortenInst ();
61
60
}
62
61
63
- SystemZShortenInst::SystemZShortenInst (const SystemZTargetMachine &tm )
64
- : MachineFunctionPass(ID), TII(nullptr ) {}
62
+ SystemZShortenInst::SystemZShortenInst ()
63
+ : MachineFunctionPass(ID), TII(nullptr ) {
64
+ initializeSystemZShortenInstPass (*PassRegistry::getPassRegistry ());
65
+ }
65
66
66
67
// Tie operands if MI has become a two-address instruction.
67
68
static void tieOpsIfNeeded (MachineInstr &MI) {
0 commit comments