This is an archive of the discontinued LLVM Phabricator instance.

[RFC][Patch 2/3] Add a MCSubtargetInfo hook to resolve variant scheduling classes.
ClosedPublic

Authored by andreadb on May 18 2018, 9:28 AM.

Details

Summary

This patch is the second of a sequence of three patches related to LLVM-dev RFC "MC support for variant scheduling classes". http://lists.llvm.org/pipermail/llvm-dev/2018-May/123181.html

This patch requires D46695 to be applied first.

This patch introduces a new method named MCSubtargetInfo::resolveVariantSchedClass(), which can be used to resolve variant classes when the input is a MCInst.

This patch also teaches the SubtargetEmitter how to automatically generate the definition of that new method in a sub-class of MCSubtargetInfo named XXXGenMCSubtargetInfo (where XXX is the name of the Target).

Diff Detail

Event Timeline

RKSimon added inline comments.May 18 2018, 9:57 AM
TableGen/InstrInfoEmitter.cpp
360

Isn't this a StringRef?

andreadb added inline comments.May 18 2018, 10:03 AM
TableGen/InstrInfoEmitter.cpp
360

Yes. Sorry. I will change it.

andreadb updated this revision to Diff 147774.May 21 2018, 5:46 AM

Address review comment.

  • Use StringRef instead of std::string.

In conjunction with D46695 this LGTM unless anyone has any reservations?

RKSimon accepted this revision.May 25 2018, 7:18 AM

LGTM in conjunction with D46695

This revision is now accepted and ready to land.May 25 2018, 7:18 AM
This revision was automatically updated to reflect the committed changes.