summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Sparc
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/Sparc')
-rw-r--r--llvm/lib/Target/Sparc/EmitAssembly.cpp14
-rw-r--r--llvm/lib/Target/Sparc/PrologEpilogCodeInserter.cpp4
-rw-r--r--llvm/lib/Target/Sparc/Sparc.cpp14
-rw-r--r--llvm/lib/Target/Sparc/SparcInternals.h34
4 files changed, 33 insertions, 33 deletions
diff --git a/llvm/lib/Target/Sparc/EmitAssembly.cpp b/llvm/lib/Target/Sparc/EmitAssembly.cpp
index a46f2ef7293..83e54871652 100644
--- a/llvm/lib/Target/Sparc/EmitAssembly.cpp
+++ b/llvm/lib/Target/Sparc/EmitAssembly.cpp
@@ -4,10 +4,10 @@
// LLVM. The code in this file assumes that the specified module has already
// been compiled into the internal data structures of the Module.
//
-// This code largely consists of two LLVM Pass's: a MethodPass and a Pass. The
-// MethodPass is pipelined together with all of the rest of the code generation
-// stages, and the Pass runs at the end to emit code for global variables and
-// such.
+// This code largely consists of two LLVM Pass's: a FunctionPass and a Pass.
+// The FunctionPass is pipelined together with all of the rest of the code
+// generation stages, and the Pass runs at the end to emit code for global
+// variables and such.
//
//===----------------------------------------------------------------------===//
@@ -197,7 +197,7 @@ public:
// SparcFunctionAsmPrinter Code
//===----------------------------------------------------------------------===//
-struct SparcFunctionAsmPrinter : public MethodPass, public AsmPrinter {
+struct SparcFunctionAsmPrinter : public FunctionPass, public AsmPrinter {
inline SparcFunctionAsmPrinter(std::ostream &os, const TargetMachine &t)
: AsmPrinter(os, t) {}
@@ -206,7 +206,7 @@ struct SparcFunctionAsmPrinter : public MethodPass, public AsmPrinter {
return false;
}
- virtual bool runOnMethod(Function *F) {
+ virtual bool runOnFunction(Function *F) {
startFunction(F);
emitFunction(F);
endFunction(F);
@@ -410,7 +410,7 @@ SparcFunctionAsmPrinter::emitFunction(const Function *M)
} // End anonymous namespace
-Pass *UltraSparc::getMethodAsmPrinterPass(PassManager &PM, std::ostream &Out) {
+Pass *UltraSparc::getFunctionAsmPrinterPass(PassManager &PM, std::ostream &Out){
return new SparcFunctionAsmPrinter(Out, *this);
}
diff --git a/llvm/lib/Target/Sparc/PrologEpilogCodeInserter.cpp b/llvm/lib/Target/Sparc/PrologEpilogCodeInserter.cpp
index 2dad5720207..17cd73bfc34 100644
--- a/llvm/lib/Target/Sparc/PrologEpilogCodeInserter.cpp
+++ b/llvm/lib/Target/Sparc/PrologEpilogCodeInserter.cpp
@@ -21,11 +21,11 @@
namespace {
-class InsertPrologEpilogCode : public MethodPass {
+class InsertPrologEpilogCode : public FunctionPass {
TargetMachine &Target;
public:
InsertPrologEpilogCode(TargetMachine &T) : Target(T) {}
- bool runOnMethod(Function *F) {
+ bool runOnFunction(Function *F) {
MachineCodeForMethod &mcodeInfo = MachineCodeForMethod::get(F);
if (!mcodeInfo.isCompiledAsLeafMethod()) {
InsertPrologCode(F);
diff --git a/llvm/lib/Target/Sparc/Sparc.cpp b/llvm/lib/Target/Sparc/Sparc.cpp
index de778e25628..306b85a2272 100644
--- a/llvm/lib/Target/Sparc/Sparc.cpp
+++ b/llvm/lib/Target/Sparc/Sparc.cpp
@@ -126,21 +126,21 @@ UltraSparc::UltraSparc()
// Native code generation for a specified target.
//===---------------------------------------------------------------------===//
-class ConstructMachineCodeForFunction : public MethodPass {
+class ConstructMachineCodeForFunction : public FunctionPass {
TargetMachine &Target;
public:
inline ConstructMachineCodeForFunction(TargetMachine &T) : Target(T) {}
- bool runOnMethod(Function *F) {
+ bool runOnFunction(Function *F) {
MachineCodeForMethod::construct(F, Target);
return false;
}
};
-class InstructionSelection : public MethodPass {
+class InstructionSelection : public FunctionPass {
TargetMachine &Target;
public:
inline InstructionSelection(TargetMachine &T) : Target(T) {}
- bool runOnMethod(Function *F) {
+ bool runOnFunction(Function *F) {
if (SelectInstructionsForMethod(F, Target)) {
cerr << "Instr selection failed for function " << F->getName() << "\n";
abort();
@@ -149,12 +149,12 @@ public:
}
};
-struct FreeMachineCodeForFunction : public MethodPass {
+struct FreeMachineCodeForFunction : public FunctionPass {
static void freeMachineCode(Instruction *I) {
MachineCodeForInstruction::destroy(I);
}
- bool runOnMethod(Function *F) {
+ bool runOnFunction(Function *F) {
for (Function::iterator FI = F->begin(), FE = F->end(); FI != FE; ++FI)
for (BasicBlock::iterator I = (*FI)->begin(), E = (*FI)->end();
I != E; ++I)
@@ -197,7 +197,7 @@ void UltraSparc::addPassesToEmitAssembly(PassManager &PM, std::ostream &Out) {
// allowing machine code representations for functions to be free'd after the
// function has been emitted.
//
- PM.add(getMethodAsmPrinterPass(PM, Out));
+ PM.add(getFunctionAsmPrinterPass(PM, Out));
PM.add(new FreeMachineCodeForFunction()); // Free stuff no longer needed
// Emit Module level assembly after all of the functions have been processed.
diff --git a/llvm/lib/Target/Sparc/SparcInternals.h b/llvm/lib/Target/Sparc/SparcInternals.h
index 12c86b8b8d4..0e80179f4eb 100644
--- a/llvm/lib/Target/Sparc/SparcInternals.h
+++ b/llvm/lib/Target/Sparc/SparcInternals.h
@@ -128,7 +128,7 @@ public:
// returned in `minstrVec'. Any temporary registers (TmpInstruction)
// created are returned in `tempVec'.
//
- virtual void CreateCodeToLoadConst(Function* method,
+ virtual void CreateCodeToLoadConst(Function *F,
Value* val,
Instruction* dest,
std::vector<MachineInstr*>& minstrVec,
@@ -141,7 +141,7 @@ public:
// The generated instructions are returned in `minstrVec'.
// Any temp. registers (TmpInstruction) created are returned in `tempVec'.
//
- virtual void CreateCodeToCopyIntToFloat(Function* method,
+ virtual void CreateCodeToCopyIntToFloat(Function* F,
Value* val,
Instruction* dest,
std::vector<MachineInstr*>& minstr,
@@ -152,7 +152,7 @@ public:
// `val' to an integer value `dest' by copying to memory and back.
// See the previous function for information about return values.
//
- virtual void CreateCodeToCopyFloatToInt(Function* method,
+ virtual void CreateCodeToCopyFloatToInt(Function* F,
Value* val,
Instruction* dest,
std::vector<MachineInstr*>& minstr,
@@ -161,7 +161,7 @@ public:
// create copy instruction(s)
virtual void CreateCopyInstructionsByType(const TargetMachine& target,
- Function* method,
+ Function* F,
Value* src,
Instruction* dest,
std::vector<MachineInstr*>& minstr) const;
@@ -224,7 +224,7 @@ class UltraSparcRegInfo : public MachineRegInfo {
// ======================== Private Methods =============================
// The following methods are used to color special live ranges (e.g.
- // method args and return values etc.) with specific hardware registers
+ // function args and return values etc.) with specific hardware registers
// as required. See SparcRegInfo.cpp for the implementation.
//
void setCallOrRetArgCol(LiveRange *LR, unsigned RegNo,
@@ -251,7 +251,7 @@ class UltraSparcRegInfo : public MachineRegInfo {
unsigned getCallInstNumArgs(const MachineInstr *CallMI) const;
- // The following 3 methods are used to find the RegType (see enum above)
+ // The following 3 methods are used to find the RegType (see enum above)
// of a LiveRange, Value and using the unified RegClassID
int getRegType(const LiveRange *LR) const;
int getRegType(const Value *Val) const;
@@ -272,7 +272,7 @@ class UltraSparcRegInfo : public MachineRegInfo {
// The following 2 methods are used to order the instructions addeed by
- // the register allocator in association with method calling. See
+ // the register allocator in association with function calling. See
// SparcRegInfo.cpp for more details
//
void moveInst2OrdVec(std::vector<MachineInstr *> &OrdVec,
@@ -344,7 +344,7 @@ public:
virtual int getZeroRegNum() const;
// getCallAddressReg - returns the reg used for pushing the address when a
- // method is called. This can be used for other purposes between calls
+ // function is called. This can be used for other purposes between calls
//
unsigned getCallAddressReg() const;
@@ -357,7 +357,7 @@ public:
// The following methods are used to color special live ranges (e.g.
- // method args and return values etc.) with specific hardware registers
+ // function args and return values etc.) with specific hardware registers
// as required. See SparcRegInfo.cpp for the implementation for Sparc.
//
void suggestRegs4MethodArgs(const Function *Meth,
@@ -499,16 +499,16 @@ public:
UltraSparcFrameInfo(const TargetMachine &tgt) : MachineFrameInfo(tgt) {}
public:
- int getStackFrameSizeAlignment () const { return StackFrameSizeAlignment;}
- int getMinStackFrameSize () const { return MinStackFrameSize; }
- int getNumFixedOutgoingArgs () const { return NumFixedOutgoingArgs; }
- int getSizeOfEachArgOnStack () const { return SizeOfEachArgOnStack; }
- bool argsOnStackHaveFixedSize () const { return true; }
+ int getStackFrameSizeAlignment() const { return StackFrameSizeAlignment;}
+ int getMinStackFrameSize() const { return MinStackFrameSize; }
+ int getNumFixedOutgoingArgs() const { return NumFixedOutgoingArgs; }
+ int getSizeOfEachArgOnStack() const { return SizeOfEachArgOnStack; }
+ bool argsOnStackHaveFixedSize() const { return true; }
//
// These methods compute offsets using the frame contents for a
- // particular method. The frame contents are obtained from the
- // MachineCodeInfoForMethod object for the given method.
+ // particular function. The frame contents are obtained from the
+ // MachineCodeInfoForMethod object for the given function.
//
int getFirstIncomingArgOffset (MachineCodeForMethod& mcInfo,
bool& growUp) const
@@ -623,7 +623,7 @@ public:
virtual void addPassesToEmitAssembly(PassManager &PM, std::ostream &Out);
private:
- Pass *getMethodAsmPrinterPass(PassManager &PM, std::ostream &Out);
+ Pass *getFunctionAsmPrinterPass(PassManager &PM, std::ostream &Out);
Pass *getModuleAsmPrinterPass(PassManager &PM, std::ostream &Out);
Pass *getEmitBytecodeToAsmPass(std::ostream &Out);
};
OpenPOWER on IntegriCloud