From 48e60794783d8fa6a5dd52a74ebfc1f133c3480c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 13 Aug 2003 02:38:16 +0000 Subject: [PATCH] Adjust files for move of mapping info stuff into the Sparc directory git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7802 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/SparcV9/MappingInfo.cpp | 3 +-- lib/Target/SparcV9/MappingInfo.h | 19 +++++++++---------- lib/Target/SparcV9/SparcV9Internals.h | 7 ++++++- lib/Target/SparcV9/SparcV9StackSlots.cpp | 3 +-- lib/Target/SparcV9/SparcV9TargetMachine.cpp | 7 +++---- 5 files changed, 20 insertions(+), 19 deletions(-) diff --git a/lib/Target/SparcV9/MappingInfo.cpp b/lib/Target/SparcV9/MappingInfo.cpp index d6910b49939..b681bfca4e2 100644 --- a/lib/Target/SparcV9/MappingInfo.cpp +++ b/lib/Target/SparcV9/MappingInfo.cpp @@ -35,10 +35,9 @@ // //===--------------------------------------------------------------------===// -#include "llvm/Reoptimizer/Mapping/MappingInfo.h" +#include "MappingInfo.h" #include "llvm/Pass.h" #include "llvm/Module.h" -#include "llvm/CodeGen/MachineInstr.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineCodeForInstruction.h" diff --git a/lib/Target/SparcV9/MappingInfo.h b/lib/Target/SparcV9/MappingInfo.h index c3177dec370..aa07bfbf71b 100644 --- a/lib/Target/SparcV9/MappingInfo.h +++ b/lib/Target/SparcV9/MappingInfo.h @@ -1,12 +1,12 @@ -//===- llvm/Reoptimizer/Mapping/MappingInfo.h ------------------*- C++ -*--=//// +//===- lib/Target/Sparc/MappingInfo.h ---------------------------*- C++ -*-===// // // Data structures to support the Reoptimizer's Instruction-to-MachineInstr // mapping information gatherer. // //===----------------------------------------------------------------------===// -#ifndef LLVM_REOPTIMIZER_MAPPING_MAPPINGINFO_H -#define LLVM_REOPTIMIZER_MAPPING_MAPPINGINFO_H +#ifndef MAPPINGINFO_H +#define MAPPINGINFO_H #include #include @@ -16,9 +16,8 @@ class Pass; Pass *getMappingInfoCollector(std::ostream &out); class MappingInfo { - class byteVector : public std::vector { - public: - void dumpAssembly (std::ostream &Out); + struct byteVector : public std::vector { + void dumpAssembly (std::ostream &Out); }; std::string comment; std::string symbolPrefix; @@ -26,11 +25,11 @@ class MappingInfo { byteVector bytes; public: void outByte (unsigned char b) { bytes.push_back (b); } - MappingInfo (std::string _comment, std::string _symbolPrefix, - unsigned _functionNumber) : comment(_comment), - symbolPrefix(_symbolPrefix), functionNumber(_functionNumber) { } + MappingInfo (std::string Comment, std::string SymbolPrefix, + unsigned FunctionNumber) : comment(Comment), + symbolPrefix(SymbolPrefix), functionNumber(FunctionNumber) {} void dumpAssembly (std::ostream &Out); - unsigned char *getBytes (unsigned int &length) { + unsigned char *getBytes (unsigned &length) { length = bytes.size(); return &bytes[0]; } }; diff --git a/lib/Target/SparcV9/SparcV9Internals.h b/lib/Target/SparcV9/SparcV9Internals.h index e43b0f3867f..4f50037a8c4 100644 --- a/lib/Target/SparcV9/SparcV9Internals.h +++ b/lib/Target/SparcV9/SparcV9Internals.h @@ -650,8 +650,13 @@ struct UltraSparcOptInfo: public TargetOptInfo { /// instructions. This pass enables the usage of the JIT register allocator(s). Pass *createAddRegNumToValuesPass(); +/// createStackSlotsPass - External interface to stack-slots pass that enters 2 +/// empty slots at the top of each function stack +Pass *createStackSlotsPass(const TargetMachine &TM); + + //--------------------------------------------------------------------------- -// class UltraSparcMachine +// class UltraSparc // // Purpose: // Primary interface to machine description for the UltraSPARC. diff --git a/lib/Target/SparcV9/SparcV9StackSlots.cpp b/lib/Target/SparcV9/SparcV9StackSlots.cpp index 1ff54b9c12c..eff679cb4ea 100644 --- a/lib/Target/SparcV9/SparcV9StackSlots.cpp +++ b/lib/Target/SparcV9/SparcV9StackSlots.cpp @@ -6,8 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "llvm/CodeGen/StackSlots.h" -#include "llvm/Target/TargetMachine.h" +#include "SparcInternals.h" #include "llvm/Constant.h" #include "llvm/Function.h" #include "llvm/DerivedTypes.h" diff --git a/lib/Target/SparcV9/SparcV9TargetMachine.cpp b/lib/Target/SparcV9/SparcV9TargetMachine.cpp index 71e32391806..ecab5ca4935 100644 --- a/lib/Target/SparcV9/SparcV9TargetMachine.cpp +++ b/lib/Target/SparcV9/SparcV9TargetMachine.cpp @@ -6,22 +6,21 @@ //===----------------------------------------------------------------------===// #include "SparcInternals.h" -#include "llvm/Target/TargetMachineImpls.h" +#include "MappingInfo.h" #include "llvm/Function.h" #include "llvm/PassManager.h" +#include "llvm/Assembly/PrintModulePass.h" #include "llvm/Transforms/Scalar.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineFunctionInfo.h" #include "llvm/CodeGen/PreSelection.h" -#include "llvm/CodeGen/StackSlots.h" #include "llvm/CodeGen/PeepholeOpts.h" #include "llvm/CodeGen/InstrSelection.h" #include "llvm/CodeGen/InstrScheduling.h" #include "llvm/CodeGen/RegisterAllocation.h" #include "llvm/CodeGen/MachineCodeForInstruction.h" -#include "llvm/Reoptimizer/Mapping/MappingInfo.h" +#include "llvm/Target/TargetMachineImpls.h" #include "Support/CommandLine.h" -#include "llvm/Assembly/PrintModulePass.h" static const unsigned ImplicitRegUseList[] = { 0 }; /* not used yet */ // Build the MachineInstruction Description Array...