This is an archive of the discontinued LLVM Phabricator instance.

[TableGen] Add a !listremove() bang operator
ClosedPublic

Authored by RKSimon on Dec 8 2022, 8:55 AM.

Details

Summary

This patch proposes to add a !listremove() bang operator to allow us to prune list entries by removing any entries from the first list arg that are also contained in the second list arg.

The particular use case I have in mind is for improved analysis of x86 scheduler models for which I'm hoping to start using the CodeGenProcModel 'Unsupported' features lists, which lists the ISA features a particular model DOESN'T support - with such a diverse and growing list of x86 ISAs, I don't want to have to update all these lists with every ISA change to every model - so I'm intending to keep a single central list of all x86 features, and then have the each model "remove" the features that it supports via a !listremove() - leaving just the unsupported ones.

Diff Detail

Event Timeline

RKSimon created this revision.Dec 8 2022, 8:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 8 2022, 8:55 AM
RKSimon requested review of this revision.Dec 8 2022, 8:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 8 2022, 8:55 AM

Sounds reasonable to me.

I think you have everything covered.

Cheers - anybody willing to accept?

lebedev.ri accepted this revision.Dec 9 2022, 5:53 AM

Missing llvm/trunk/utils/kate/llvm-tablegen.xml change.
Thanks.

This revision is now accepted and ready to land.Dec 9 2022, 5:53 AM
This revision was landed with ongoing or failed builds.Dec 9 2022, 7:03 AM
This revision was automatically updated to reflect the committed changes.

Missing llvm/trunk/utils/kate/llvm-tablegen.xml change.
Thanks.

Nice catch! Cheers.