summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Hexagon
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2013-09-20 05:14:41 +0000
committerAndrew Trick <atrick@apple.com>2013-09-20 05:14:41 +0000
commit978674b2bcb0c73cc33628f35857963924b0f4fc (patch)
tree926902639c0acd17b7313f3c8a13151e6fe3abb8 /llvm/lib/Target/Hexagon
parenteb0434e9aebf1b98b74f96b4d0a0e33d252a8e3d (diff)
downloadbcm5719-llvm-978674b2bcb0c73cc33628f35857963924b0f4fc.tar.gz
bcm5719-llvm-978674b2bcb0c73cc33628f35857963924b0f4fc.zip
Allow subtarget selection of the default MachineScheduler and document the interface.
The global registry is used to allow command line override of the scheduler selection, but does not work well as the normal selection API. For example, the same LLVM process should be able to target multiple targets or subtargets. llvm-svn: 191071
Diffstat (limited to 'llvm/lib/Target/Hexagon')
-rw-r--r--llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp b/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp
index cd96b58e0b6..bb950a0ea75 100644
--- a/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp
@@ -102,17 +102,25 @@ class HexagonPassConfig : public TargetPassConfig {
public:
HexagonPassConfig(HexagonTargetMachine *TM, PassManagerBase &PM)
: TargetPassConfig(TM, PM) {
- // Enable MI scheduler.
- if (!DisableHexagonMISched) {
+ // FIXME: Rather than calling enablePass(&MachineSchedulerID) below, define
+ // HexagonSubtarget::enableMachineScheduler() { return true; }.
+ // That will bypass the SelectionDAG VLIW scheduler, which is probably just
+ // hurting compile time and will be removed eventually anyway.
+ if (DisableHexagonMISched)
+ disablePass(&MachineSchedulerID);
+ else
enablePass(&MachineSchedulerID);
- MachineSchedRegistry::setDefault(createVLIWMachineSched);
- }
}
HexagonTargetMachine &getHexagonTargetMachine() const {
return getTM<HexagonTargetMachine>();
}
+ virtual ScheduleDAGInstrs *
+ createMachineScheduler(MachineSchedContext *C) const {
+ return createVLIWMachineSched(C);
+ }
+
virtual bool addInstSelector();
virtual bool addPreRegAlloc();
virtual bool addPostRegAlloc();
OpenPOWER on IntegriCloud