This is an archive of the discontinued LLVM Phabricator instance.

[TBLGEN] Emit register pressure set enum
ClosedPublic

Authored by rampitec on Feb 14 2020, 1:55 PM.

Diff Detail

Event Timeline

rampitec created this revision.Feb 14 2020, 1:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 14 2020, 1:55 PM
Herald added a subscriber: wdng. · View Herald Transcript

Can we just stop emitting all of the pressure sets we don't use instead?

Can we just stop emitting all of the pressure sets we don't use instead?

I am not sure how tablegen can tell we are not going to use it. That would be a separate patch anyway, since we need a way to point to a pset even if we have fewer of them. My guess the only reason not to have this enum was some non conventional characters in names for some targets.

rampitec updated this revision to Diff 244831.Feb 15 2020, 10:23 AM

Moved to the enum section.

nhaehnle added inline comments.
llvm/utils/TableGen/RegisterInfoEmitter.cpp
101–109

Is there no pre-existing way of doing this in TableGen? If not, why is this needed in the first place?

rampitec marked an inline comment as done.Feb 16 2020, 9:16 AM
rampitec added inline comments.
llvm/utils/TableGen/RegisterInfoEmitter.cpp
101–109

I was looking for one and didn't find. Looks like in other cases tablegen just avoids such names. Here I saw "+" sign. Probably it will take yet another change to remove both invalid symbols and this function.

rampitec updated this revision to Diff 244893.Feb 16 2020, 10:15 AM

Produce legal pset names from start.

rampitec marked an inline comment as done.Feb 16 2020, 10:15 AM

This is still needed even after D74744. See D74671 why.

vpykhtin accepted this revision.Feb 18 2020, 5:55 AM

LGTM.

This revision is now accepted and ready to land.Feb 18 2020, 5:55 AM
This revision was automatically updated to reflect the committed changes.