aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-04-20 17:15:44 +0000
committerChris Lattner <sabre@nondot.org>2006-04-20 17:15:44 +0000
commit2706983c48d001b042896c4302c19a197b802fb6 (patch)
tree8fc153e045970f846d25e06dbfb6656ee2ee20e0
parent43c40ffa41e4a9f96fb8b47a3e7c0c42c5421fa6 (diff)
This target is no longer built. The ,v files now live in the reoptimizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27885 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/SparcV9/.cvsignore4
-rw-r--r--lib/Target/SparcV9/DecomposeMultiDimRefs.cpp137
-rw-r--r--lib/Target/SparcV9/EmitBytecodeToAssembly.cpp115
-rw-r--r--lib/Target/SparcV9/InstrSched/InstrScheduling.cpp1499
-rw-r--r--lib/Target/SparcV9/InstrSched/Makefile14
-rw-r--r--lib/Target/SparcV9/InstrSched/SchedGraph.cpp737
-rw-r--r--lib/Target/SparcV9/InstrSched/SchedGraph.h262
-rw-r--r--lib/Target/SparcV9/InstrSched/SchedGraphCommon.cpp180
-rw-r--r--lib/Target/SparcV9/InstrSched/SchedPriorities.cpp284
-rw-r--r--lib/Target/SparcV9/InstrSched/SchedPriorities.h221
-rw-r--r--lib/Target/SparcV9/InternalGlobalMapper.cpp82
-rw-r--r--lib/Target/SparcV9/LiveVar/BBLiveVar.cpp233
-rw-r--r--lib/Target/SparcV9/LiveVar/BBLiveVar.h90
-rw-r--r--lib/Target/SparcV9/LiveVar/FunctionLiveVarInfo.cpp323
-rw-r--r--lib/Target/SparcV9/LiveVar/FunctionLiveVarInfo.h111
-rw-r--r--lib/Target/SparcV9/LiveVar/Makefile14
-rw-r--r--lib/Target/SparcV9/LiveVar/ValueSet.cpp31
-rw-r--r--lib/Target/SparcV9/MachineCodeForInstruction.cpp116
-rw-r--r--lib/Target/SparcV9/MachineCodeForInstruction.h97
-rw-r--r--lib/Target/SparcV9/MachineFunctionInfo.cpp171
-rw-r--r--lib/Target/SparcV9/MachineFunctionInfo.h125
-rw-r--r--lib/Target/SparcV9/MachineInstrAnnot.h95
-rw-r--r--lib/Target/SparcV9/Makefile35
-rw-r--r--lib/Target/SparcV9/MappingInfo.cpp216
-rw-r--r--lib/Target/SparcV9/MappingInfo.h50
-rw-r--r--lib/Target/SparcV9/ModuloScheduling/DependenceAnalyzer.cpp305
-rw-r--r--lib/Target/SparcV9/ModuloScheduling/DependenceAnalyzer.h92
-rw-r--r--lib/Target/SparcV9/ModuloScheduling/MSSchedule.cpp309
-rw-r--r--lib/Target/SparcV9/ModuloScheduling/MSSchedule.h72
-rw-r--r--lib/Target/SparcV9/ModuloScheduling/MSScheduleSB.cpp325
-rw-r--r--lib/Target/SparcV9/ModuloScheduling/MSScheduleSB.h73
-rw-r--r--lib/Target/SparcV9/ModuloScheduling/MSchedGraph.cpp804
-rw-r--r--lib/Target/SparcV9/ModuloScheduling/MSchedGraph.h398
-rw-r--r--lib/Target/SparcV9/ModuloScheduling/MSchedGraphSB.cpp870
-rw-r--r--lib/Target/SparcV9/ModuloScheduling/MSchedGraphSB.h410
-rw-r--r--lib/Target/SparcV9/ModuloScheduling/Makefile14
-rw-r--r--lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.cpp2964
-rw-r--r--lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.h171
-rw-r--r--lib/Target/SparcV9/ModuloScheduling/ModuloSchedulingSuperBlock.cpp3155
-rw-r--r--lib/Target/SparcV9/ModuloScheduling/ModuloSchedulingSuperBlock.h192
-rw-r--r--lib/Target/SparcV9/RegAlloc/AllocInfo.h95
-rw-r--r--lib/Target/SparcV9/RegAlloc/IGNode.cpp62
-rw-r--r--lib/Target/SparcV9/RegAlloc/IGNode.h123
-rw-r--r--lib/Target/SparcV9/RegAlloc/InterferenceGraph.cpp248
-rw-r--r--lib/Target/SparcV9/RegAlloc/InterferenceGraph.h75
-rw-r--r--lib/Target/SparcV9/RegAlloc/LiveRange.h195
-rw-r--r--lib/Target/SparcV9/RegAlloc/LiveRangeInfo.cpp415
-rw-r--r--lib/Target/SparcV9/RegAlloc/LiveRangeInfo.h121
-rw-r--r--lib/Target/SparcV9/RegAlloc/Makefile14
-rw-r--r--lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp1366
-rw-r--r--lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h186
-rw-r--r--lib/Target/SparcV9/RegAlloc/RegAllocCommon.h32
-rw-r--r--lib/Target/SparcV9/RegAlloc/RegClass.cpp251
-rw-r--r--lib/Target/SparcV9/RegAlloc/RegClass.h147
-rw-r--r--lib/Target/SparcV9/SparcV9.burg.in349
-rw-r--r--lib/Target/SparcV9/SparcV9.td52
-rw-r--r--lib/Target/SparcV9/SparcV9AsmPrinter.cpp803
-rw-r--r--lib/Target/SparcV9/SparcV9BurgISel.cpp4615
-rw-r--r--lib/Target/SparcV9/SparcV9BurgISel.h56
-rw-r--r--lib/Target/SparcV9/SparcV9CodeEmitter.cpp304
-rw-r--r--lib/Target/SparcV9/SparcV9CodeEmitter.h87
-rw-r--r--lib/Target/SparcV9/SparcV9FrameInfo.cpp57
-rw-r--r--lib/Target/SparcV9/SparcV9FrameInfo.h117
-rw-r--r--lib/Target/SparcV9/SparcV9Instr.def547
-rw-r--r--lib/Target/SparcV9/SparcV9InstrForest.h134
-rw-r--r--lib/Target/SparcV9/SparcV9InstrInfo.h77
-rw-r--r--lib/Target/SparcV9/SparcV9InstrInfo.td777
-rw-r--r--lib/Target/SparcV9/SparcV9Internals.h133
-rw-r--r--lib/Target/SparcV9/SparcV9JITInfo.cpp355
-rw-r--r--lib/Target/SparcV9/SparcV9JITInfo.h62
-rw-r--r--lib/Target/SparcV9/SparcV9PeepholeOpts.cpp163
-rw-r--r--lib/Target/SparcV9/SparcV9PreSelection.cpp308
-rw-r--r--lib/Target/SparcV9/SparcV9PrologEpilogInserter.cpp184
-rw-r--r--lib/Target/SparcV9/SparcV9RegClassInfo.cpp397
-rw-r--r--lib/Target/SparcV9/SparcV9RegClassInfo.h224
-rw-r--r--lib/Target/SparcV9/SparcV9RegInfo.cpp973
-rw-r--r--lib/Target/SparcV9/SparcV9RegInfo.h381
-rw-r--r--lib/Target/SparcV9/SparcV9RegisterInfo.cpp333
-rw-r--r--lib/Target/SparcV9/SparcV9RegisterInfo.h117
-rw-r--r--lib/Target/SparcV9/SparcV9RegisterInfo.td49
-rw-r--r--lib/Target/SparcV9/SparcV9Relocations.h42
-rw-r--r--lib/Target/SparcV9/SparcV9SchedInfo.cpp761
-rw-r--r--lib/Target/SparcV9/SparcV9StackSlots.cpp52
-rw-r--r--lib/Target/SparcV9/SparcV9TargetMachine.cpp303
-rw-r--r--lib/Target/SparcV9/SparcV9TargetMachine.h57
-rw-r--r--lib/Target/SparcV9/SparcV9TmpInstr.cpp72
-rw-r--r--lib/Target/SparcV9/SparcV9TmpInstr.h64
-rw-r--r--lib/Target/SparcV9/SparcV9_F2.td71
-rw-r--r--lib/Target/SparcV9/SparcV9_F3.td267
-rw-r--r--lib/Target/SparcV9/SparcV9_F4.td141
90 files changed, 0 insertions, 32210 deletions
diff --git a/lib/Target/SparcV9/.cvsignore b/lib/Target/SparcV9/.cvsignore
deleted file mode 100644
index d3c6cd758a..0000000000
--- a/lib/Target/SparcV9/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-*.inc
-SparcV9.burg.in1
-SparcV9.burm
-SparcV9.burm.cpp
diff --git a/lib/Target/SparcV9/DecomposeMultiDimRefs.cpp b/lib/Target/SparcV9/DecomposeMultiDimRefs.cpp
deleted file mode 100644
index 50077c4191..0000000000
--- a/lib/Target/SparcV9/DecomposeMultiDimRefs.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-//===- llvm/Transforms/DecomposeMultiDimRefs.cpp - Lower array refs to 1D -===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-//
-// DecomposeMultiDimRefs - Convert multi-dimensional references consisting of
-// any combination of 2 or more array and structure indices into a sequence of
-// instructions (using getelementpr and cast) so that each instruction has at
-// most one index (except structure references, which need an extra leading
-// index of [0]).
-//
-//===----------------------------------------------------------------------===//
-
-#include "SparcV9Internals.h"
-#include "llvm/DerivedTypes.h"
-#include "llvm/Constants.h"
-#include "llvm/Constant.h"
-#include "llvm/Instructions.h"
-#include "llvm/BasicBlock.h"
-#include "llvm/Pass.h"
-#include "llvm/ADT/Statistic.h"
-#include "llvm/Support/Debug.h"
-#include <iostream>
-using namespace llvm;
-
-namespace {
- Statistic<> NumAdded("lowerrefs", "# of getelementptr instructions added");
-
- struct DecomposePass : public BasicBlockPass {
- virtual bool runOnBasicBlock(BasicBlock &BB);
- };
- RegisterOpt<DecomposePass> X("lowerrefs", "Decompose multi-dimensional "
- "structure/array references");
-}
-
-// runOnBasicBlock - Entry point for array or structure references with multiple
-// indices.
-//
-bool DecomposePass::runOnBasicBlock(BasicBlock &BB) {
- bool changed = false;
- for (BasicBlock::iterator II = BB.begin(); II != BB.end(); )
- if (GetElementPtrInst *gep = dyn_cast<GetElementPtrInst>(II++)) // pre-inc
- if (gep->getNumIndices() >= 2)
- changed |= DecomposeArrayRef(gep); // always modifies II
- return changed;
-}
-
-FunctionPass *llvm::createDecomposeMultiDimRefsPass() {
- return new DecomposePass();
-}
-
-static inline bool isZeroConst (Value *V) {
- return isa<Constant> (V) && (cast<Constant>(V)->isNullValue());
-}
-
-// Function: DecomposeArrayRef()
-//
-// For any GetElementPtrInst with 2 or more array and structure indices:
-//
-// opCode CompositeType* P, [uint|ubyte] idx1, ..., [uint|ubyte] idxN
-//
-// this function generates the following sequence:
-//
-// ptr1 = getElementPtr P, idx1
-// ptr2 = getElementPtr ptr1, 0, idx2
-// ...
-// ptrN-1 = getElementPtr ptrN-2, 0, idxN-1
-// opCode ptrN-1, 0, idxN // New-MAI
-//
-// Then it replaces the original instruction with this sequence,
-// and replaces all uses of the original instruction with New-MAI.
-// If idx1 is 0, we simply omit the first getElementPtr instruction.
-//
-// On return: BBI points to the instruction after the current one
-// (whether or not *BBI was replaced).
-//
-// Return value: true if the instruction was replaced; false otherwise.
-//
-bool llvm::DecomposeArrayRef(GetElementPtrInst* GEP) {
- if (GEP->getNumIndices() < 2
- || (GEP->getNumIndices() == 2
- && isZeroConst(GEP->getOperand(1)))) {
- DEBUG (std::cerr << "DecomposeArrayRef: Skipping " << *GEP);
- return false;
- } else {
- DEBUG (std::cerr << "DecomposeArrayRef: Decomposing " << *GEP);
- }
-
- BasicBlock *BB = GEP->getParent();
- Value *LastPtr = GEP->getPointerOperand();
- Instruction *InsertPoint = GEP->getNext(); // Insert before the next insn
-
- // Process each index except the last one.
- User::const_op_iterator OI = GEP->idx_begin(), OE = GEP->idx_end();
- for (; OI+1 != OE; ++OI) {
- std::vector<Value*> Indices;
-
- // If this is the first index and is 0, skip it and move on!
- if (OI == GEP->idx_begin()) {
- if (isZeroConst (*OI))
- continue;
- }
- else // Not the first index: include initial [0] to deref the last ptr
- Indices.push_back(Constant::getNullValue(Type::LongTy));
-
- Indices.push_back(*OI);
-
- // New Instruction: nextPtr1 = GetElementPtr LastPtr, Indices
- LastPtr = new GetElementPtrInst(LastPtr, Indices, "ptr1", InsertPoint);
- ++NumAdded;
- }
-
- // Now create a new instruction to replace the original one
- //
- const PointerType *PtrTy = cast<PointerType>(LastPtr->getType());
-
- // Get the final index vector, including an initial [0] as before.
- std::vector<Value*> Indices;
- Indices.push_back(Constant::getNullValue(Type::LongTy));
- Indices.push_back(*OI);
-
- Value *NewVal = new GetElementPtrInst(LastPtr, Indices, GEP->getName(),
- InsertPoint);
-
- // Replace all uses of the old instruction with the new
- GEP->replaceAllUsesWith(NewVal);
-
- // Now remove and delete the old instruction...
- BB->getInstList().erase(GEP);
-
- return true;
-}
-
diff --git a/lib/Target/SparcV9/EmitBytecodeToAssembly.cpp b/lib/Target/SparcV9/EmitBytecodeToAssembly.cpp
deleted file mode 100644
index eeb288a33d..0000000000
--- a/lib/Target/SparcV9/EmitBytecodeToAssembly.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-//===-- EmitBytecodeToAssembly.cpp - Emit bytecode to SparcV9 .s File ------==//
-//
-// 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 implements the pass that writes LLVM bytecode as data to a sparc
-// assembly file. The bytecode gets assembled into a special bytecode section
-// of the executable for use at runtime later.
-//
-//===----------------------------------------------------------------------===//
-
-#include "SparcV9Internals.h"
-#include "llvm/Pass.h"
-#include "llvm/Bytecode/Writer.h"
-#include <iostream>
-using namespace llvm;
-
-namespace {
-
- // sparcasmbuf - stream buf for encoding output bytes as .byte directives for
- // the sparc assembler.
- //
- class sparcasmbuf : public std::streambuf {
- std::ostream &BaseStr;
- public:
- typedef char char_type;
- typedef int int_type;
- typedef std::streampos pos_type;
- typedef std::streamoff off_type;
-
- sparcasmbuf(std::ostream &On) : BaseStr(On) {}
-
- virtual int_type overflow(int_type C) {
- if (C != EOF)
- BaseStr << "\t.byte " << C << "\n"; // Output C;
- return C;
- }
- };
-
-
- // osparcasmstream - Define an ostream implementation that uses a sparcasmbuf
- // as the underlying streambuf to write the data to. This streambuf formats
- // the output as .byte directives for sparc output.
- //
- class osparcasmstream : public std::ostream {
- sparcasmbuf sb;
- public:
- typedef char char_type;
- typedef int int_type;
- typedef std::streampos pos_type;
- typedef std::streamoff off_type;
-
- explicit osparcasmstream(std::ostream &On) : std::ostream(&sb), sb(On) { }
-
- sparcasmbuf *rdbuf() const {
- return const_cast<sparcasmbuf*>(&sb);
- }
- };
-
- static void writePrologue (std::ostream &Out, const std::string &comment,
- const std::string &symName) {
- // Prologue:
- // Output a comment describing the object.
- Out << "!" << comment << "\n";
- // Switch the current section to .rodata in the assembly output:
- Out << "\t.section \".rodata\"\n\t.align 8\n";
- // Output a global symbol naming the object:
- Out << "\t.global " << symName << "\n";
- Out << "\t.type " << symName << ",#object\n";
- Out << symName << ":\n";
- }
-
- static void writeEpilogue (std::ostream &Out, const std::string &symName) {
- // Epilogue:
- // Output a local symbol marking the end of the object:
- Out << ".end_" << symName << ":\n";
- // Output size directive giving the size of the object:
- Out << "\t.size " << symName << ", .end_" << symName << "-" << symName
- << "\n";
- }
-
- // SparcV9BytecodeWriter - Write bytecode out to a stream that is sparc'ified
- class SparcV9BytecodeWriter : public ModulePass {
- std::ostream &Out;
- public:
- SparcV9BytecodeWriter(std::ostream &out) : Out(out) {}
-
- const char *getPassName() const { return "Emit Bytecode to SparcV9 Assembly";}
-
- virtual bool runOnModule(Module &M) {
- // Write an object containing the bytecode to the SPARC assembly stream
- writePrologue (Out, "LLVM BYTECODE OUTPUT", "LLVMBytecode");
- osparcasmstream OS(Out);
- WriteBytecodeToFile(&M, OS);
- writeEpilogue (Out, "LLVMBytecode");
-
- // Write an object containing its length as an integer to the
- // SPARC assembly stream
- writePrologue (Out, "LLVM BYTECODE LENGTH", "llvm_length");
- Out <<"\t.word\t.end_LLVMBytecode-LLVMBytecode\n";
- writeEpilogue (Out, "llvm_length");
-
- return false;
- }
- };
-} // end anonymous namespace
-
-ModulePass *llvm::createBytecodeAsmPrinterPass(std::ostream &Out) {
- return new SparcV9BytecodeWriter(Out);
-}
-
diff --git a/lib/Target/SparcV9/InstrSched/InstrScheduling.cpp b/lib/Target/SparcV9/InstrSched/InstrScheduling.cpp
deleted file mode 100644
index e1228d089f..0000000000
--- a/lib/Target/SparcV9/InstrSched/InstrScheduling.cpp
+++ /dev/null
@@ -1,1499 +0,0 @@
-//===- InstrScheduling.cpp - Generic Instruction Scheduling support -------===//
-//
-// 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 implements the llvm/CodeGen/InstrScheduling.h interface, along with