mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Add a option which would move ld/st multiple pass before post-alloc scheduling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83145 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
629adde699
commit
792e1f6df9
@ -22,6 +22,10 @@
|
||||
#include "llvm/Target/TargetRegistry.h"
|
||||
using namespace llvm;
|
||||
|
||||
static cl::opt<bool>
|
||||
LdStBeforeSched("ldstopti-before-sched2", cl::Hidden,
|
||||
cl::desc("Move ld / st multiple pass before postalloc scheduling"));
|
||||
|
||||
static const MCAsmInfo *createMCAsmInfo(const Target &T,
|
||||
const StringRef &TT) {
|
||||
Triple TheTriple(TT);
|
||||
@ -101,10 +105,21 @@ bool ARMBaseTargetMachine::addPreRegAlloc(PassManagerBase &PM,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ARMBaseTargetMachine::addPreSched2(PassManagerBase &PM,
|
||||
CodeGenOpt::Level OptLevel) {
|
||||
// FIXME: temporarily disabling load / store optimization pass for Thumb1.
|
||||
if (OptLevel != CodeGenOpt::None && !Subtarget.isThumb1Only())
|
||||
if (LdStBeforeSched)
|
||||
PM.add(createARMLoadStoreOptimizationPass());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ARMBaseTargetMachine::addPreEmitPass(PassManagerBase &PM,
|
||||
CodeGenOpt::Level OptLevel) {
|
||||
// FIXME: temporarily disabling load / store optimization pass for Thumb1.
|
||||
if (OptLevel != CodeGenOpt::None && !Subtarget.isThumb1Only()) {
|
||||
if (!LdStBeforeSched)
|
||||
PM.add(createARMLoadStoreOptimizationPass());
|
||||
PM.add(createIfConverterPass());
|
||||
}
|
||||
|
@ -50,6 +50,7 @@ public:
|
||||
// Pass Pipeline Configuration
|
||||
virtual bool addInstSelector(PassManagerBase &PM, CodeGenOpt::Level OptLevel);
|
||||
virtual bool addPreRegAlloc(PassManagerBase &PM, CodeGenOpt::Level OptLevel);
|
||||
virtual bool addPreSched2(PassManagerBase &PM, CodeGenOpt::Level OptLevel);
|
||||
virtual bool addPreEmitPass(PassManagerBase &PM, CodeGenOpt::Level OptLevel);
|
||||
virtual bool addCodeEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel,
|
||||
MachineCodeEmitter &MCE);
|
||||
|
Loading…
Reference in New Issue
Block a user