mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
Add references to delay slot filler pass.
Fill in addPassesToJITCompile method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12729 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -25,6 +25,7 @@ namespace llvm {
|
|||||||
FunctionPass *createSparcV8SimpleInstructionSelector(TargetMachine &TM);
|
FunctionPass *createSparcV8SimpleInstructionSelector(TargetMachine &TM);
|
||||||
FunctionPass *createSparcV8CodePrinterPass(std::ostream &OS,
|
FunctionPass *createSparcV8CodePrinterPass(std::ostream &OS,
|
||||||
TargetMachine &TM);
|
TargetMachine &TM);
|
||||||
|
FunctionPass *createSparcV8DelaySlotFillerPass(TargetMachine &TM);
|
||||||
|
|
||||||
} // end namespace llvm;
|
} // end namespace llvm;
|
||||||
|
|
||||||
|
@@ -54,6 +54,12 @@ bool SparcV8TargetMachine::addPassesToEmitAssembly(PassManager &PM,
|
|||||||
if (PrintMachineCode)
|
if (PrintMachineCode)
|
||||||
PM.add(createMachineFunctionPrinterPass(&std::cerr));
|
PM.add(createMachineFunctionPrinterPass(&std::cerr));
|
||||||
|
|
||||||
|
PM.add(createSparcV8DelaySlotFillerPass(*this));
|
||||||
|
|
||||||
|
// Print machine instructions after filling delay slots.
|
||||||
|
if (PrintMachineCode)
|
||||||
|
PM.add(createMachineFunctionPrinterPass(&std::cerr));
|
||||||
|
|
||||||
// Output assembly language.
|
// Output assembly language.
|
||||||
PM.add(createSparcV8CodePrinterPass(Out, *this));
|
PM.add(createSparcV8CodePrinterPass(Out, *this));
|
||||||
|
|
||||||
@@ -66,7 +72,23 @@ bool SparcV8TargetMachine::addPassesToEmitAssembly(PassManager &PM,
|
|||||||
/// implement a fast dynamic compiler for this target.
|
/// implement a fast dynamic compiler for this target.
|
||||||
///
|
///
|
||||||
void SparcV8JITInfo::addPassesToJITCompile(FunctionPassManager &PM) {
|
void SparcV8JITInfo::addPassesToJITCompile(FunctionPassManager &PM) {
|
||||||
// <insert instruction selector passes here>
|
PM.add(createSparcV8SimpleInstructionSelector(TM));
|
||||||
|
|
||||||
|
// Print machine instructions as they were initially generated.
|
||||||
|
if (PrintMachineCode)
|
||||||
|
PM.add(createMachineFunctionPrinterPass(&std::cerr));
|
||||||
|
|
||||||
PM.add(createRegisterAllocator());
|
PM.add(createRegisterAllocator());
|
||||||
PM.add(createPrologEpilogCodeInserter());
|
PM.add(createPrologEpilogCodeInserter());
|
||||||
|
|
||||||
|
// Print machine instructions after register allocation and prolog/epilog
|
||||||
|
// insertion.
|
||||||
|
if (PrintMachineCode)
|
||||||
|
PM.add(createMachineFunctionPrinterPass(&std::cerr));
|
||||||
|
|
||||||
|
PM.add(createSparcV8DelaySlotFillerPass(TM));
|
||||||
|
|
||||||
|
// Print machine instructions after filling delay slots.
|
||||||
|
if (PrintMachineCode)
|
||||||
|
PM.add(createMachineFunctionPrinterPass(&std::cerr));
|
||||||
}
|
}
|
||||||
|
@@ -25,6 +25,7 @@ namespace llvm {
|
|||||||
FunctionPass *createSparcV8SimpleInstructionSelector(TargetMachine &TM);
|
FunctionPass *createSparcV8SimpleInstructionSelector(TargetMachine &TM);
|
||||||
FunctionPass *createSparcV8CodePrinterPass(std::ostream &OS,
|
FunctionPass *createSparcV8CodePrinterPass(std::ostream &OS,
|
||||||
TargetMachine &TM);
|
TargetMachine &TM);
|
||||||
|
FunctionPass *createSparcV8DelaySlotFillerPass(TargetMachine &TM);
|
||||||
|
|
||||||
} // end namespace llvm;
|
} // end namespace llvm;
|
||||||
|
|
||||||
|
@@ -54,6 +54,12 @@ bool SparcV8TargetMachine::addPassesToEmitAssembly(PassManager &PM,
|
|||||||
if (PrintMachineCode)
|
if (PrintMachineCode)
|
||||||
PM.add(createMachineFunctionPrinterPass(&std::cerr));
|
PM.add(createMachineFunctionPrinterPass(&std::cerr));
|
||||||
|
|
||||||
|
PM.add(createSparcV8DelaySlotFillerPass(*this));
|
||||||
|
|
||||||
|
// Print machine instructions after filling delay slots.
|
||||||
|
if (PrintMachineCode)
|
||||||
|
PM.add(createMachineFunctionPrinterPass(&std::cerr));
|
||||||
|
|
||||||
// Output assembly language.
|
// Output assembly language.
|
||||||
PM.add(createSparcV8CodePrinterPass(Out, *this));
|
PM.add(createSparcV8CodePrinterPass(Out, *this));
|
||||||
|
|
||||||
@@ -66,7 +72,23 @@ bool SparcV8TargetMachine::addPassesToEmitAssembly(PassManager &PM,
|
|||||||
/// implement a fast dynamic compiler for this target.
|
/// implement a fast dynamic compiler for this target.
|
||||||
///
|
///
|
||||||
void SparcV8JITInfo::addPassesToJITCompile(FunctionPassManager &PM) {
|
void SparcV8JITInfo::addPassesToJITCompile(FunctionPassManager &PM) {
|
||||||
// <insert instruction selector passes here>
|
PM.add(createSparcV8SimpleInstructionSelector(TM));
|
||||||
|
|
||||||
|
// Print machine instructions as they were initially generated.
|
||||||
|
if (PrintMachineCode)
|
||||||
|
PM.add(createMachineFunctionPrinterPass(&std::cerr));
|
||||||
|
|
||||||
PM.add(createRegisterAllocator());
|
PM.add(createRegisterAllocator());
|
||||||
PM.add(createPrologEpilogCodeInserter());
|
PM.add(createPrologEpilogCodeInserter());
|
||||||
|
|
||||||
|
// Print machine instructions after register allocation and prolog/epilog
|
||||||
|
// insertion.
|
||||||
|
if (PrintMachineCode)
|
||||||
|
PM.add(createMachineFunctionPrinterPass(&std::cerr));
|
||||||
|
|
||||||
|
PM.add(createSparcV8DelaySlotFillerPass(TM));
|
||||||
|
|
||||||
|
// Print machine instructions after filling delay slots.
|
||||||
|
if (PrintMachineCode)
|
||||||
|
PM.add(createMachineFunctionPrinterPass(&std::cerr));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user