forked from OSchip/llvm-project
lib/Target/X86/X86TargetMachine.{cpp,h}: Add initial version
(non-working) of llc guts for X86, and add a prototype for it. llvm-svn: 6779
This commit is contained in:
parent
33426d9168
commit
ac94bab876
|
@ -41,6 +41,19 @@ X86TargetMachine::X86TargetMachine(unsigned Config)
|
|||
FrameInfo(TargetFrameInfo::StackGrowsDown, 8/*16 for SSE*/, 4) {
|
||||
}
|
||||
|
||||
// llc backend for x86
|
||||
bool X86TargetMachine::addPassesToEmitAssembly(PassManager &PM,
|
||||
std::ostream &Out) {
|
||||
PM.add(createLowerSwitchPass());
|
||||
PM.add(createSimpleX86InstructionSelector(*this));
|
||||
PM.add(createLocalRegisterAllocator());
|
||||
PM.add(createX86FloatingPointStackifierPass());
|
||||
PM.add(createPrologEpilogCodeInserter());
|
||||
PM.add(createX86PeepholeOptimizerPass());
|
||||
PM.add(createX86CodePrinterPass(Out));
|
||||
return false; // success!
|
||||
}
|
||||
|
||||
/// addPassesToJITCompile - Add passes to the specified pass manager to
|
||||
/// implement a fast dynamic compiler for this target. Return true if this is
|
||||
/// not supported for this target.
|
||||
|
|
|
@ -42,6 +42,8 @@ public:
|
|||
///
|
||||
virtual bool addPassesToEmitMachineCode(PassManager &PM,
|
||||
MachineCodeEmitter &MCE);
|
||||
|
||||
virtual bool addPassesToEmitAssembly(PassManager &PM, std::ostream &Out);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue