From ec611ae0d0d3d761fd30b416a72d08a1538fafa9 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 llvm-svn: 7802 --- llvm/lib/Target/Sparc/MappingInfo.cpp | 3 +-- llvm/lib/Target/Sparc/MappingInfo.h | 19 +++++++++---------- llvm/lib/Target/Sparc/Sparc.cpp | 7 +++---- llvm/lib/Target/Sparc/SparcInternals.h | 7 ++++++- llvm/lib/Target/Sparc/StackSlots.cpp | 3 +-- 5 files changed, 20 insertions(+), 19 deletions(-) diff --git a/llvm/lib/Target/Sparc/MappingInfo.cpp b/llvm/lib/Target/Sparc/MappingInfo.cpp index d6910b499393..b681bfca4e25 100644 --- a/llvm/lib/Target/Sparc/MappingInfo.cpp +++ b/llvm/lib/Target/Sparc/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/llvm/lib/Target/Sparc/MappingInfo.h b/llvm/lib/Target/Sparc/MappingInfo.h index c3177dec3707..aa07bfbf71b4 100644 --- a/llvm/lib/Target/Sparc/MappingInfo.h +++ b/llvm/lib/Target/Sparc/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/llvm/lib/Target/Sparc/Sparc.cpp b/llvm/lib/Target/Sparc/Sparc.cpp index 71e323918060..ecab5ca49355 100644 --- a/llvm/lib/Target/Sparc/Sparc.cpp +++ b/llvm/lib/Target/Sparc/Sparc.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... diff --git a/llvm/lib/Target/Sparc/SparcInternals.h b/llvm/lib/Target/Sparc/SparcInternals.h index e43b0f3867fd..4f50037a8c4b 100644 --- a/llvm/lib/Target/Sparc/SparcInternals.h +++ b/llvm/lib/Target/Sparc/SparcInternals.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/llvm/lib/Target/Sparc/StackSlots.cpp b/llvm/lib/Target/Sparc/StackSlots.cpp index 1ff54b9c12c3..eff679cb4eaa 100644 --- a/llvm/lib/Target/Sparc/StackSlots.cpp +++ b/llvm/lib/Target/Sparc/StackSlots.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"