mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-26 23:32:58 +00:00
Inline addAssemblyEmitter into its one real caller and delete
the -print-emitted-asm option. The JIT shouldn't have to pull in the asmprinter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95100 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8991d51ddc
commit
0823d2a654
@ -354,8 +354,6 @@ public:
|
|||||||
// Pass Pipeline Configuration
|
// Pass Pipeline Configuration
|
||||||
virtual bool addInstSelector(PassManagerBase &PM, bool Fast);
|
virtual bool addInstSelector(PassManagerBase &PM, bool Fast);
|
||||||
virtual bool addPreEmitPass(PassManagerBase &PM, bool Fast);
|
virtual bool addPreEmitPass(PassManagerBase &PM, bool Fast);
|
||||||
virtual bool addAssemblyEmitter(PassManagerBase &PM, bool Fast,
|
|
||||||
std::ostream &Out);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end namespace llvm
|
} // end namespace llvm
|
||||||
|
@ -463,14 +463,6 @@ public:
|
|||||||
/// getEnableTailMergeDefault - the default setting for -enable-tail-merge
|
/// getEnableTailMergeDefault - the default setting for -enable-tail-merge
|
||||||
/// on this target. User flag overrides.
|
/// on this target. User flag overrides.
|
||||||
virtual bool getEnableTailMergeDefault() const { return true; }
|
virtual bool getEnableTailMergeDefault() const { return true; }
|
||||||
|
|
||||||
/// addAssemblyEmitter - Helper function which creates a target specific
|
|
||||||
/// assembly printer, if available.
|
|
||||||
///
|
|
||||||
/// \return Returns 'false' on success.
|
|
||||||
bool addAssemblyEmitter(PassManagerBase &, CodeGenOpt::Level,
|
|
||||||
bool /* VerboseAsmDefault */,
|
|
||||||
formatted_raw_ostream &);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // End llvm namespace
|
} // End llvm namespace
|
||||||
|
@ -57,8 +57,6 @@ static cl::opt<bool> PrintLSR("print-lsr-output", cl::Hidden,
|
|||||||
cl::desc("Print LLVM IR produced by the loop-reduce pass"));
|
cl::desc("Print LLVM IR produced by the loop-reduce pass"));
|
||||||
static cl::opt<bool> PrintISelInput("print-isel-input", cl::Hidden,
|
static cl::opt<bool> PrintISelInput("print-isel-input", cl::Hidden,
|
||||||
cl::desc("Print LLVM IR input to isel pass"));
|
cl::desc("Print LLVM IR input to isel pass"));
|
||||||
static cl::opt<bool> PrintEmittedAsm("print-emitted-asm", cl::Hidden,
|
|
||||||
cl::desc("Dump emitter generated instructions as assembly"));
|
|
||||||
static cl::opt<bool> PrintGCInfo("print-gc", cl::Hidden,
|
static cl::opt<bool> PrintGCInfo("print-gc", cl::Hidden,
|
||||||
cl::desc("Dump garbage collector data"));
|
cl::desc("Dump garbage collector data"));
|
||||||
static cl::opt<bool> VerifyMachineCode("verify-machineinstrs", cl::Hidden,
|
static cl::opt<bool> VerifyMachineCode("verify-machineinstrs", cl::Hidden,
|
||||||
@ -110,29 +108,20 @@ LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
|
|||||||
switch (FileType) {
|
switch (FileType) {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
case TargetMachine::AssemblyFile:
|
case TargetMachine::AssemblyFile: {
|
||||||
if (addAssemblyEmitter(PM, OptLevel, getAsmVerbosityDefault(), Out))
|
FunctionPass *Printer =
|
||||||
return FileModel::Error;
|
getTarget().createAsmPrinter(Out, *this, getMCAsmInfo(),
|
||||||
|
getAsmVerbosityDefault());
|
||||||
|
if (Printer == 0) break;
|
||||||
|
PM.add(Printer);
|
||||||
return FileModel::AsmFile;
|
return FileModel::AsmFile;
|
||||||
|
}
|
||||||
case TargetMachine::ObjectFile:
|
case TargetMachine::ObjectFile:
|
||||||
return FileModel::Error;
|
return FileModel::Error;
|
||||||
}
|
}
|
||||||
return FileModel::Error;
|
return FileModel::Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LLVMTargetMachine::addAssemblyEmitter(PassManagerBase &PM,
|
|
||||||
CodeGenOpt::Level OptLevel,
|
|
||||||
bool Verbose,
|
|
||||||
formatted_raw_ostream &Out) {
|
|
||||||
FunctionPass *Printer =
|
|
||||||
getTarget().createAsmPrinter(Out, *this, getMCAsmInfo(), Verbose);
|
|
||||||
if (!Printer)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
PM.add(Printer);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// addPassesToEmitFileFinish - If the passes to emit the specified file had to
|
/// addPassesToEmitFileFinish - If the passes to emit the specified file had to
|
||||||
/// be split up (e.g., to add an object writer pass), this method can be used to
|
/// be split up (e.g., to add an object writer pass), this method can be used to
|
||||||
/// finish up adding passes to emit the file, if necessary.
|
/// finish up adding passes to emit the file, if necessary.
|
||||||
@ -144,8 +133,6 @@ bool LLVMTargetMachine::addPassesToEmitFileFinish(PassManagerBase &PM,
|
|||||||
|
|
||||||
if (MCE)
|
if (MCE)
|
||||||
addSimpleCodeEmitter(PM, OptLevel, *MCE);
|
addSimpleCodeEmitter(PM, OptLevel, *MCE);
|
||||||
if (PrintEmittedAsm)
|
|
||||||
addAssemblyEmitter(PM, OptLevel, true, ferrs());
|
|
||||||
|
|
||||||
PM.add(createGCInfoDeleter());
|
PM.add(createGCInfoDeleter());
|
||||||
|
|
||||||
@ -163,8 +150,6 @@ bool LLVMTargetMachine::addPassesToEmitFileFinish(PassManagerBase &PM,
|
|||||||
|
|
||||||
if (JCE)
|
if (JCE)
|
||||||
addSimpleCodeEmitter(PM, OptLevel, *JCE);
|
addSimpleCodeEmitter(PM, OptLevel, *JCE);
|
||||||
if (PrintEmittedAsm)
|
|
||||||
addAssemblyEmitter(PM, OptLevel, true, ferrs());
|
|
||||||
|
|
||||||
PM.add(createGCInfoDeleter());
|
PM.add(createGCInfoDeleter());
|
||||||
|
|
||||||
@ -180,9 +165,6 @@ bool LLVMTargetMachine::addPassesToEmitFileFinish(PassManagerBase &PM,
|
|||||||
// Make sure the code model is set.
|
// Make sure the code model is set.
|
||||||
setCodeModelForStatic();
|
setCodeModelForStatic();
|
||||||
|
|
||||||
if (PrintEmittedAsm)
|
|
||||||
addAssemblyEmitter(PM, OptLevel, true, ferrs());
|
|
||||||
|
|
||||||
PM.add(createGCInfoDeleter());
|
PM.add(createGCInfoDeleter());
|
||||||
|
|
||||||
return false; // success!
|
return false; // success!
|
||||||
@ -205,9 +187,6 @@ bool LLVMTargetMachine::addPassesToEmitMachineCode(PassManagerBase &PM,
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
addCodeEmitter(PM, OptLevel, MCE);
|
addCodeEmitter(PM, OptLevel, MCE);
|
||||||
if (PrintEmittedAsm)
|
|
||||||
addAssemblyEmitter(PM, OptLevel, true, ferrs());
|
|
||||||
|
|
||||||
PM.add(createGCInfoDeleter());
|
PM.add(createGCInfoDeleter());
|
||||||
|
|
||||||
return false; // success!
|
return false; // success!
|
||||||
@ -230,9 +209,6 @@ bool LLVMTargetMachine::addPassesToEmitMachineCode(PassManagerBase &PM,
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
addCodeEmitter(PM, OptLevel, JCE);
|
addCodeEmitter(PM, OptLevel, JCE);
|
||||||
if (PrintEmittedAsm)
|
|
||||||
addAssemblyEmitter(PM, OptLevel, true, ferrs());
|
|
||||||
|
|
||||||
PM.add(createGCInfoDeleter());
|
PM.add(createGCInfoDeleter());
|
||||||
|
|
||||||
return false; // success!
|
return false; // success!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user