[MC] Move the instruction latency computation from TargetSchedModel to MCSchedModel.

Authored by andreadb on Mon, Mar 12, 7:17 AM.



This patch moves the logic that computes the instruction latency from a scheduling class descriptor into MCSchedModel from TargetSchedModel.

The TargetSchedModel API is unchanged; now method TargetSchedModel::computeInstrLatency(const MCSchedClassDesc &) simply delegates the latency computation to MCSchedModel.

The goal is to make the latency information accessible through the MCSchedModel interface.
This is particularly important for tools (for example: llvm-mca), that have access to MCSchedModel, but not TargetSchedModel.

This is a first step towards fixing PR36676.

No functional change intended.

Diff Detail

andreadb created this revision.Mon, Mar 12, 7:17 AM
RKSimon accepted this revision.Tue, Mar 13, 7:02 AM

LGTM - thanks

This revision is now accepted and ready to land.Tue, Mar 13, 7:02 AM
This revision was automatically updated to reflect the committed changes.