This is an archive of the discontinued LLVM Phabricator instance.

[TargetSchedule] Expose sub-units of a ProcResGroup in MCProcResourceDesc.
ClosedPublic

Authored by courbet on Feb 7 2018, 8:06 AM.

Details

Summary

Right now using a ProcResource automatically counts as usage of all
super ProcResGroups. All this is done during codegen, so there is no
way for schedulers to get this information at runtime.

This adds the information of which individual ProcRes units are
contained in a ProcResGroup in MCProcResourceDesc.

Diff Detail

Event Timeline

courbet created this revision.Feb 7 2018, 8:06 AM
gchatelet requested changes to this revision.Feb 7 2018, 8:52 AM
gchatelet added inline comments.
include/llvm/MC/MCSchedule.h
47

What if the resource has no sub-units?

utils/TableGen/SubtargetEmitter.cpp
591

Do you mind writing the negation:

// skipping non ProcResGroup.
if (!PRDef->isSubClassOf("ProcResGroup")) continue;

This revision now requires changes to proceed.Feb 7 2018, 8:52 AM
courbet updated this revision to Diff 133230.Feb 7 2018, 8:58 AM
courbet marked an inline comment as done.
  • Better comments
  • Cosmetics
courbet marked an inline comment as done.Feb 7 2018, 8:59 AM
gchatelet accepted this revision.Feb 7 2018, 9:05 AM
This revision is now accepted and ready to land.Feb 7 2018, 9:05 AM
This revision was automatically updated to reflect the committed changes.