summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/SparcV8/DelaySlotFiller.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-02-05 06:33:29 +0000
committerChris Lattner <sabre@nondot.org>2006-02-05 06:33:29 +0000
commit25777c8c25900e6973e8bcea333f03e5cb006402 (patch)
tree65cce5f56c56e1b5b420ec608382012882fdf947 /llvm/lib/Target/SparcV8/DelaySlotFiller.cpp
parenta3e5b2c61c93d77253ead6b584125eb9144728f2 (diff)
downloadbcm5719-llvm-25777c8c25900e6973e8bcea333f03e5cb006402.tar.gz
bcm5719-llvm-25777c8c25900e6973e8bcea333f03e5cb006402.zip
Remove the SparcV8 backend. It has been renamed to be the Sparc backend.
llvm-svn: 25992
Diffstat (limited to 'llvm/lib/Target/SparcV8/DelaySlotFiller.cpp')
-rw-r--r--llvm/lib/Target/SparcV8/DelaySlotFiller.cpp73
1 files changed, 0 insertions, 73 deletions
diff --git a/llvm/lib/Target/SparcV8/DelaySlotFiller.cpp b/llvm/lib/Target/SparcV8/DelaySlotFiller.cpp
deleted file mode 100644
index 71dc022b9fd..00000000000
--- a/llvm/lib/Target/SparcV8/DelaySlotFiller.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-//===-- DelaySlotFiller.cpp - SparcV8 delay slot filler -------------------===//
-//
-// 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 is a simple local pass that fills delay slots with NOPs.
-//
-//===----------------------------------------------------------------------===//
-
-#include "SparcV8.h"
-#include "llvm/CodeGen/MachineFunctionPass.h"
-#include "llvm/CodeGen/MachineInstrBuilder.h"
-#include "llvm/Target/TargetMachine.h"
-#include "llvm/Target/TargetInstrInfo.h"
-#include "llvm/ADT/Statistic.h"
-
-using namespace llvm;
-
-namespace {
- Statistic<> FilledSlots ("delayslotfiller", "Num. of delay slots filled");
-
- struct Filler : public MachineFunctionPass {
- /// Target machine description which we query for reg. names, data
- /// layout, etc.
- ///
- TargetMachine &TM;
- const TargetInstrInfo *TII;
-
- Filler (TargetMachine &tm) : TM (tm), TII (tm.getInstrInfo ()) { }
-
- virtual const char *getPassName () const {
- return "SparcV8 Delay Slot Filler";
- }
-
- bool runOnMachineBasicBlock (MachineBasicBlock &MBB);
- bool runOnMachineFunction (MachineFunction &F) {
- bool Changed = false;
- for (MachineFunction::iterator FI = F.begin (), FE = F.end ();
- FI != FE; ++FI)
- Changed |= runOnMachineBasicBlock (*FI);
- return Changed;
- }
-
- };
-} // end of anonymous namespace
-
-/// createSparcV8DelaySlotFillerPass - Returns a pass that fills in delay
-/// slots in SparcV8 MachineFunctions
-///
-FunctionPass *llvm::createSparcV8DelaySlotFillerPass (TargetMachine &tm) {
- return new Filler (tm);
-}
-
-/// runOnMachineBasicBlock - Fill in delay slots for the given basic block.
-/// Currently, we fill delay slots with NOPs. We assume there is only one
-/// delay slot per delayed instruction.
-///
-bool Filler::runOnMachineBasicBlock (MachineBasicBlock &MBB) {
- bool Changed = false;
- for (MachineBasicBlock::iterator I = MBB.begin (); I != MBB.end (); ++I)
- if (TII->hasDelaySlot (I->getOpcode ())) {
- MachineBasicBlock::iterator J = I;
- ++J;
- BuildMI (MBB, J, V8::NOP, 0);
- ++FilledSlots;
- Changed = true;
- }
- return Changed;
-}
OpenPOWER on IntegriCloud