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.cpp6
-rw-r--r--llvm/lib/Target/Sparc/EmitBytecodeToAssembly.cpp2
-rw-r--r--llvm/lib/Target/Sparc/PrologEpilogCodeInserter.cpp3
-rw-r--r--llvm/lib/Target/Sparc/Sparc.cpp9
4 files changed, 20 insertions, 0 deletions
diff --git a/llvm/lib/Target/Sparc/EmitAssembly.cpp b/llvm/lib/Target/Sparc/EmitAssembly.cpp
index f4ca22f9da9..8d87bfec6be 100644
--- a/llvm/lib/Target/Sparc/EmitAssembly.cpp
+++ b/llvm/lib/Target/Sparc/EmitAssembly.cpp
@@ -192,6 +192,10 @@ struct SparcFunctionAsmPrinter : public FunctionPass, public AsmPrinter {
inline SparcFunctionAsmPrinter(std::ostream &os, const TargetMachine &t)
: AsmPrinter(os, t) {}
+ const char *getPassName() const {
+ return "Output Sparc Assembly for Functions";
+ }
+
virtual bool doInitialization(Module *M) {
startModule(M);
return false;
@@ -424,6 +428,8 @@ public:
SparcModuleAsmPrinter(std::ostream &os, TargetMachine &t)
: AsmPrinter(os, t) {}
+ const char *getPassName() const { return "Output Sparc Assembly for Module"; }
+
virtual bool run(Module *M) {
startModule(M);
emitGlobalsAndConstants(M);
diff --git a/llvm/lib/Target/Sparc/EmitBytecodeToAssembly.cpp b/llvm/lib/Target/Sparc/EmitBytecodeToAssembly.cpp
index 92420f9421f..fdf8f3ec361 100644
--- a/llvm/lib/Target/Sparc/EmitBytecodeToAssembly.cpp
+++ b/llvm/lib/Target/Sparc/EmitBytecodeToAssembly.cpp
@@ -59,6 +59,8 @@ namespace {
public:
SparcBytecodeWriter(std::ostream &out) : Out(out) {}
+ const char *getPassName() const { return "Emit Bytecode to Sparc Assembly";}
+
virtual bool run(Module *M) {
// Write bytecode out to the sparc assembly stream
Out << "\n\n!LLVM BYTECODE OUTPUT\n\t.section \".rodata\"\n\t.align 8\n";
diff --git a/llvm/lib/Target/Sparc/PrologEpilogCodeInserter.cpp b/llvm/lib/Target/Sparc/PrologEpilogCodeInserter.cpp
index 17cd73bfc34..b42e7771567 100644
--- a/llvm/lib/Target/Sparc/PrologEpilogCodeInserter.cpp
+++ b/llvm/lib/Target/Sparc/PrologEpilogCodeInserter.cpp
@@ -25,6 +25,9 @@ class InsertPrologEpilogCode : public FunctionPass {
TargetMachine &Target;
public:
InsertPrologEpilogCode(TargetMachine &T) : Target(T) {}
+
+ const char *getPassName() const { return "Sparc Prolog/Epilog Inserter"; }
+
bool runOnFunction(Function *F) {
MachineCodeForMethod &mcodeInfo = MachineCodeForMethod::get(F);
if (!mcodeInfo.isCompiledAsLeafMethod()) {
diff --git a/llvm/lib/Target/Sparc/Sparc.cpp b/llvm/lib/Target/Sparc/Sparc.cpp
index 306b85a2272..fecdf23e29a 100644
--- a/llvm/lib/Target/Sparc/Sparc.cpp
+++ b/llvm/lib/Target/Sparc/Sparc.cpp
@@ -130,6 +130,11 @@ class ConstructMachineCodeForFunction : public FunctionPass {
TargetMachine &Target;
public:
inline ConstructMachineCodeForFunction(TargetMachine &T) : Target(T) {}
+
+ const char *getPassName() const {
+ return "Sparc ConstructMachineCodeForFunction";
+ }
+
bool runOnFunction(Function *F) {
MachineCodeForMethod::construct(F, Target);
return false;
@@ -140,6 +145,8 @@ class InstructionSelection : public FunctionPass {
TargetMachine &Target;
public:
inline InstructionSelection(TargetMachine &T) : Target(T) {}
+ const char *getPassName() const { return "Sparc Instruction Selection"; }
+
bool runOnFunction(Function *F) {
if (SelectInstructionsForMethod(F, Target)) {
cerr << "Instr selection failed for function " << F->getName() << "\n";
@@ -150,6 +157,8 @@ public:
};
struct FreeMachineCodeForFunction : public FunctionPass {
+ const char *getPassName() const { return "Sparc FreeMachineCodeForFunction"; }
+
static void freeMachineCode(Instruction *I) {
MachineCodeForInstruction::destroy(I);
}
OpenPOWER on IntegriCloud