mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Move subreg lowering pass to be right after regalloc, per feedback.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40548 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -72,6 +72,11 @@ LLVMTargetMachine::addPassesToEmitFile(FunctionPassManager &PM,
|
|||||||
|
|
||||||
if (PrintMachineCode)
|
if (PrintMachineCode)
|
||||||
PM.add(createMachineFunctionPrinterPass(cerr));
|
PM.add(createMachineFunctionPrinterPass(cerr));
|
||||||
|
|
||||||
|
PM.add(createLowerSubregsPass());
|
||||||
|
|
||||||
|
if (PrintMachineCode) // Print the subreg lowered code
|
||||||
|
PM.add(createMachineFunctionPrinterPass(cerr));
|
||||||
|
|
||||||
// Run post-ra passes.
|
// Run post-ra passes.
|
||||||
if (addPostRegAlloc(PM, Fast) && PrintMachineCode)
|
if (addPostRegAlloc(PM, Fast) && PrintMachineCode)
|
||||||
@ -96,8 +101,6 @@ LLVMTargetMachine::addPassesToEmitFile(FunctionPassManager &PM,
|
|||||||
|
|
||||||
if (addPreEmitPass(PM, Fast) && PrintMachineCode)
|
if (addPreEmitPass(PM, Fast) && PrintMachineCode)
|
||||||
PM.add(createMachineFunctionPrinterPass(cerr));
|
PM.add(createMachineFunctionPrinterPass(cerr));
|
||||||
|
|
||||||
PM.add(createLowerSubregsPass());
|
|
||||||
|
|
||||||
switch (FileType) {
|
switch (FileType) {
|
||||||
default:
|
default:
|
||||||
@ -178,6 +181,11 @@ bool LLVMTargetMachine::addPassesToEmitMachineCode(FunctionPassManager &PM,
|
|||||||
|
|
||||||
if (PrintMachineCode)
|
if (PrintMachineCode)
|
||||||
PM.add(createMachineFunctionPrinterPass(cerr));
|
PM.add(createMachineFunctionPrinterPass(cerr));
|
||||||
|
|
||||||
|
PM.add(createLowerSubregsPass());
|
||||||
|
|
||||||
|
if (PrintMachineCode) // Print the subreg lowered code
|
||||||
|
PM.add(createMachineFunctionPrinterPass(cerr));
|
||||||
|
|
||||||
// Run post-ra passes.
|
// Run post-ra passes.
|
||||||
if (addPostRegAlloc(PM, Fast) && PrintMachineCode)
|
if (addPostRegAlloc(PM, Fast) && PrintMachineCode)
|
||||||
@ -199,8 +207,6 @@ bool LLVMTargetMachine::addPassesToEmitMachineCode(FunctionPassManager &PM,
|
|||||||
|
|
||||||
if (addPreEmitPass(PM, Fast) && PrintMachineCode)
|
if (addPreEmitPass(PM, Fast) && PrintMachineCode)
|
||||||
PM.add(createMachineFunctionPrinterPass(cerr));
|
PM.add(createMachineFunctionPrinterPass(cerr));
|
||||||
|
|
||||||
PM.add(createLowerSubregsPass());
|
|
||||||
|
|
||||||
addCodeEmitter(PM, Fast, PrintEmittedAsm, MCE);
|
addCodeEmitter(PM, Fast, PrintEmittedAsm, MCE);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user