mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Support -print-machineinstrs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12124 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -42,19 +42,22 @@ bool SparcV8TargetMachine::addPassesToEmitAssembly(PassManager &PM,
|
|||||||
std::ostream &Out) {
|
std::ostream &Out) {
|
||||||
PM.add(createSparcV8SimpleInstructionSelector(*this));
|
PM.add(createSparcV8SimpleInstructionSelector(*this));
|
||||||
|
|
||||||
// Print machine instructions as they are created.
|
// Print machine instructions as they were initially generated.
|
||||||
PM.add(createMachineFunctionPrinterPass(&std::cerr));
|
if (PrintMachineCode)
|
||||||
|
PM.add(createMachineFunctionPrinterPass(&std::cerr));
|
||||||
|
|
||||||
PM.add(createRegisterAllocator());
|
PM.add(createRegisterAllocator());
|
||||||
PM.add(createPrologEpilogCodeInserter());
|
PM.add(createPrologEpilogCodeInserter());
|
||||||
// <insert assembly code output passes here>
|
|
||||||
|
|
||||||
// This is not a correct asm writer by any means, but at least we see what we
|
// Print machine instructions after register allocation and prolog/epilog
|
||||||
// are producing.
|
// insertion.
|
||||||
PM.add(createMachineFunctionPrinterPass(&Out));
|
if (PrintMachineCode)
|
||||||
|
PM.add(createMachineFunctionPrinterPass(&std::cerr));
|
||||||
|
|
||||||
|
// Output assembly language.
|
||||||
PM.add(createSparcV8CodePrinterPass(Out, *this));
|
PM.add(createSparcV8CodePrinterPass(Out, *this));
|
||||||
|
|
||||||
|
// Delete the MachineInstrs we generated, since they're no longer needed.
|
||||||
PM.add(createMachineCodeDeleter());
|
PM.add(createMachineCodeDeleter());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -42,19 +42,22 @@ bool SparcV8TargetMachine::addPassesToEmitAssembly(PassManager &PM,
|
|||||||
std::ostream &Out) {
|
std::ostream &Out) {
|
||||||
PM.add(createSparcV8SimpleInstructionSelector(*this));
|
PM.add(createSparcV8SimpleInstructionSelector(*this));
|
||||||
|
|
||||||
// Print machine instructions as they are created.
|
// Print machine instructions as they were initially generated.
|
||||||
PM.add(createMachineFunctionPrinterPass(&std::cerr));
|
if (PrintMachineCode)
|
||||||
|
PM.add(createMachineFunctionPrinterPass(&std::cerr));
|
||||||
|
|
||||||
PM.add(createRegisterAllocator());
|
PM.add(createRegisterAllocator());
|
||||||
PM.add(createPrologEpilogCodeInserter());
|
PM.add(createPrologEpilogCodeInserter());
|
||||||
// <insert assembly code output passes here>
|
|
||||||
|
|
||||||
// This is not a correct asm writer by any means, but at least we see what we
|
// Print machine instructions after register allocation and prolog/epilog
|
||||||
// are producing.
|
// insertion.
|
||||||
PM.add(createMachineFunctionPrinterPass(&Out));
|
if (PrintMachineCode)
|
||||||
|
PM.add(createMachineFunctionPrinterPass(&std::cerr));
|
||||||
|
|
||||||
|
// Output assembly language.
|
||||||
PM.add(createSparcV8CodePrinterPass(Out, *this));
|
PM.add(createSparcV8CodePrinterPass(Out, *this));
|
||||||
|
|
||||||
|
// Delete the MachineInstrs we generated, since they're no longer needed.
|
||||||
PM.add(createMachineCodeDeleter());
|
PM.add(createMachineCodeDeleter());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user