diff options
Diffstat (limited to 'include/llvm/MC/MCSchedule.h')
| -rw-r--r-- | include/llvm/MC/MCSchedule.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/llvm/MC/MCSchedule.h b/include/llvm/MC/MCSchedule.h index 49e3fee..3b1cdf1 100644 --- a/include/llvm/MC/MCSchedule.h +++ b/include/llvm/MC/MCSchedule.h @@ -78,6 +78,11 @@ public: unsigned HighLatency; static const unsigned DefaultHighLatency = 10; + // MispredictPenalty is the typical number of extra cycles the processor + // takes to recover from a branch misprediction. + unsigned MispredictPenalty; + static const unsigned DefaultMispredictPenalty = 10; + private: // TODO: Add a reference to proc resource types and sched resource tables. @@ -90,17 +95,18 @@ public: // target code can use it in static initializers. The defaults need to be // initialized in this default ctor because some clients directly instantiate // MCSchedModel instead of using a generated itinerary. - MCSchedModel(): IssueWidth(DefaultMinLatency), + MCSchedModel(): IssueWidth(DefaultIssueWidth), MinLatency(DefaultMinLatency), LoadLatency(DefaultLoadLatency), HighLatency(DefaultHighLatency), + MispredictPenalty(DefaultMispredictPenalty), InstrItineraries(0) {} // Table-gen driven ctor. - MCSchedModel(unsigned iw, int ml, unsigned ll, unsigned hl, + MCSchedModel(unsigned iw, int ml, unsigned ll, unsigned hl, unsigned mp, const InstrItinerary *ii): IssueWidth(iw), MinLatency(ml), LoadLatency(ll), HighLatency(hl), - InstrItineraries(ii){} + MispredictPenalty(mp), InstrItineraries(ii){} }; } // End llvm namespace |
