mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 23:24:34 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191071 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -23,8 +23,10 @@ namespace llvm {
|
||||
|
||||
class FunctionPass;
|
||||
class MachineFunctionPass;
|
||||
struct MachineSchedContext;
|
||||
class PassInfo;
|
||||
class PassManagerBase;
|
||||
class ScheduleDAGInstrs;
|
||||
class TargetLoweringBase;
|
||||
class TargetLowering;
|
||||
class TargetRegisterClass;
|
||||
@ -204,6 +206,20 @@ public:
|
||||
/// Fully developed targets will not generally override this.
|
||||
virtual void addMachinePasses();
|
||||
|
||||
/// createTargetScheduler - Create an instance of ScheduleDAGInstrs to be run
|
||||
/// within the standard MachineScheduler pass for this function and target at
|
||||
/// the current optimization level.
|
||||
///
|
||||
/// This can also be used to plug a new MachineSchedStrategy into an instance
|
||||
/// of the standard ScheduleDAGMI:
|
||||
/// return new ScheduleDAGMI(C, new MyStrategy(C))
|
||||
///
|
||||
/// Return NULL to select the default (generic) machine scheduler.
|
||||
virtual ScheduleDAGInstrs *
|
||||
createMachineScheduler(MachineSchedContext *C) const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
protected:
|
||||
// Helper to verify the analysis is really immutable.
|
||||
void setOpt(bool &Opt, bool Val);
|
||||
|
Reference in New Issue
Block a user