mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-14 07:31:39 +00:00
Add a new option to indicate we want the code generator to emit code quickly,not spending tons of time microoptimizing it. This is useful for an -O0style of build.
llvm-svn: 24233
This commit is contained in:
parent
0c65e09865
commit
3fdc97d460
lib/Target
Alpha
CBackend
IA64
Skeleton
SparcV8
SparcV9
X86
@ -77,7 +77,8 @@ AlphaTargetMachine::AlphaTargetMachine(const Module &M, IntrinsicLowering *IL,
|
||||
///
|
||||
bool AlphaTargetMachine::addPassesToEmitFile(PassManager &PM,
|
||||
std::ostream &Out,
|
||||
CodeGenFileType FileType) {
|
||||
CodeGenFileType FileType,
|
||||
bool Fast) {
|
||||
if (FileType != TargetMachine::AssemblyFile) return true;
|
||||
|
||||
if (EnableAlphaLSR) {
|
||||
|
@ -48,17 +48,11 @@ public:
|
||||
|
||||
static unsigned getJITMatchQuality();
|
||||
|
||||
/// addPassesToEmitMachineCode - Add passes to the specified pass manager to
|
||||
/// get machine code emitted. This uses a MachineCodeEmitter object to handle
|
||||
/// actually outputting the machine code and resolving things like the address
|
||||
/// of functions. This method should returns true if machine code emission is
|
||||
/// not supported.
|
||||
///
|
||||
virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
|
||||
MachineCodeEmitter &MCE);
|
||||
|
||||
virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
|
||||
CodeGenFileType FileType);
|
||||
CodeGenFileType FileType, bool Fast);
|
||||
|
||||
static unsigned getModuleMatchQuality(const Module &M);
|
||||
};
|
||||
|
@ -26,7 +26,7 @@ struct CTargetMachine : public TargetMachine {
|
||||
|
||||
// This is the only thing that actually does anything here.
|
||||
virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
|
||||
CodeGenFileType FileType);
|
||||
CodeGenFileType FileType, bool Fast);
|
||||
|
||||
// This class always works, but shouldn't be the default in most cases.
|
||||
static unsigned getModuleMatchQuality(const Module &M) { return 1; }
|
||||
|
@ -1725,7 +1725,7 @@ void CWriter::visitVAArgInst(VAArgInst &I) {
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
bool CTargetMachine::addPassesToEmitFile(PassManager &PM, std::ostream &o,
|
||||
CodeGenFileType FileType) {
|
||||
CodeGenFileType FileType, bool Fast) {
|
||||
if (FileType != TargetMachine::AssemblyFile) return true;
|
||||
|
||||
PM.add(createLowerGCPass());
|
||||
|
@ -85,7 +85,8 @@ IA64TargetMachine::IA64TargetMachine(const Module &M, IntrinsicLowering *IL,
|
||||
// does to emit statically compiled machine code.
|
||||
bool IA64TargetMachine::addPassesToEmitFile(PassManager &PM,
|
||||
std::ostream &Out,
|
||||
CodeGenFileType FileType) {
|
||||
CodeGenFileType FileType,
|
||||
bool Fast) {
|
||||
if (FileType != TargetMachine::AssemblyFile) return true;
|
||||
|
||||
// FIXME: Implement efficient support for garbage collection intrinsics.
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
}
|
||||
|
||||
virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
|
||||
CodeGenFileType FileType);
|
||||
CodeGenFileType FileType, bool Fast);
|
||||
|
||||
static unsigned getModuleMatchQuality(const Module &M);
|
||||
static unsigned compileTimeMatchQuality(void);
|
||||
|
@ -40,7 +40,8 @@ SkeletonTargetMachine::SkeletonTargetMachine(const Module &M,
|
||||
///
|
||||
bool SkeletonTargetMachine::addPassesToEmitFile(PassManager &PM,
|
||||
std::ostream &Out,
|
||||
CodeGenFileType FileType) {
|
||||
CodeGenFileType FileType,
|
||||
bool Fast) {
|
||||
if (FileType != TargetMachine::AssemblyFile) return true;
|
||||
// <insert instruction selector passes here>
|
||||
PM.add(createRegisterAllocator());
|
||||
|
@ -44,7 +44,7 @@ namespace llvm {
|
||||
MachineCodeEmitter &MCE);
|
||||
|
||||
virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
|
||||
CodeGenFileType FileType);
|
||||
CodeGenFileType FileType, bool Fast);
|
||||
};
|
||||
|
||||
} // end namespace llvm
|
||||
|
@ -65,7 +65,8 @@ unsigned SparcV8TargetMachine::getModuleMatchQuality(const Module &M) {
|
||||
///
|
||||
bool SparcV8TargetMachine::addPassesToEmitFile(PassManager &PM,
|
||||
std::ostream &Out,
|
||||
CodeGenFileType FileType) {
|
||||
CodeGenFileType FileType,
|
||||
bool Fast) {
|
||||
if (FileType != TargetMachine::AssemblyFile) return true;
|
||||
|
||||
// FIXME: Implement efficient support for garbage collection intrinsics.
|
||||
|
@ -45,17 +45,11 @@ public:
|
||||
static unsigned getModuleMatchQuality(const Module &M);
|
||||
static unsigned getJITMatchQuality();
|
||||
|
||||
/// addPassesToEmitMachineCode - Add passes to the specified pass manager to
|
||||
/// get machine code emitted. This uses a MachineCodeEmitter object to handle
|
||||
/// actually outputting the machine code and resolving things like the address
|
||||
/// of functions. This method should returns true if machine code emission is
|
||||
/// not supported.
|
||||
///
|
||||
virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
|
||||
MachineCodeEmitter &MCE);
|
||||
|
||||
virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
|
||||
CodeGenFileType FileType);
|
||||
CodeGenFileType FileType, bool Fast);
|
||||
};
|
||||
|
||||
} // end namespace llvm
|
||||
|
@ -162,7 +162,8 @@ SparcV9TargetMachine::SparcV9TargetMachine(const Module &M,
|
||||
///
|
||||
bool
|
||||
SparcV9TargetMachine::addPassesToEmitFile(PassManager &PM, std::ostream &Out,
|
||||
CodeGenFileType FileType) {
|
||||
CodeGenFileType FileType,
|
||||
bool Fast) {
|
||||
if (FileType != TargetMachine::AssemblyFile) return true;
|
||||
|
||||
// FIXME: Implement efficient support for garbage collection intrinsics.
|
||||
|
@ -45,7 +45,7 @@ public:
|
||||
}
|
||||
|
||||
virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
|
||||
CodeGenFileType FileType);
|
||||
CodeGenFileType FileType, bool Fast);
|
||||
virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
|
||||
MachineCodeEmitter &MCE);
|
||||
|
||||
|
@ -106,7 +106,8 @@ X86TargetMachine::X86TargetMachine(const Module &M,
|
||||
// addPassesToEmitFile - We currently use all of the same passes as the JIT
|
||||
// does to emit statically compiled machine code.
|
||||
bool X86TargetMachine::addPassesToEmitFile(PassManager &PM, std::ostream &Out,
|
||||
CodeGenFileType FileType) {
|
||||
CodeGenFileType FileType,
|
||||
bool Fast) {
|
||||
if (FileType != TargetMachine::AssemblyFile &&
|
||||
FileType != TargetMachine::ObjectFile) return true;
|
||||
|
||||
|
@ -41,17 +41,11 @@ public:
|
||||
return &InstrInfo.getRegisterInfo();
|
||||
}
|
||||
|
||||
/// addPassesToEmitMachineCode - Add passes to the specified pass manager to
|
||||
/// get machine code emitted. This uses a MachineCodeEmitter object to handle
|
||||
/// actually outputting the machine code and resolving things like the address
|
||||
/// of functions. This method should returns true if machine code emission is
|
||||
/// not supported.
|
||||
///
|
||||
virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
|
||||
MachineCodeEmitter &MCE);
|
||||
|
||||
virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
|
||||
CodeGenFileType FileType);
|
||||
CodeGenFileType FileType, bool Fast);
|
||||
|
||||
static unsigned getModuleMatchQuality(const Module &M);
|
||||
static unsigned getJITMatchQuality();
|
||||
|
Loading…
x
Reference in New Issue
Block a user