X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FTarget%2FSparc%2FDelaySlotFiller.cpp;h=aae5da8560056bcf6b405dfde9cff94817e9bf10;hb=de42e5c09b1e1aa597de7b3e09775e26a0f68aa6;hp=57eb1a1c9c808a3133876630e11e21e7a7d1dce1;hpb=3e15bf33e024b9df9e89351a165acfdb1dde51ed;p=oota-llvm.git diff --git a/lib/Target/Sparc/DelaySlotFiller.cpp b/lib/Target/Sparc/DelaySlotFiller.cpp index 57eb1a1c9c8..aae5da85600 100644 --- a/lib/Target/Sparc/DelaySlotFiller.cpp +++ b/lib/Target/Sparc/DelaySlotFiller.cpp @@ -2,8 +2,8 @@ // // The LLVM Compiler Infrastructure // -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // @@ -30,9 +30,9 @@ namespace { TargetMachine &TM; const TargetInstrInfo *TII; - static const char ID; + static char ID; Filler(TargetMachine &tm) - : MachineFunctionPass((intptr_t)&ID), TM(tm), TII(tm.getInstrInfo()) { } + : MachineFunctionPass(ID), TM(tm), TII(tm.getInstrInfo()) { } virtual const char *getPassName() const { return "SPARC Delay Slot Filler"; @@ -48,7 +48,7 @@ namespace { } }; - const char Filler::ID = 0; + char Filler::ID = 0; } // end of anonymous namespace /// createSparcDelaySlotFillerPass - Returns a pass that fills in delay @@ -65,10 +65,10 @@ FunctionPass *llvm::createSparcDelaySlotFillerPass(TargetMachine &tm) { bool Filler::runOnMachineBasicBlock(MachineBasicBlock &MBB) { bool Changed = false; for (MachineBasicBlock::iterator I = MBB.begin(); I != MBB.end(); ++I) - if (TII->hasDelaySlot(I->getOpcode())) { + if (I->getDesc().hasDelaySlot()) { MachineBasicBlock::iterator J = I; ++J; - BuildMI(MBB, J, TII->get(SP::NOP)); + BuildMI(MBB, J, DebugLoc(), TII->get(SP::NOP)); ++FilledSlots; Changed = true; }