forked from OSchip/llvm-project
Bools are *also* not ints. Sigh. Furthermore, most of the TargetMachine
ctor parameters can be defaulted. Print the transformed llvm code input to the instruction selector when -print-machineinstrs is on, just like V9. llvm-svn: 18794
This commit is contained in:
parent
ba5e9f107c
commit
b3095dd88f
|
@ -12,6 +12,7 @@
|
||||||
|
|
||||||
#include "SparcV8TargetMachine.h"
|
#include "SparcV8TargetMachine.h"
|
||||||
#include "SparcV8.h"
|
#include "SparcV8.h"
|
||||||
|
#include "llvm/Assembly/PrintModulePass.h"
|
||||||
#include "llvm/Module.h"
|
#include "llvm/Module.h"
|
||||||
#include "llvm/PassManager.h"
|
#include "llvm/PassManager.h"
|
||||||
#include "llvm/CodeGen/MachineFunction.h"
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
|
@ -31,7 +32,7 @@ namespace {
|
||||||
///
|
///
|
||||||
SparcV8TargetMachine::SparcV8TargetMachine(const Module &M,
|
SparcV8TargetMachine::SparcV8TargetMachine(const Module &M,
|
||||||
IntrinsicLowering *IL)
|
IntrinsicLowering *IL)
|
||||||
: TargetMachine("SparcV8", IL, false, 4, 4, 8, 4, 8, 4, 2, 1, 4),
|
: TargetMachine("SparcV8", IL, false, 4, 4),
|
||||||
FrameInfo(TargetFrameInfo::StackGrowsDown, 8, 0), JITInfo(*this) {
|
FrameInfo(TargetFrameInfo::StackGrowsDown, 8, 0), JITInfo(*this) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,6 +80,10 @@ bool SparcV8TargetMachine::addPassesToEmitAssembly(PassManager &PM,
|
||||||
// FIXME: implement the select instruction in the instruction selector.
|
// FIXME: implement the select instruction in the instruction selector.
|
||||||
PM.add(createLowerSelectPass());
|
PM.add(createLowerSelectPass());
|
||||||
|
|
||||||
|
// Print LLVM code input to instruction selector:
|
||||||
|
if (PrintMachineCode)
|
||||||
|
PM.add(new PrintModulePass());
|
||||||
|
|
||||||
PM.add(createSparcV8SimpleInstructionSelector(*this));
|
PM.add(createSparcV8SimpleInstructionSelector(*this));
|
||||||
|
|
||||||
// Print machine instructions as they were initially generated.
|
// Print machine instructions as they were initially generated.
|
||||||
|
|
Loading…
Reference in New Issue