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"); 38480093f4SDimitry Andric STATISTIC(NumFrameOffFoldInPreEmit, 39480093f4SDimitry 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); 112*5ffd83dbSDimitry Andric 113*5ffd83dbSDimitry Andric // We can't just clear implicit kills, so if we encounter one, stop 114*5ffd83dbSDimitry Andric // looking further. 115*5ffd83dbSDimitry Andric if (KillIdx != -1 && AfterBBI->getOperand(KillIdx).isImplicit()) { 116*5ffd83dbSDimitry Andric LLVM_DEBUG(dbgs() 117*5ffd83dbSDimitry Andric << "Encountered an implicit kill, cannot proceed: "); 118*5ffd83dbSDimitry Andric LLVM_DEBUG(AfterBBI->dump()); 119*5ffd83dbSDimitry Andric break; 120*5ffd83dbSDimitry Andric } 121*5ffd83dbSDimitry Andric 1228bcb0991SDimitry Andric if (KillIdx != -1) { 1238bcb0991SDimitry Andric assert(!DeadOrKillToUnset && "Shouldn't kill same register twice"); 1248bcb0991SDimitry Andric DeadOrKillToUnset = &AfterBBI->getOperand(KillIdx); 1258bcb0991SDimitry Andric LLVM_DEBUG(dbgs() 1268bcb0991SDimitry Andric << " Kill flag of " << *DeadOrKillToUnset << " from " 1278bcb0991SDimitry Andric << *AfterBBI << " is a unsetting candidate\n"); 1288bcb0991SDimitry Andric } 1298bcb0991SDimitry Andric 1308bcb0991SDimitry Andric if (!AfterBBI->modifiesRegister(Reg, TRI)) 1318bcb0991SDimitry Andric continue; 1328bcb0991SDimitry Andric // Finish scanning because Reg is overwritten by a non-load 1338bcb0991SDimitry Andric // instruction. 1348bcb0991SDimitry Andric if (AfterBBI->getOpcode() != Opc) 1358bcb0991SDimitry Andric break; 1368bcb0991SDimitry Andric assert(AfterBBI->getOperand(0).isReg() && 1378bcb0991SDimitry Andric "Expected a register for the first operand"); 1388bcb0991SDimitry Andric // Finish scanning because Reg is overwritten by a relocation or a 1398bcb0991SDimitry Andric // different value. 1408bcb0991SDimitry Andric if (!AfterBBI->getOperand(1).isImm() || 1418bcb0991SDimitry Andric AfterBBI->getOperand(1).getImm() != Imm) 1428bcb0991SDimitry Andric break; 1438bcb0991SDimitry Andric 1448bcb0991SDimitry Andric // It loads same immediate value to the same Reg, which is redundant. 1458bcb0991SDimitry Andric // We would unset kill flag in previous Reg usage to extend live range 1468bcb0991SDimitry Andric // of Reg first, then remove the redundancy. 1478bcb0991SDimitry Andric if (DeadOrKillToUnset) { 1488bcb0991SDimitry Andric LLVM_DEBUG(dbgs() 1498bcb0991SDimitry Andric << " Unset dead/kill flag of " << *DeadOrKillToUnset 1508bcb0991SDimitry Andric << " from " << *DeadOrKillToUnset->getParent()); 1518bcb0991SDimitry Andric if (DeadOrKillToUnset->isDef()) 1528bcb0991SDimitry Andric DeadOrKillToUnset->setIsDead(false); 1538bcb0991SDimitry Andric else 1548bcb0991SDimitry Andric DeadOrKillToUnset->setIsKill(false); 1558bcb0991SDimitry Andric } 1568bcb0991SDimitry Andric DeadOrKillToUnset = 1578bcb0991SDimitry Andric AfterBBI->findRegisterDefOperand(Reg, true, true, TRI); 1588bcb0991SDimitry Andric if (DeadOrKillToUnset) 1598bcb0991SDimitry Andric LLVM_DEBUG(dbgs() 1608bcb0991SDimitry Andric << " Dead flag of " << *DeadOrKillToUnset << " from " 1618bcb0991SDimitry Andric << *AfterBBI << " is a unsetting candidate\n"); 1628bcb0991SDimitry Andric InstrsToErase.insert(&*AfterBBI); 1638bcb0991SDimitry Andric LLVM_DEBUG(dbgs() << " Remove redundant load immediate: "; 1648bcb0991SDimitry Andric AfterBBI->dump()); 1658bcb0991SDimitry Andric } 1668bcb0991SDimitry Andric } 1678bcb0991SDimitry Andric 1688bcb0991SDimitry Andric for (MachineInstr *MI : InstrsToErase) { 1698bcb0991SDimitry Andric MI->eraseFromParent(); 1708bcb0991SDimitry Andric } 1718bcb0991SDimitry Andric NumRemovedInPreEmit += InstrsToErase.size(); 1728bcb0991SDimitry Andric return !InstrsToErase.empty(); 1738bcb0991SDimitry Andric } 1748bcb0991SDimitry Andric 1750b57cec5SDimitry Andric bool runOnMachineFunction(MachineFunction &MF) override { 176480093f4SDimitry Andric if (skipFunction(MF.getFunction()) || !RunPreEmitPeephole) { 177480093f4SDimitry Andric // Remove UNENCODED_NOP even when this pass is disabled. 178480093f4SDimitry Andric // This needs to be done unconditionally so we don't emit zeros 179480093f4SDimitry Andric // in the instruction stream. 180480093f4SDimitry Andric SmallVector<MachineInstr *, 4> InstrsToErase; 181480093f4SDimitry Andric for (MachineBasicBlock &MBB : MF) 182480093f4SDimitry Andric for (MachineInstr &MI : MBB) 183480093f4SDimitry Andric if (MI.getOpcode() == PPC::UNENCODED_NOP) 184480093f4SDimitry Andric InstrsToErase.push_back(&MI); 185480093f4SDimitry Andric for (MachineInstr *MI : InstrsToErase) 186480093f4SDimitry Andric MI->eraseFromParent(); 1870b57cec5SDimitry Andric return false; 188480093f4SDimitry Andric } 1890b57cec5SDimitry Andric bool Changed = false; 1900b57cec5SDimitry Andric const PPCInstrInfo *TII = MF.getSubtarget<PPCSubtarget>().getInstrInfo(); 1910b57cec5SDimitry Andric const TargetRegisterInfo *TRI = MF.getSubtarget().getRegisterInfo(); 1920b57cec5SDimitry Andric SmallVector<MachineInstr *, 4> InstrsToErase; 1930b57cec5SDimitry Andric for (MachineBasicBlock &MBB : MF) { 1948bcb0991SDimitry Andric Changed |= removeRedundantLIs(MBB, TRI); 1950b57cec5SDimitry Andric for (MachineInstr &MI : MBB) { 1960b57cec5SDimitry Andric unsigned Opc = MI.getOpcode(); 197480093f4SDimitry Andric if (Opc == PPC::UNENCODED_NOP) { 198480093f4SDimitry Andric InstrsToErase.push_back(&MI); 199480093f4SDimitry Andric continue; 200480093f4SDimitry Andric } 2010b57cec5SDimitry Andric // Detect self copies - these can result from running AADB. 2020b57cec5SDimitry Andric if (PPCInstrInfo::isSameClassPhysRegCopy(Opc)) { 2030b57cec5SDimitry Andric const MCInstrDesc &MCID = TII->get(Opc); 2040b57cec5SDimitry Andric if (MCID.getNumOperands() == 3 && 2050b57cec5SDimitry Andric MI.getOperand(0).getReg() == MI.getOperand(1).getReg() && 2060b57cec5SDimitry Andric MI.getOperand(0).getReg() == MI.getOperand(2).getReg()) { 2070b57cec5SDimitry Andric NumberOfSelfCopies++; 2080b57cec5SDimitry Andric LLVM_DEBUG(dbgs() << "Deleting self-copy instruction: "); 2090b57cec5SDimitry Andric LLVM_DEBUG(MI.dump()); 2100b57cec5SDimitry Andric InstrsToErase.push_back(&MI); 2110b57cec5SDimitry Andric continue; 2120b57cec5SDimitry Andric } 2130b57cec5SDimitry Andric else if (MCID.getNumOperands() == 2 && 2140b57cec5SDimitry Andric MI.getOperand(0).getReg() == MI.getOperand(1).getReg()) { 2150b57cec5SDimitry Andric NumberOfSelfCopies++; 2160b57cec5SDimitry Andric LLVM_DEBUG(dbgs() << "Deleting self-copy instruction: "); 2170b57cec5SDimitry Andric LLVM_DEBUG(MI.dump()); 2180b57cec5SDimitry Andric InstrsToErase.push_back(&MI); 2190b57cec5SDimitry Andric continue; 2200b57cec5SDimitry Andric } 2210b57cec5SDimitry Andric } 2220b57cec5SDimitry Andric MachineInstr *DefMIToErase = nullptr; 2230b57cec5SDimitry Andric if (TII->convertToImmediateForm(MI, &DefMIToErase)) { 2240b57cec5SDimitry Andric Changed = true; 2250b57cec5SDimitry Andric NumRRConvertedInPreEmit++; 2260b57cec5SDimitry Andric LLVM_DEBUG(dbgs() << "Converted instruction to imm form: "); 2270b57cec5SDimitry Andric LLVM_DEBUG(MI.dump()); 2280b57cec5SDimitry Andric if (DefMIToErase) { 2290b57cec5SDimitry Andric InstrsToErase.push_back(DefMIToErase); 2300b57cec5SDimitry Andric } 2310b57cec5SDimitry Andric } 232480093f4SDimitry Andric if (TII->foldFrameOffset(MI)) { 233480093f4SDimitry Andric Changed = true; 234480093f4SDimitry Andric NumFrameOffFoldInPreEmit++; 235480093f4SDimitry Andric LLVM_DEBUG(dbgs() << "Frame offset folding by using index form: "); 236480093f4SDimitry Andric LLVM_DEBUG(MI.dump()); 237480093f4SDimitry Andric } 2380b57cec5SDimitry Andric } 2390b57cec5SDimitry Andric 2400b57cec5SDimitry Andric // Eliminate conditional branch based on a constant CR bit by 2410b57cec5SDimitry Andric // CRSET or CRUNSET. We eliminate the conditional branch or 2420b57cec5SDimitry Andric // convert it into an unconditional branch. Also, if the CR bit 2430b57cec5SDimitry Andric // is not used by other instructions, we eliminate CRSET as well. 2440b57cec5SDimitry Andric auto I = MBB.getFirstInstrTerminator(); 2450b57cec5SDimitry Andric if (I == MBB.instr_end()) 2460b57cec5SDimitry Andric continue; 2470b57cec5SDimitry Andric MachineInstr *Br = &*I; 2480b57cec5SDimitry Andric if (Br->getOpcode() != PPC::BC && Br->getOpcode() != PPC::BCn) 2490b57cec5SDimitry Andric continue; 2500b57cec5SDimitry Andric MachineInstr *CRSetMI = nullptr; 2518bcb0991SDimitry Andric Register CRBit = Br->getOperand(0).getReg(); 2520b57cec5SDimitry Andric unsigned CRReg = getCRFromCRBit(CRBit); 2530b57cec5SDimitry Andric bool SeenUse = false; 2540b57cec5SDimitry Andric MachineBasicBlock::reverse_iterator It = Br, Er = MBB.rend(); 2550b57cec5SDimitry Andric for (It++; It != Er; It++) { 2560b57cec5SDimitry Andric if (It->modifiesRegister(CRBit, TRI)) { 2570b57cec5SDimitry Andric if ((It->getOpcode() == PPC::CRUNSET || 2580b57cec5SDimitry Andric It->getOpcode() == PPC::CRSET) && 2590b57cec5SDimitry Andric It->getOperand(0).getReg() == CRBit) 2600b57cec5SDimitry Andric CRSetMI = &*It; 2610b57cec5SDimitry Andric break; 2620b57cec5SDimitry Andric } 2630b57cec5SDimitry Andric if (It->readsRegister(CRBit, TRI)) 2640b57cec5SDimitry Andric SeenUse = true; 2650b57cec5SDimitry Andric } 2660b57cec5SDimitry Andric if (!CRSetMI) continue; 2670b57cec5SDimitry Andric 2680b57cec5SDimitry Andric unsigned CRSetOp = CRSetMI->getOpcode(); 2690b57cec5SDimitry Andric if ((Br->getOpcode() == PPC::BCn && CRSetOp == PPC::CRSET) || 2700b57cec5SDimitry Andric (Br->getOpcode() == PPC::BC && CRSetOp == PPC::CRUNSET)) { 2710b57cec5SDimitry Andric // Remove this branch since it cannot be taken. 2720b57cec5SDimitry Andric InstrsToErase.push_back(Br); 2730b57cec5SDimitry Andric MBB.removeSuccessor(Br->getOperand(1).getMBB()); 2740b57cec5SDimitry Andric } 2750b57cec5SDimitry Andric else { 2760b57cec5SDimitry Andric // This conditional branch is always taken. So, remove all branches 2770b57cec5SDimitry Andric // and insert an unconditional branch to the destination of this. 2780b57cec5SDimitry Andric MachineBasicBlock::iterator It = Br, Er = MBB.end(); 2790b57cec5SDimitry Andric for (; It != Er; It++) { 2800b57cec5SDimitry Andric if (It->isDebugInstr()) continue; 2810b57cec5SDimitry Andric assert(It->isTerminator() && "Non-terminator after a terminator"); 2820b57cec5SDimitry Andric InstrsToErase.push_back(&*It); 2830b57cec5SDimitry Andric } 2840b57cec5SDimitry Andric if (!MBB.isLayoutSuccessor(Br->getOperand(1).getMBB())) { 2850b57cec5SDimitry Andric ArrayRef<MachineOperand> NoCond; 2860b57cec5SDimitry Andric TII->insertBranch(MBB, Br->getOperand(1).getMBB(), nullptr, 2870b57cec5SDimitry Andric NoCond, Br->getDebugLoc()); 2880b57cec5SDimitry Andric } 2890b57cec5SDimitry Andric for (auto &Succ : MBB.successors()) 2900b57cec5SDimitry Andric if (Succ != Br->getOperand(1).getMBB()) { 2910b57cec5SDimitry Andric MBB.removeSuccessor(Succ); 2920b57cec5SDimitry Andric break; 2930b57cec5SDimitry Andric } 2940b57cec5SDimitry Andric } 2950b57cec5SDimitry Andric 2960b57cec5SDimitry Andric // If the CRBit is not used by another instruction, we can eliminate 2970b57cec5SDimitry Andric // CRSET/CRUNSET instruction. 2980b57cec5SDimitry Andric if (!SeenUse) { 2990b57cec5SDimitry Andric // We need to check use of the CRBit in successors. 3000b57cec5SDimitry Andric for (auto &SuccMBB : MBB.successors()) 3010b57cec5SDimitry Andric if (SuccMBB->isLiveIn(CRBit) || SuccMBB->isLiveIn(CRReg)) { 3020b57cec5SDimitry Andric SeenUse = true; 3030b57cec5SDimitry Andric break; 3040b57cec5SDimitry Andric } 3050b57cec5SDimitry Andric if (!SeenUse) 3060b57cec5SDimitry Andric InstrsToErase.push_back(CRSetMI); 3070b57cec5SDimitry Andric } 3080b57cec5SDimitry Andric } 3090b57cec5SDimitry Andric for (MachineInstr *MI : InstrsToErase) { 3100b57cec5SDimitry Andric LLVM_DEBUG(dbgs() << "PPC pre-emit peephole: erasing instruction: "); 3110b57cec5SDimitry Andric LLVM_DEBUG(MI->dump()); 3120b57cec5SDimitry Andric MI->eraseFromParent(); 3130b57cec5SDimitry Andric NumRemovedInPreEmit++; 3140b57cec5SDimitry Andric } 3150b57cec5SDimitry Andric return Changed; 3160b57cec5SDimitry Andric } 3170b57cec5SDimitry Andric }; 3180b57cec5SDimitry Andric } 3190b57cec5SDimitry Andric 3200b57cec5SDimitry Andric INITIALIZE_PASS(PPCPreEmitPeephole, DEBUG_TYPE, "PowerPC Pre-Emit Peephole", 3210b57cec5SDimitry Andric false, false) 3220b57cec5SDimitry Andric char PPCPreEmitPeephole::ID = 0; 3230b57cec5SDimitry Andric 3240b57cec5SDimitry Andric FunctionPass *llvm::createPPCPreEmitPeepholePass() { 3250b57cec5SDimitry Andric return new PPCPreEmitPeephole(); 3260b57cec5SDimitry Andric } 327