mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Enable the Load/Store optimization pass for Thumb1 but make it return immediately for now.
Patch by Moritz Roth! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208991 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bdbf5af5c6
commit
2c9f8a715e
@ -68,7 +68,7 @@ namespace {
|
||||
const ARMSubtarget *STI;
|
||||
ARMFunctionInfo *AFI;
|
||||
RegScavenger *RS;
|
||||
bool isThumb2;
|
||||
bool isThumb1, isThumb2;
|
||||
|
||||
bool runOnMachineFunction(MachineFunction &Fn) override;
|
||||
|
||||
@ -1520,6 +1520,10 @@ bool ARMLoadStoreOpt::runOnMachineFunction(MachineFunction &Fn) {
|
||||
STI = &TM.getSubtarget<ARMSubtarget>();
|
||||
RS = new RegScavenger();
|
||||
isThumb2 = AFI->isThumb2Function();
|
||||
isThumb1 = AFI->isThumbFunction() && !isThumb2;
|
||||
|
||||
// Don't do anything in this pass with Thumb1 for now.
|
||||
if (isThumb1) return false;
|
||||
|
||||
bool Modified = false;
|
||||
for (MachineFunction::iterator MFI = Fn.begin(), E = Fn.end(); MFI != E;
|
||||
@ -1581,6 +1585,11 @@ bool ARMPreAllocLoadStoreOpt::runOnMachineFunction(MachineFunction &Fn) {
|
||||
MRI = &Fn.getRegInfo();
|
||||
MF = &Fn;
|
||||
|
||||
ARMFunctionInfo *AFI = Fn.getInfo<ARMFunctionInfo>();
|
||||
bool isThumb1 = AFI->isThumbFunction() && !AFI->isThumb2Function();
|
||||
// Don't do anything in this pass with Thumb1 for now.
|
||||
if (isThumb1) return false;
|
||||
|
||||
bool Modified = false;
|
||||
for (MachineFunction::iterator MFI = Fn.begin(), E = Fn.end(); MFI != E;
|
||||
++MFI)
|
||||
|
@ -247,8 +247,7 @@ bool ARMPassConfig::addInstSelector() {
|
||||
}
|
||||
|
||||
bool ARMPassConfig::addPreRegAlloc() {
|
||||
// FIXME: temporarily disabling load / store optimization pass for Thumb1.
|
||||
if (getOptLevel() != CodeGenOpt::None && !getARMSubtarget().isThumb1Only())
|
||||
if (getOptLevel() != CodeGenOpt::None)
|
||||
addPass(createARMLoadStoreOptimizationPass(true));
|
||||
if (getOptLevel() != CodeGenOpt::None && getARMSubtarget().isCortexA9())
|
||||
addPass(createMLxExpansionPass());
|
||||
@ -262,12 +261,10 @@ bool ARMPassConfig::addPreRegAlloc() {
|
||||
}
|
||||
|
||||
bool ARMPassConfig::addPreSched2() {
|
||||
// FIXME: temporarily disabling load / store optimization pass for Thumb1.
|
||||
if (getOptLevel() != CodeGenOpt::None) {
|
||||
if (!getARMSubtarget().isThumb1Only()) {
|
||||
addPass(createARMLoadStoreOptimizationPass());
|
||||
printAndVerify("After ARM load / store optimizer");
|
||||
}
|
||||
addPass(createARMLoadStoreOptimizationPass());
|
||||
printAndVerify("After ARM load / store optimizer");
|
||||
|
||||
if (getARMSubtarget().hasNEON())
|
||||
addPass(createExecutionDependencyFixPass(&ARM::DPRRegClass));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user