summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp6
-rw-r--r--llvm/lib/CodeGen/InstrSched/SchedGraph.cpp2
-rw-r--r--llvm/lib/CodeGen/MachineCodeForInstruction.cpp4
-rw-r--r--llvm/lib/CodeGen/MachineFunction.cpp2
-rw-r--r--llvm/lib/CodeGen/ModuloScheduling/ModuloScheduling.cpp3
-rw-r--r--llvm/lib/Target/SparcV9/MachineCodeForInstruction.h97
-rw-r--r--llvm/lib/Target/SparcV9/MachineFunctionInfo.h124
-rw-r--r--llvm/lib/Target/SparcV9/MappingInfo.cpp2
-rw-r--r--llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp4
-rw-r--r--llvm/lib/Target/SparcV9/SparcV9AsmPrinter.cpp2
-rw-r--r--llvm/lib/Target/SparcV9/SparcV9BurgISel.cpp3
-rw-r--r--llvm/lib/Target/SparcV9/SparcV9CodeEmitter.cpp2
-rw-r--r--llvm/lib/Target/SparcV9/SparcV9FrameInfo.cpp2
-rw-r--r--llvm/lib/Target/SparcV9/SparcV9PrologEpilogInserter.cpp4
-rw-r--r--llvm/lib/Target/SparcV9/SparcV9RegInfo.cpp4
-rw-r--r--llvm/lib/Target/SparcV9/SparcV9StackSlots.cpp8
-rw-r--r--llvm/lib/Target/SparcV9/SparcV9TargetMachine.cpp4
-rw-r--r--llvm/lib/Target/SparcV9/SparcV9TmpInstr.h2
18 files changed, 246 insertions, 29 deletions
diff --git a/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp b/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp
index 240bdefe94e..13b629c1b83 100644
--- a/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp
+++ b/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp
@@ -13,12 +13,12 @@
//===----------------------------------------------------------------------===//
#include "SchedPriorities.h"
+#include "llvm/BasicBlock.h"
#include "llvm/CodeGen/MachineInstr.h"
-#include "llvm/CodeGen/MachineCodeForInstruction.h"
#include "llvm/CodeGen/MachineFunction.h"
-#include "../../Target/SparcV9/LiveVar/FunctionLiveVarInfo.h"
#include "llvm/Target/TargetMachine.h"
-#include "llvm/BasicBlock.h"
+#include "../../Target/SparcV9/MachineCodeForInstruction.h"
+#include "../../Target/SparcV9/LiveVar/FunctionLiveVarInfo.h"
#include "Support/CommandLine.h"
#include <algorithm>
#include <iostream>
diff --git a/llvm/lib/CodeGen/InstrSched/SchedGraph.cpp b/llvm/lib/CodeGen/InstrSched/SchedGraph.cpp
index 4913c2bfd45..03771fe01d1 100644
--- a/llvm/lib/CodeGen/InstrSched/SchedGraph.cpp
+++ b/llvm/lib/CodeGen/InstrSched/SchedGraph.cpp
@@ -16,10 +16,10 @@
#include "SchedGraph.h"
#include "llvm/Function.h"
#include "llvm/Instructions.h"
-#include "llvm/CodeGen/MachineCodeForInstruction.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetMachine.h"
+#include "../../Target/SparcV9/MachineCodeForInstruction.h"
#include "../../Target/SparcV9/SparcV9RegInfo.h"
#include "Support/STLExtras.h"
#include <iostream>
diff --git a/llvm/lib/CodeGen/MachineCodeForInstruction.cpp b/llvm/lib/CodeGen/MachineCodeForInstruction.cpp
index c4b2ee5c9f6..dee1cb91206 100644
--- a/llvm/lib/CodeGen/MachineCodeForInstruction.cpp
+++ b/llvm/lib/CodeGen/MachineCodeForInstruction.cpp
@@ -22,13 +22,13 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/CodeGen/MachineCodeForInstruction.h"
+#include "../Target/SparcV9/MachineCodeForInstruction.h"
#include "llvm/Function.h"
#include "llvm/Instructions.h"
#include "llvm/Type.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineFunction.h"
-#include "llvm/CodeGen/MachineFunctionInfo.h"
+#include "../Target/SparcV9/MachineFunctionInfo.h"
#include "../Target/SparcV9/MachineInstrAnnot.h"
#include "../Target/SparcV9/SparcV9TmpInstr.h"
using namespace llvm;
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index c1699f04c6d..dd55a9ad735 100644
--- a/llvm/lib/CodeGen/MachineFunction.cpp
+++ b/llvm/lib/CodeGen/MachineFunction.cpp
@@ -16,7 +16,6 @@
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/SSARegMap.h"
-#include "llvm/CodeGen/MachineFunctionInfo.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineConstantPool.h"
#include "llvm/CodeGen/Passes.h"
@@ -25,6 +24,7 @@
#include "llvm/Function.h"
#include "llvm/Instructions.h"
#include "llvm/Type.h"
+#include "../Target/SparcV9/MachineFunctionInfo.h" // FIXME
#include "Support/LeakDetector.h"
#include "Support/GraphWriter.h"
#include <fstream>
diff --git a/llvm/lib/CodeGen/ModuloScheduling/ModuloScheduling.cpp b/llvm/lib/CodeGen/ModuloScheduling/ModuloScheduling.cpp
index 8af926c0e7d..8e11dd1da5c 100644
--- a/llvm/lib/CodeGen/ModuloScheduling/ModuloScheduling.cpp
+++ b/llvm/lib/CodeGen/ModuloScheduling/ModuloScheduling.cpp
@@ -18,10 +18,8 @@
#include "llvm/Instructions.h"
#include "llvm/Function.h"
#include "llvm/CodeGen/MachineFunction.h"
-#include "llvm/CodeGen/MachineCodeForInstruction.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/Support/CFG.h"
-#include "Support/Casting.h"
#include "llvm/Target/TargetSchedInfo.h"
#include "Support/Debug.h"
#include "Support/GraphWriter.h"
@@ -31,6 +29,7 @@
#include <sstream>
#include <utility>
#include <vector>
+#include "../../Target/SparcV9/MachineCodeForInstruction.h"
#include "../../Target/SparcV9/SparcV9TmpInstr.h"
#include "../../Target/SparcV9/SparcV9Internals.h"
#include "../../Target/SparcV9/SparcV9RegisterInfo.h"
diff --git a/llvm/lib/Target/SparcV9/MachineCodeForInstruction.h b/llvm/lib/Target/SparcV9/MachineCodeForInstruction.h
new file mode 100644
index 00000000000..fc36267cb9e
--- /dev/null
+++ b/llvm/lib/Target/SparcV9/MachineCodeForInstruction.h
@@ -0,0 +1,97 @@
+//===-- MachineCodeForInstruction.h -----------------------------*- C++ -*-===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+//
+// FIXME: This file is SparcV9 specific. Do not rely on this class for new
+// targets, it will go away in the future.
+//
+// Representation of the sequence of machine instructions created for a single
+// VM instruction. Additionally records information about hidden and implicit
+// values used by the machine instructions: about hidden values used by the
+// machine instructions:
+//
+// "Temporary values" are intermediate values used in the machine instruction
+// sequence, but not in the VM instruction Note that such values should be
+// treated as pure SSA values with no interpretation of their operands (i.e., as
+// a TmpInstruction object which actually represents such a value).
+//
+// (2) "Implicit uses" are values used in the VM instruction but not in
+// the machine instruction sequence
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef MACHINECODE_FOR_INSTRUCTION_H
+#define MACHINECODE_FOR_INSTRUCTION_H
+
+#include <vector>
+
+namespace llvm {
+
+class MachineInstr;
+class Instruction;
+class Value;
+class CallArgsDescriptor;
+
+ class MachineCodeForInstruction {
+ std::vector<Value*> tempVec; // used by m/c instr but not VM instr
+ std::vector<MachineInstr*> Contents; // the machine instr for this VM instr
+ CallArgsDescriptor* callArgsDesc; // only used for CALL instructions
+public:
+ MachineCodeForInstruction() : callArgsDesc(NULL) {}
+ ~MachineCodeForInstruction();
+
+ static MachineCodeForInstruction &get(const Instruction *I);
+ static void destroy(const Instruction *I);
+
+ // Access to underlying machine instructions...
+ typedef std::vector<MachineInstr*>::iterator iterator;
+ typedef std::vector<MachineInstr*>::const_iterator const_iterator;
+
+ unsigned size() const { return Contents.size(); }
+ bool empty() const { return Contents.empty(); }
+ MachineInstr *front() const { return Contents.front(); }
+ MachineInstr *back() const { return Contents.back(); }
+ MachineInstr *&operator[](unsigned i) { return Contents[i]; }
+ MachineInstr *operator[](unsigned i) const { return Contents[i]; }
+ void pop_back() { Contents.pop_back(); }
+
+ iterator begin() { return Contents.begin(); }
+ iterator end() { return Contents.end(); }
+ const_iterator begin() const { return Contents.begin(); }
+ const_iterator end() const { return Contents.end(); }
+
+ template<class InIt>
+ void insert(iterator where, InIt first, InIt last) {
+ Contents.insert(where, first, last);
+ }
+ iterator erase(iterator where) { return Contents.erase(where); }
+ iterator erase(iterator s, iterator e) { return Contents.erase(s, e); }
+
+
+ // dropAllReferences() - This function drops all references within
+ // temporary (hidden) instructions created in implementing the original
+ // VM intruction. This ensures there are no remaining "uses" within
+ // these hidden instructions, before the values of a method are freed.
+ //
+ void dropAllReferences();
+
+ const std::vector<Value*> &getTempValues() const { return tempVec; }
+ std::vector<Value*> &getTempValues() { return tempVec; }
+
+ MachineCodeForInstruction &addTemp(Value *tmp) {
+ tempVec.push_back(tmp);
+ return *this;
+ }
+
+ void setCallArgsDescriptor(CallArgsDescriptor* desc) { callArgsDesc = desc; }
+ CallArgsDescriptor* getCallArgsDescriptor() const { return callArgsDesc; }
+};
+
+} // End llvm namespace
+
+#endif
diff --git a/llvm/lib/Target/SparcV9/MachineFunctionInfo.h b/llvm/lib/Target/SparcV9/MachineFunctionInfo.h
new file mode 100644
index 00000000000..74a75e8e483
--- /dev/null
+++ b/llvm/lib/Target/SparcV9/MachineFunctionInfo.h
@@ -0,0 +1,124 @@
+//===-- MachineFunctionInfo.h -----------------------------------*- C++ -*-===//
+//
+// 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 class keeps track of information about the stack frame and about the
+// per-function constant pool.
+//
+// FIXME: This class is completely SparcV9 specific. Do not use it for future
+// targets. This file will be eliminated in future versions of LLVM.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef MACHINEFUNCTIONINFO_H
+#define MACHINEFUNCTIONINFO_H
+
+#include "MachineCodeForInstruction.h"
+#include "Support/HashExtras.h"
+#include "Support/hash_set"
+
+namespace llvm {
+
+class MachineFunction;
+class Constant;
+class Type;
+
+class MachineFunctionInfo {
+ hash_set<const Constant*> constantsForConstPool;
+ hash_map<const Value*, int> offsets;
+
+ unsigned staticStackSize;
+ unsigned automaticVarsSize;
+ unsigned regSpillsSize;
+ unsigned maxOptionalArgsSize;
+ unsigned maxOptionalNumArgs;
+ unsigned currentTmpValuesSize;
+ unsigned maxTmpValuesSize;
+ bool compiledAsLeaf;
+ bool spillsAreaFrozen;
+ bool automaticVarsAreaFrozen;
+
+ MachineFunction &MF;
+public:
+ hash_map<const Instruction*, MachineCodeForInstruction> MCFIEntries;
+
+ MachineFunctionInfo(MachineFunction &mf) : MF(mf) {
+ staticStackSize = automaticVarsSize = regSpillsSize = 0;
+ maxOptionalArgsSize = maxOptionalNumArgs = currentTmpValuesSize = 0;
+ maxTmpValuesSize = 0;
+ compiledAsLeaf = spillsAreaFrozen = automaticVarsAreaFrozen = false;
+ }
+
+ /// CalculateArgSize - Call this method to fill in the maxOptionalArgsSize &
+ /// staticStackSize fields...
+ ///
+ void CalculateArgSize();
+
+ //
+ // Accessors for global information about generated code for a method.
+ //
+ bool isCompiledAsLeafMethod() const { return compiledAsLeaf; }
+ unsigned getStaticStackSize() const { return staticStackSize; }
+ unsigned getAutomaticVarsSize() const { return automaticVarsSize; }
+ unsigned getRegSpillsSize() const { return regSpillsSize; }
+ unsigned getMaxOptionalArgsSize() const { return maxOptionalArgsSize;}
+ unsigned getMaxOptionalNumArgs() const { return maxOptionalNumArgs;}
+ const hash_set<const Constant*> &getConstantPoolValues() const {
+ return constantsForConstPool;
+ }
+
+ //
+ // Modifiers used during code generation
+ //
+ void initializeFrameLayout ();
+
+ void addToConstantPool (const Constant* constVal) {
+ constantsForConstPool.insert(constVal);
+ }
+
+ void markAsLeafMethod() { compiledAsLeaf = true; }
+
+ int computeOffsetforLocalVar (const Value* local,
+ unsigned& getPaddedSize,
+ unsigned sizeToUse = 0);
+ int allocateLocalVar (const Value* local,
+ unsigned sizeToUse = 0);
+
+ int allocateSpilledValue (const Type* type);
+ int pushTempValue (unsigned size);
+ void popAllTempValues ();
+
+ void freezeSpillsArea () { spillsAreaFrozen = true; }
+ void freezeAutomaticVarsArea () { automaticVarsAreaFrozen=true; }
+
+private:
+ void incrementAutomaticVarsSize(int incr) {
+ automaticVarsSize+= incr;
+ staticStackSize += incr;
+ }
+ void incrementRegSpillsSize(int incr) {
+ regSpillsSize+= incr;
+ staticStackSize += incr;
+ }
+ void incrementTmpAreaSize(int incr) {
+ currentTmpValuesSize += incr;
+ if (maxTmpValuesSize < currentTmpValuesSize)
+ {
+ staticStackSize += currentTmpValuesSize - maxTmpValuesSize;
+ maxTmpValuesSize = currentTmpValuesSize;
+ }
+ }
+ void resetTmpAreaSize() {
+ currentTmpValuesSize = 0;
+ }
+ int allocateOptionalArg(const Type* type);
+};
+
+} // End llvm namespace
+
+#endif
diff --git a/llvm/lib/Target/SparcV9/MappingInfo.cpp b/llvm/lib/Target/SparcV9/MappingInfo.cpp
index 3aa23592888..e8c7581ed7b 100644
--- a/llvm/lib/Target/SparcV9/MappingInfo.cpp
+++ b/llvm/lib/Target/SparcV9/MappingInfo.cpp
@@ -46,7 +46,7 @@
#include "llvm/Pass.h"
#include "llvm/Module.h"
#include "llvm/CodeGen/MachineFunction.h"
-#include "llvm/CodeGen/MachineCodeForInstruction.h"
+#include "MachineCodeForInstruction.h"
#include "Support/StringExtras.h"
namespace llvm {
diff --git a/llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp b/llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
index 74834f0cdc9..6a68a0b0b37 100644
--- a/llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
+++ b/llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
@@ -26,6 +26,8 @@
#include "RegAllocCommon.h"
#include "RegClass.h"
#include "../LiveVar/FunctionLiveVarInfo.h"
+#include "../MachineCodeForInstruction.h"
+#include "../MachineFunctionInfo.h"
#include "../SparcV9InstrInfo.h"
#include "../SparcV9TmpInstr.h"
#include "llvm/Constants.h"
@@ -34,9 +36,7 @@
#include "llvm/Module.h"
#include "llvm/Type.h"
#include "llvm/Analysis/LoopInfo.h"
-#include "llvm/CodeGen/MachineCodeForInstruction.h"
#include "llvm/CodeGen/MachineFunction.h"
-#include "llvm/CodeGen/MachineFunctionInfo.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "../MachineInstrAnnot.h"
diff --git a/llvm/lib/Target/SparcV9/SparcV9AsmPrinter.cpp b/llvm/lib/Target/SparcV9/SparcV9AsmPrinter.cpp
index 0be404d6539..fcdb5e07726 100644
--- a/llvm/lib/Target/SparcV9/SparcV9AsmPrinter.cpp
+++ b/llvm/lib/Target/SparcV9/SparcV9AsmPrinter.cpp
@@ -25,12 +25,12 @@
#include "llvm/Assembly/Writer.h"
#include "llvm/CodeGen/MachineConstantPool.h"
#include "llvm/CodeGen/MachineFunction.h"
-#include "llvm/CodeGen/MachineFunctionInfo.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/Support/Mangler.h"
#include "Support/StringExtras.h"
#include "Support/Statistic.h"
#include "SparcV9Internals.h"
+#include "MachineFunctionInfo.h"
#include <string>
using namespace llvm;
diff --git a/llvm/lib/Target/SparcV9/SparcV9BurgISel.cpp b/llvm/lib/Target/SparcV9/SparcV9BurgISel.cpp
index 037cb32c20d..050599b83d0 100644
--- a/llvm/lib/Target/SparcV9/SparcV9BurgISel.cpp
+++ b/llvm/lib/Target/SparcV9/SparcV9BurgISel.cpp
@@ -21,15 +21,14 @@
#include "SparcV9TmpInstr.h"
#include "SparcV9FrameInfo.h"
#include "SparcV9RegisterInfo.h"
+#include "MachineFunctionInfo.h"
#include "llvm/CodeGen/IntrinsicLowering.h"
#include "llvm/CodeGen/MachineConstantPool.h"
#include "llvm/CodeGen/MachineFunction.h"
-#include "llvm/CodeGen/MachineFunctionInfo.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
-#include "llvm/GlobalValue.h"
#include "llvm/Instructions.h"
#include "llvm/Intrinsics.h"
#include "llvm/Module.h"
diff --git a/llvm/lib/Target/SparcV9/SparcV9CodeEmitter.cpp b/llvm/lib/Target/SparcV9/SparcV9CodeEmitter.cpp
index 65edfb1cf7e..e870a15e86a 100644
--- a/llvm/lib/Target/SparcV9/SparcV9CodeEmitter.cpp
+++ b/llvm/lib/Target/SparcV9/SparcV9CodeEmitter.cpp
@@ -26,7 +26,6 @@
#include "llvm/PassManager.h"
#include "llvm/CodeGen/MachineCodeEmitter.h"
#include "llvm/CodeGen/MachineConstantPool.h"
-#include "llvm/CodeGen/MachineFunctionInfo.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/Target/TargetMachine.h"
@@ -38,6 +37,7 @@
#include "SparcV9TargetMachine.h"
#include "SparcV9RegInfo.h"
#include "SparcV9CodeEmitter.h"
+#include "MachineFunctionInfo.h"
#include "Config/alloca.h"
namespace llvm {
diff --git a/llvm/lib/Target/SparcV9/SparcV9FrameInfo.cpp b/llvm/lib/Target/SparcV9/SparcV9FrameInfo.cpp
index 26d92ebb983..59e8113b8a7 100644
--- a/llvm/lib/Target/SparcV9/SparcV9FrameInfo.cpp
+++ b/llvm/lib/Target/SparcV9/SparcV9FrameInfo.cpp
@@ -12,8 +12,8 @@
//===----------------------------------------------------------------------===//
#include "llvm/CodeGen/MachineFunction.h"
-#include "llvm/CodeGen/MachineFunctionInfo.h"
#include "llvm/Target/TargetFrameInfo.h"
+#include "MachineFunctionInfo.h"
#include "SparcV9FrameInfo.h"
using namespace llvm;
diff --git a/llvm/lib/Target/SparcV9/SparcV9PrologEpilogInserter.cpp b/llvm/lib/Target/SparcV9/SparcV9PrologEpilogInserter.cpp
index 4f5214dd214..419b1108a7c 100644
--- a/llvm/lib/Target/SparcV9/SparcV9PrologEpilogInserter.cpp
+++ b/llvm/lib/Target/SparcV9/SparcV9PrologEpilogInserter.cpp
@@ -20,9 +20,9 @@
#include "SparcV9RegClassInfo.h"
#include "SparcV9RegisterInfo.h"
#include "SparcV9FrameInfo.h"
+#include "MachineFunctionInfo.h"
+#include "MachineCodeForInstruction.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
-#include "llvm/CodeGen/MachineFunctionInfo.h"
-#include "llvm/CodeGen/MachineCodeForInstruction.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/Pass.h"
#include "llvm/Function.h"
diff --git a/llvm/lib/Target/SparcV9/SparcV9RegInfo.cpp b/llvm/lib/Target/SparcV9/SparcV9RegInfo.cpp
index b01c4fcfc72..41c17e0f200 100644
--- a/llvm/lib/Target/SparcV9/SparcV9RegInfo.cpp
+++ b/llvm/lib/Target/SparcV9/SparcV9RegInfo.cpp
@@ -13,9 +13,9 @@
//===----------------------------------------------------------------------===//
#include "llvm/CodeGen/MachineFunction.h"
-#include "llvm/CodeGen/MachineFunctionInfo.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
-#include "llvm/CodeGen/MachineCodeForInstruction.h"
+#include "MachineFunctionInfo.h"
+#include "MachineCodeForInstruction.h"
#include "MachineInstrAnnot.h"
#include "RegAlloc/LiveRangeInfo.h"
#include "RegAlloc/LiveRange.h"
diff --git a/llvm/lib/Target/SparcV9/SparcV9StackSlots.cpp b/llvm/lib/Target/SparcV9/SparcV9StackSlots.cpp
index c21defbd4df..693d29e50d9 100644
--- a/llvm/lib/Target/SparcV9/SparcV9StackSlots.cpp
+++ b/llvm/lib/Target/SparcV9/SparcV9StackSlots.cpp
@@ -17,10 +17,9 @@
#include "llvm/Constant.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Function.h"
-#include "llvm/CodeGen/MachineFunctionInfo.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
-
-namespace llvm {
+#include "MachineFunctionInfo.h"
+using namespace llvm;
namespace {
class StackSlots : public MachineFunctionPass {
@@ -47,8 +46,7 @@ namespace {
};
}
-Pass *createStackSlotsPass(const TargetMachine &Target) {
+Pass *llvm::createStackSlotsPass(const TargetMachine &Target) {
return new StackSlots(Target);
}
-} // End llvm namespace
diff --git a/llvm/lib/Target/SparcV9/SparcV9TargetMachine.cpp b/llvm/lib/Target/SparcV9/SparcV9TargetMachine.cpp
index bf4188f4b2a..bca50ab083d 100644
--- a/llvm/lib/Target/SparcV9/SparcV9TargetMachine.cpp
+++ b/llvm/lib/Target/SparcV9/SparcV9TargetMachine.cpp
@@ -19,13 +19,13 @@
#include "llvm/CodeGen/InstrScheduling.h"
#include "llvm/CodeGen/IntrinsicLowering.h"
#include "llvm/CodeGen/MachineFunction.h"
-#include "llvm/CodeGen/MachineFunctionInfo.h"
-#include "llvm/CodeGen/MachineCodeForInstruction.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/Target/TargetOptions.h"
#include "llvm/Target/TargetMachineRegistry.h"
#include "llvm/Transforms/Scalar.h"
#include "MappingInfo.h"
+#include "MachineFunctionInfo.h"
+#include "MachineCodeForInstruction.h"
#include "SparcV9Internals.h"
#include "SparcV9TargetMachine.h"
#include "SparcV9BurgISel.h"
diff --git a/llvm/lib/Target/SparcV9/SparcV9TmpInstr.h b/llvm/lib/Target/SparcV9/SparcV9TmpInstr.h
index b4a7d4935cd..fa718656623 100644
--- a/llvm/lib/Target/SparcV9/SparcV9TmpInstr.h
+++ b/llvm/lib/Target/SparcV9/SparcV9TmpInstr.h
@@ -16,7 +16,7 @@
#define SPARCV9TMPINSTR_H
#include "llvm/Instruction.h"
-#include "llvm/CodeGen/MachineCodeForInstruction.h"
+#include "MachineCodeForInstruction.h"
namespace llvm {
OpenPOWER on IntegriCloud