Page MenuHomePhabricator

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

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

Details

Summary

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

Repository
rL LLVM

Event Timeline

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

LGTM - thanks

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