This is an archive of the discontinued LLVM Phabricator instance.

Support itineraries in TargetSubtargetInfo::getSchedInfoStr
ClosedPublic

Authored by avt77 on Jul 28 2017, 7:10 AM.

Details

Summary

Now we support itineraries data in calcultion of latency:throughput (when we're going to print out the sched info). As result Atom schedul model shows its current numbers. I'm not sure those numbers are correct but the engine is here and we can move Atom from the old structures to the new ones.

Diff Detail

Event Timeline

avt77 created this revision.Jul 28 2017, 7:10 AM
RKSimon added inline comments.Jul 28 2017, 9:28 AM
lib/CodeGen/TargetSubtargetInfo.cpp
114

Cleanup the the nested ifs?

if (TSchedModel.hasInstrSchedModel())
  Latency = TSchedModel.computeInstrLatency(MCI.getOpcode());
else if (TSchedModel.hasInstrItineraries()) {
  auto *ItinData = TSchedModel.getInstrItineraries();
  Latency = ItinData->getStageLatency(
      getInstrInfo()->get(MCI.getOpcode()).getSchedClass());
} else
    return std::string();
avt77 updated this revision to Diff 108896.Jul 31 2017, 4:19 AM

The note mentioned by Simon fixed.

RKSimon accepted this revision.Jul 31 2017, 4:28 AM

LGTM - thanks

This revision is now accepted and ready to land.Jul 31 2017, 4:28 AM