xref: /freebsd/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCPreEmitPeephole.cpp (revision 480093f4440d54b30b3025afeac24b48f2ba7a2e)
10b57cec5SDimitry Andric //===--------- PPCPreEmitPeephole.cpp - Late peephole optimizations -------===//
20b57cec5SDimitry Andric //
30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric //
70b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
80b57cec5SDimitry Andric //
90b57cec5SDimitry Andric // A pre-emit peephole for catching opportunities introduced by late passes such
100b57cec5SDimitry Andric // as MachineBlockPlacement.
110b57cec5SDimitry Andric //
120b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
130b57cec5SDimitry Andric 
140b57cec5SDimitry Andric #include "PPC.h"
150b57cec5SDimitry Andric #include "PPCInstrInfo.h"
160b57cec5SDimitry Andric #include "PPCSubtarget.h"
170b57cec5SDimitry Andric #include "llvm/ADT/DenseMap.h"
180b57cec5SDimitry Andric #include "llvm/ADT/Statistic.h"
190b57cec5SDimitry Andric #include "llvm/CodeGen/LivePhysRegs.h"
200b57cec5SDimitry Andric #include "llvm/CodeGen/MachineBasicBlock.h"
210b57cec5SDimitry Andric #include "llvm/CodeGen/MachineFunctionPass.h"
220b57cec5SDimitry Andric #include "llvm/CodeGen/MachineInstrBuilder.h"
230b57cec5SDimitry Andric #include "llvm/CodeGen/MachineRegisterInfo.h"
240b57cec5SDimitry Andric #include "llvm/Support/CommandLine.h"
250b57cec5SDimitry Andric #include "llvm/ADT/Statistic.h"
260b57cec5SDimitry Andric #include "llvm/Support/Debug.h"
270b57cec5SDimitry Andric 
280b57cec5SDimitry Andric using namespace llvm;
290b57cec5SDimitry Andric 
300b57cec5SDimitry Andric #define DEBUG_TYPE "ppc-pre-emit-peephole"
310b57cec5SDimitry Andric 
320b57cec5SDimitry Andric STATISTIC(NumRRConvertedInPreEmit,
330b57cec5SDimitry Andric           "Number of r+r instructions converted to r+i in pre-emit peephole");
340b57cec5SDimitry Andric STATISTIC(NumRemovedInPreEmit,
350b57cec5SDimitry Andric           "Number of instructions deleted in pre-emit peephole");
360b57cec5SDimitry Andric STATISTIC(NumberOfSelfCopies,
370b57cec5SDimitry Andric           "Number of self copy instructions eliminated");
38*480093f4SDimitry Andric STATISTIC(NumFrameOffFoldInPreEmit,
39*480093f4SDimitry Andric           "Number of folding frame offset by using r+r in pre-emit peephole");
400b57cec5SDimitry Andric 
410b57cec5SDimitry Andric static cl::opt<bool>
420b57cec5SDimitry Andric RunPreEmitPeephole("ppc-late-peephole", cl::Hidden, cl::init(true),
430b57cec5SDimitry Andric                    cl::desc("Run pre-emit peephole optimizations."));
440b57cec5SDimitry Andric 
450b57cec5SDimitry Andric namespace {
460b57cec5SDimitry Andric   class PPCPreEmitPeephole : public MachineFunctionPass {
470b57cec5SDimitry Andric   public:
480b57cec5SDimitry Andric     static char ID;
490b57cec5SDimitry Andric     PPCPreEmitPeephole() : MachineFunctionPass(ID) {
500b57cec5SDimitry Andric       initializePPCPreEmitPeepholePass(*PassRegistry::getPassRegistry());
510b57cec5SDimitry Andric     }
520b57cec5SDimitry Andric 
530b57cec5SDimitry Andric     void getAnalysisUsage(AnalysisUsage &AU) const override {
540b57cec5SDimitry Andric       MachineFunctionPass::getAnalysisUsage(AU);
550b57cec5SDimitry Andric     }
560b57cec5SDimitry Andric 
570b57cec5SDimitry Andric     MachineFunctionProperties getRequiredProperties() const override {
580b57cec5SDimitry Andric       return MachineFunctionProperties().set(
590b57cec5SDimitry Andric           MachineFunctionProperties::Property::NoVRegs);
600b57cec5SDimitry Andric     }
610b57cec5SDimitry Andric 
628bcb0991SDimitry Andric     // This function removes any redundant load immediates. It has two level
638bcb0991SDimitry Andric     // loops - The outer loop finds the load immediates BBI that could be used
648bcb0991SDimitry Andric     // to replace following redundancy. The inner loop scans instructions that
658bcb0991SDimitry Andric     // after BBI to find redundancy and update kill/dead flags accordingly. If
668bcb0991SDimitry Andric     // AfterBBI is the same as BBI, it is redundant, otherwise any instructions
678bcb0991SDimitry Andric     // that modify the def register of BBI would break the scanning.
688bcb0991SDimitry Andric     // DeadOrKillToUnset is a pointer to the previous operand that had the
698bcb0991SDimitry Andric     // kill/dead flag set. It keeps track of the def register of BBI, the use
708bcb0991SDimitry Andric     // registers of AfterBBIs and the def registers of AfterBBIs.
718bcb0991SDimitry Andric     bool removeRedundantLIs(MachineBasicBlock &MBB,
728bcb0991SDimitry Andric                             const TargetRegisterInfo *TRI) {
738bcb0991SDimitry Andric       LLVM_DEBUG(dbgs() << "Remove redundant load immediates from MBB:\n";
748bcb0991SDimitry Andric                  MBB.dump(); dbgs() << "\n");
758bcb0991SDimitry Andric 
768bcb0991SDimitry Andric       DenseSet<MachineInstr *> InstrsToErase;
778bcb0991SDimitry Andric       for (auto BBI = MBB.instr_begin(); BBI != MBB.instr_end(); ++BBI) {
788bcb0991SDimitry Andric         // Skip load immediate that is marked to be erased later because it
798bcb0991SDimitry Andric         // cannot be used to replace any other instructions.
808bcb0991SDimitry Andric         if (InstrsToErase.find(&*BBI) != InstrsToErase.end())
818bcb0991SDimitry Andric           continue;
828bcb0991SDimitry Andric         // Skip non-load immediate.
838bcb0991SDimitry Andric         unsigned Opc = BBI->getOpcode();
848bcb0991SDimitry Andric         if (Opc != PPC::LI && Opc != PPC::LI8 && Opc != PPC::LIS &&
858bcb0991SDimitry Andric             Opc != PPC::LIS8)
868bcb0991SDimitry Andric           continue;
878bcb0991SDimitry Andric         // Skip load immediate, where the operand is a relocation (e.g., $r3 =
888bcb0991SDimitry Andric         // LI target-flags(ppc-lo) %const.0).
898bcb0991SDimitry Andric         if (!BBI->getOperand(1).isImm())
908bcb0991SDimitry Andric           continue;
918bcb0991SDimitry Andric         assert(BBI->getOperand(0).isReg() &&
928bcb0991SDimitry Andric                "Expected a register for the first operand");
938bcb0991SDimitry Andric 
948bcb0991SDimitry Andric         LLVM_DEBUG(dbgs() << "Scanning after load immediate: "; BBI->dump(););
958bcb0991SDimitry Andric 
968bcb0991SDimitry Andric         Register Reg = BBI->getOperand(0).getReg();
978bcb0991SDimitry Andric         int64_t Imm = BBI->getOperand(1).getImm();
988bcb0991SDimitry Andric         MachineOperand *DeadOrKillToUnset = nullptr;
998bcb0991SDimitry Andric         if (BBI->getOperand(0).isDead()) {
1008bcb0991SDimitry Andric           DeadOrKillToUnset = &BBI->getOperand(0);
1018bcb0991SDimitry Andric           LLVM_DEBUG(dbgs() << " Kill flag of " << *DeadOrKillToUnset
1028bcb0991SDimitry Andric                             << " from load immediate " << *BBI
1038bcb0991SDimitry Andric                             << " is a unsetting candidate\n");
1048bcb0991SDimitry Andric         }
1058bcb0991SDimitry Andric         // This loop scans instructions after BBI to see if there is any
1068bcb0991SDimitry Andric         // redundant load immediate.
1078bcb0991SDimitry Andric         for (auto AfterBBI = std::next(BBI); AfterBBI != MBB.instr_end();
1088bcb0991SDimitry Andric              ++AfterBBI) {
1098bcb0991SDimitry Andric           // Track the operand that kill Reg. We would unset the kill flag of
1108bcb0991SDimitry Andric           // the operand if there is a following redundant load immediate.
1118bcb0991SDimitry Andric           int KillIdx = AfterBBI->findRegisterUseOperandIdx(Reg, true, TRI);
1128bcb0991SDimitry Andric           if (KillIdx != -1) {
1138bcb0991SDimitry Andric             assert(!DeadOrKillToUnset && "Shouldn't kill same register twice");
1148bcb0991SDimitry Andric             DeadOrKillToUnset = &AfterBBI->getOperand(KillIdx);
1158bcb0991SDimitry Andric             LLVM_DEBUG(dbgs()
1168bcb0991SDimitry Andric                        << " Kill flag of " << *DeadOrKillToUnset << " from "
1178bcb0991SDimitry Andric                        << *AfterBBI << " is a unsetting candidate\n");
1188bcb0991SDimitry Andric           }
1198bcb0991SDimitry Andric 
1208bcb0991SDimitry Andric           if (!AfterBBI->modifiesRegister(Reg, TRI))
1218bcb0991SDimitry Andric             continue;
1228bcb0991SDimitry Andric           // Finish scanning because Reg is overwritten by a non-load
1238bcb0991SDimitry Andric           // instruction.
1248bcb0991SDimitry Andric           if (AfterBBI->getOpcode() != Opc)
1258bcb0991SDimitry Andric             break;
1268bcb0991SDimitry Andric           assert(AfterBBI->getOperand(0).isReg() &&
1278bcb0991SDimitry Andric                  "Expected a register for the first operand");
1288bcb0991SDimitry Andric           // Finish scanning because Reg is overwritten by a relocation or a
1298bcb0991SDimitry Andric           // different value.
1308bcb0991SDimitry Andric           if (!AfterBBI->getOperand(1).isImm() ||
1318bcb0991SDimitry Andric               AfterBBI->getOperand(1).getImm() != Imm)
1328bcb0991SDimitry Andric             break;
1338bcb0991SDimitry Andric 
1348bcb0991SDimitry Andric           // It loads same immediate value to the same Reg, which is redundant.
1358bcb0991SDimitry Andric           // We would unset kill flag in previous Reg usage to extend live range
1368bcb0991SDimitry Andric           // of Reg first, then remove the redundancy.
1378bcb0991SDimitry Andric           if (DeadOrKillToUnset) {
1388bcb0991SDimitry Andric             LLVM_DEBUG(dbgs()
1398bcb0991SDimitry Andric                        << " Unset dead/kill flag of " << *DeadOrKillToUnset
1408bcb0991SDimitry Andric                        << " from " << *DeadOrKillToUnset->getParent());
1418bcb0991SDimitry Andric             if (DeadOrKillToUnset->isDef())
1428bcb0991SDimitry Andric               DeadOrKillToUnset->setIsDead(false);
1438bcb0991SDimitry Andric             else
1448bcb0991SDimitry Andric               DeadOrKillToUnset->setIsKill(false);
1458bcb0991SDimitry Andric           }
1468bcb0991SDimitry Andric           DeadOrKillToUnset =
1478bcb0991SDimitry Andric               AfterBBI->findRegisterDefOperand(Reg, true, true, TRI);
1488bcb0991SDimitry Andric           if (DeadOrKillToUnset)
1498bcb0991SDimitry Andric             LLVM_DEBUG(dbgs()
1508bcb0991SDimitry Andric                        << " Dead flag of " << *DeadOrKillToUnset << " from "
1518bcb0991SDimitry Andric                        << *AfterBBI << " is a unsetting candidate\n");
1528bcb0991SDimitry Andric           InstrsToErase.insert(&*AfterBBI);
1538bcb0991SDimitry Andric           LLVM_DEBUG(dbgs() << " Remove redundant load immediate: ";
1548bcb0991SDimitry Andric                      AfterBBI->dump());
1558bcb0991SDimitry Andric         }
1568bcb0991SDimitry Andric       }
1578bcb0991SDimitry Andric 
1588bcb0991SDimitry Andric       for (MachineInstr *MI : InstrsToErase) {
1598bcb0991SDimitry Andric         MI->eraseFromParent();
1608bcb0991SDimitry Andric       }
1618bcb0991SDimitry Andric       NumRemovedInPreEmit += InstrsToErase.size();
1628bcb0991SDimitry Andric       return !InstrsToErase.empty();
1638bcb0991SDimitry Andric     }
1648bcb0991SDimitry Andric 
1650b57cec5SDimitry Andric     bool runOnMachineFunction(MachineFunction &MF) override {
166*480093f4SDimitry Andric       if (skipFunction(MF.getFunction()) || !RunPreEmitPeephole) {
167*480093f4SDimitry Andric         // Remove UNENCODED_NOP even when this pass is disabled.
168*480093f4SDimitry Andric         // This needs to be done unconditionally so we don't emit zeros
169*480093f4SDimitry Andric         // in the instruction stream.
170*480093f4SDimitry Andric         SmallVector<MachineInstr *, 4> InstrsToErase;
171*480093f4SDimitry Andric         for (MachineBasicBlock &MBB : MF)
172*480093f4SDimitry Andric           for (MachineInstr &MI : MBB)
173*480093f4SDimitry Andric             if (MI.getOpcode() == PPC::UNENCODED_NOP)
174*480093f4SDimitry Andric               InstrsToErase.push_back(&MI);
175*480093f4SDimitry Andric         for (MachineInstr *MI : InstrsToErase)
176*480093f4SDimitry Andric           MI->eraseFromParent();
1770b57cec5SDimitry Andric         return false;
178*480093f4SDimitry Andric       }
1790b57cec5SDimitry Andric       bool Changed = false;
1800b57cec5SDimitry Andric       const PPCInstrInfo *TII = MF.getSubtarget<PPCSubtarget>().getInstrInfo();
1810b57cec5SDimitry Andric       const TargetRegisterInfo *TRI = MF.getSubtarget().getRegisterInfo();
1820b57cec5SDimitry Andric       SmallVector<MachineInstr *, 4> InstrsToErase;
1830b57cec5SDimitry Andric       for (MachineBasicBlock &MBB : MF) {
1848bcb0991SDimitry Andric         Changed |= removeRedundantLIs(MBB, TRI);
1850b57cec5SDimitry Andric         for (MachineInstr &MI : MBB) {
1860b57cec5SDimitry Andric           unsigned Opc = MI.getOpcode();
187*480093f4SDimitry Andric           if (Opc == PPC::UNENCODED_NOP) {
188*480093f4SDimitry Andric             InstrsToErase.push_back(&MI);
189*480093f4SDimitry Andric             continue;
190*480093f4SDimitry Andric           }
1910b57cec5SDimitry Andric           // Detect self copies - these can result from running AADB.
1920b57cec5SDimitry Andric           if (PPCInstrInfo::isSameClassPhysRegCopy(Opc)) {
1930b57cec5SDimitry Andric             const MCInstrDesc &MCID = TII->get(Opc);
1940b57cec5SDimitry Andric             if (MCID.getNumOperands() == 3 &&
1950b57cec5SDimitry Andric                 MI.getOperand(0).getReg() == MI.getOperand(1).getReg() &&
1960b57cec5SDimitry Andric                 MI.getOperand(0).getReg() == MI.getOperand(2).getReg()) {
1970b57cec5SDimitry Andric               NumberOfSelfCopies++;
1980b57cec5SDimitry Andric               LLVM_DEBUG(dbgs() << "Deleting self-copy instruction: ");
1990b57cec5SDimitry Andric               LLVM_DEBUG(MI.dump());
2000b57cec5SDimitry Andric               InstrsToErase.push_back(&MI);
2010b57cec5SDimitry Andric               continue;
2020b57cec5SDimitry Andric             }
2030b57cec5SDimitry Andric             else if (MCID.getNumOperands() == 2 &&
2040b57cec5SDimitry Andric                      MI.getOperand(0).getReg() == MI.getOperand(1).getReg()) {
2050b57cec5SDimitry Andric               NumberOfSelfCopies++;
2060b57cec5SDimitry Andric               LLVM_DEBUG(dbgs() << "Deleting self-copy instruction: ");
2070b57cec5SDimitry Andric               LLVM_DEBUG(MI.dump());
2080b57cec5SDimitry Andric               InstrsToErase.push_back(&MI);
2090b57cec5SDimitry Andric               continue;
2100b57cec5SDimitry Andric             }
2110b57cec5SDimitry Andric           }
2120b57cec5SDimitry Andric           MachineInstr *DefMIToErase = nullptr;
2130b57cec5SDimitry Andric           if (TII->convertToImmediateForm(MI, &DefMIToErase)) {
2140b57cec5SDimitry Andric             Changed = true;
2150b57cec5SDimitry Andric             NumRRConvertedInPreEmit++;
2160b57cec5SDimitry Andric             LLVM_DEBUG(dbgs() << "Converted instruction to imm form: ");
2170b57cec5SDimitry Andric             LLVM_DEBUG(MI.dump());
2180b57cec5SDimitry Andric             if (DefMIToErase) {
2190b57cec5SDimitry Andric               InstrsToErase.push_back(DefMIToErase);
2200b57cec5SDimitry Andric             }
2210b57cec5SDimitry Andric           }
222*480093f4SDimitry Andric           if (TII->foldFrameOffset(MI)) {
223*480093f4SDimitry Andric             Changed = true;
224*480093f4SDimitry Andric             NumFrameOffFoldInPreEmit++;
225*480093f4SDimitry Andric             LLVM_DEBUG(dbgs() << "Frame offset folding by using index form: ");
226*480093f4SDimitry Andric             LLVM_DEBUG(MI.dump());
227*480093f4SDimitry Andric           }
2280b57cec5SDimitry Andric         }
2290b57cec5SDimitry Andric 
2300b57cec5SDimitry Andric         // Eliminate conditional branch based on a constant CR bit by
2310b57cec5SDimitry Andric         // CRSET or CRUNSET. We eliminate the conditional branch or
2320b57cec5SDimitry Andric         // convert it into an unconditional branch. Also, if the CR bit
2330b57cec5SDimitry Andric         // is not used by other instructions, we eliminate CRSET as well.
2340b57cec5SDimitry Andric         auto I = MBB.getFirstInstrTerminator();
2350b57cec5SDimitry Andric         if (I == MBB.instr_end())
2360b57cec5SDimitry Andric           continue;
2370b57cec5SDimitry Andric         MachineInstr *Br = &*I;
2380b57cec5SDimitry Andric         if (Br->getOpcode() != PPC::BC && Br->getOpcode() != PPC::BCn)
2390b57cec5SDimitry Andric           continue;
2400b57cec5SDimitry Andric         MachineInstr *CRSetMI = nullptr;
2418bcb0991SDimitry Andric         Register CRBit = Br->getOperand(0).getReg();
2420b57cec5SDimitry Andric         unsigned CRReg = getCRFromCRBit(CRBit);
2430b57cec5SDimitry Andric         bool SeenUse = false;
2440b57cec5SDimitry Andric         MachineBasicBlock::reverse_iterator It = Br, Er = MBB.rend();
2450b57cec5SDimitry Andric         for (It++; It != Er; It++) {
2460b57cec5SDimitry Andric           if (It->modifiesRegister(CRBit, TRI)) {
2470b57cec5SDimitry Andric             if ((It->getOpcode() == PPC::CRUNSET ||
2480b57cec5SDimitry Andric                  It->getOpcode() == PPC::CRSET) &&
2490b57cec5SDimitry Andric                 It->getOperand(0).getReg() == CRBit)
2500b57cec5SDimitry Andric               CRSetMI = &*It;
2510b57cec5SDimitry Andric             break;
2520b57cec5SDimitry Andric           }
2530b57cec5SDimitry Andric           if (It->readsRegister(CRBit, TRI))
2540b57cec5SDimitry Andric             SeenUse = true;
2550b57cec5SDimitry Andric         }
2560b57cec5SDimitry Andric         if (!CRSetMI) continue;
2570b57cec5SDimitry Andric 
2580b57cec5SDimitry Andric         unsigned CRSetOp = CRSetMI->getOpcode();
2590b57cec5SDimitry Andric         if ((Br->getOpcode() == PPC::BCn && CRSetOp == PPC::CRSET) ||
2600b57cec5SDimitry Andric             (Br->getOpcode() == PPC::BC  && CRSetOp == PPC::CRUNSET)) {
2610b57cec5SDimitry Andric           // Remove this branch since it cannot be taken.
2620b57cec5SDimitry Andric           InstrsToErase.push_back(Br);
2630b57cec5SDimitry Andric           MBB.removeSuccessor(Br->getOperand(1).getMBB());
2640b57cec5SDimitry Andric         }
2650b57cec5SDimitry Andric         else {
2660b57cec5SDimitry Andric           // This conditional branch is always taken. So, remove all branches
2670b57cec5SDimitry Andric           // and insert an unconditional branch to the destination of this.
2680b57cec5SDimitry Andric           MachineBasicBlock::iterator It = Br, Er = MBB.end();
2690b57cec5SDimitry Andric           for (; It != Er; It++) {
2700b57cec5SDimitry Andric             if (It->isDebugInstr()) continue;
2710b57cec5SDimitry Andric             assert(It->isTerminator() && "Non-terminator after a terminator");
2720b57cec5SDimitry Andric             InstrsToErase.push_back(&*It);
2730b57cec5SDimitry Andric           }
2740b57cec5SDimitry Andric           if (!MBB.isLayoutSuccessor(Br->getOperand(1).getMBB())) {
2750b57cec5SDimitry Andric             ArrayRef<MachineOperand> NoCond;
2760b57cec5SDimitry Andric             TII->insertBranch(MBB, Br->getOperand(1).getMBB(), nullptr,
2770b57cec5SDimitry Andric                               NoCond, Br->getDebugLoc());
2780b57cec5SDimitry Andric           }
2790b57cec5SDimitry Andric           for (auto &Succ : MBB.successors())
2800b57cec5SDimitry Andric             if (Succ != Br->getOperand(1).getMBB()) {
2810b57cec5SDimitry Andric               MBB.removeSuccessor(Succ);
2820b57cec5SDimitry Andric               break;
2830b57cec5SDimitry Andric             }
2840b57cec5SDimitry Andric         }
2850b57cec5SDimitry Andric 
2860b57cec5SDimitry Andric         // If the CRBit is not used by another instruction, we can eliminate
2870b57cec5SDimitry Andric         // CRSET/CRUNSET instruction.
2880b57cec5SDimitry Andric         if (!SeenUse) {
2890b57cec5SDimitry Andric           // We need to check use of the CRBit in successors.
2900b57cec5SDimitry Andric           for (auto &SuccMBB : MBB.successors())
2910b57cec5SDimitry Andric             if (SuccMBB->isLiveIn(CRBit) || SuccMBB->isLiveIn(CRReg)) {
2920b57cec5SDimitry Andric               SeenUse = true;
2930b57cec5SDimitry Andric               break;
2940b57cec5SDimitry Andric             }
2950b57cec5SDimitry Andric           if (!SeenUse)
2960b57cec5SDimitry Andric             InstrsToErase.push_back(CRSetMI);
2970b57cec5SDimitry Andric         }
2980b57cec5SDimitry Andric       }
2990b57cec5SDimitry Andric       for (MachineInstr *MI : InstrsToErase) {
3000b57cec5SDimitry Andric         LLVM_DEBUG(dbgs() << "PPC pre-emit peephole: erasing instruction: ");
3010b57cec5SDimitry Andric         LLVM_DEBUG(MI->dump());
3020b57cec5SDimitry Andric         MI->eraseFromParent();
3030b57cec5SDimitry Andric         NumRemovedInPreEmit++;
3040b57cec5SDimitry Andric       }
3050b57cec5SDimitry Andric       return Changed;
3060b57cec5SDimitry Andric     }
3070b57cec5SDimitry Andric   };
3080b57cec5SDimitry Andric }
3090b57cec5SDimitry Andric 
3100b57cec5SDimitry Andric INITIALIZE_PASS(PPCPreEmitPeephole, DEBUG_TYPE, "PowerPC Pre-Emit Peephole",
3110b57cec5SDimitry Andric                 false, false)
3120b57cec5SDimitry Andric char PPCPreEmitPeephole::ID = 0;
3130b57cec5SDimitry Andric 
3140b57cec5SDimitry Andric FunctionPass *llvm::createPPCPreEmitPeepholePass() {
3150b57cec5SDimitry Andric   return new PPCPreEmitPeephole();
3160b57cec5SDimitry Andric }
317