diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2013-04-08 18:41:23 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2013-04-08 18:41:23 +0000 | 
| commit | 4a16efa3e43e35f0cc9efe3a67f620f0017c3d36 (patch) | |
| tree | 06099edc18d30894081a822b756f117cbe0b8207 /include/llvm/MC/MCSchedule.h | |
| parent | 482e7bddf617ae804dc47133cb07eb4aa81e45de (diff) | |
Diffstat (limited to 'include/llvm/MC/MCSchedule.h')
| -rw-r--r-- | include/llvm/MC/MCSchedule.h | 23 | 
1 files changed, 17 insertions, 6 deletions
diff --git a/include/llvm/MC/MCSchedule.h b/include/llvm/MC/MCSchedule.h index 0c71ee513500..defa29903543 100644 --- a/include/llvm/MC/MCSchedule.h +++ b/include/llvm/MC/MCSchedule.h @@ -12,8 +12,8 @@  //  //===----------------------------------------------------------------------===// -#ifndef LLVM_MC_MCSCHEDMODEL_H -#define LLVM_MC_MCSCHEDMODEL_H +#ifndef LLVM_MC_MCSCHEDULE_H +#define LLVM_MC_MCSCHEDULE_H  #include "llvm/Support/DataTypes.h"  #include <cassert> @@ -155,7 +155,7 @@ public:    //      Optional InstrItinerary OperandCycles provides expected latency.    //      TODO: can't yet specify both min and expected latency per operand.    int MinLatency; -  static const unsigned DefaultMinLatency = -1; +  static const int DefaultMinLatency = -1;    // LoadLatency is the expected latency of load instructions.    // @@ -172,6 +172,16 @@ public:    unsigned HighLatency;    static const unsigned DefaultHighLatency = 10; +  // ILPWindow is the number of cycles that the scheduler effectively ignores +  // before attempting to hide latency. This should be zero for in-order cpus to +  // always hide expected latency. For out-of-order cpus, it may be tweaked as +  // desired to roughly approximate instruction buffers. The actual threshold is +  // not very important for an OOO processor, as long as it isn't too high. A +  // nonzero value helps avoid rescheduling to hide latency when its is fairly +  // obviously useless and makes register pressure heuristics more effective. +  unsigned ILPWindow; +  static const unsigned DefaultILPWindow = 0; +    // MispredictPenalty is the typical number of extra cycles the processor    // takes to recover from a branch misprediction.    unsigned MispredictPenalty; @@ -196,6 +206,7 @@ public:                    MinLatency(DefaultMinLatency),                    LoadLatency(DefaultLoadLatency),                    HighLatency(DefaultHighLatency), +                  ILPWindow(DefaultILPWindow),                    MispredictPenalty(DefaultMispredictPenalty),                    ProcID(0), ProcResourceTable(0), SchedClassTable(0),                    NumProcResourceKinds(0), NumSchedClasses(0), @@ -205,12 +216,12 @@ public:    }    // Table-gen driven ctor. -  MCSchedModel(unsigned iw, int ml, unsigned ll, unsigned hl, unsigned mp, -               unsigned pi, const MCProcResourceDesc *pr, +  MCSchedModel(unsigned iw, int ml, unsigned ll, unsigned hl, unsigned ilp, +               unsigned mp, unsigned pi, const MCProcResourceDesc *pr,                 const MCSchedClassDesc *sc, unsigned npr, unsigned nsc,                 const InstrItinerary *ii):      IssueWidth(iw), MinLatency(ml), LoadLatency(ll), HighLatency(hl), -    MispredictPenalty(mp), ProcID(pi), ProcResourceTable(pr), +    ILPWindow(ilp), MispredictPenalty(mp), ProcID(pi), ProcResourceTable(pr),      SchedClassTable(sc), NumProcResourceKinds(npr), NumSchedClasses(nsc),      InstrItineraries(ii) {}  | 
