//
//===--------------------------------------------------------------------===//
-#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"
-//===- 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 <iosfwd>
#include <vector>
Pass *getMappingInfoCollector(std::ostream &out);
class MappingInfo {
- class byteVector : public std::vector <unsigned char> {
- public:
- void dumpAssembly (std::ostream &Out);
+ struct byteVector : public std::vector <unsigned char> {
+ void dumpAssembly (std::ostream &Out);
};
std::string comment;
std::string symbolPrefix;
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];
}
};
/// 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.
//
//===----------------------------------------------------------------------===//
-#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"
//===----------------------------------------------------------------------===//
#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...