Skip to content

[AMDGPU] GISelShouldIgnore .td uses #90005

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 13 commits into from
Closed

Conversation

jofrn
Copy link
Contributor

@jofrn jofrn commented Apr 24, 2024

#88382 implements the new bit for class Pattern in TargetSelectionDAG.td.

This applies it to all affected Pattern records with a warning: Skipped pattern: from -warn-on-skipped-patterns.

jofrn added 13 commits April 11, 2024 08:06
Added a new DAGISelShouldIgnore property to class Instruction in Target.td, similar to FastISelShouldIgnore. This allows one to avoid a record's DAGISel .td implementation and .inc generation.
This test ensures no .inc code is generated in the MatcherTable for the corresponding marked .td record.
…ble pattern imports in GISel

Via `let ISelShouldIgnore = 1`, a Pattern record can be disabled to skip pattern warnings in GlobalISel.
This test ensures the MatchTable has no patterns marked with GISelShouldIgnore.
The intended usage of ShouldIgnore is to disable warnings. This test
checks the .inc Emitter output of GISel only. So we can remove it here.
Apply the new bit to Pattern records to avoid warnings from -warn-on-skipped-patterns. This still needs formatting...
@jofrn jofrn requested review from arsenm, Pierre-vh and shiltian April 24, 2024 23:48
Copy link
Contributor

@arsenm arsenm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most or all of these shouldn't be added. The point is to silence the warnings for cases where we never want to import them. This is just hiding the useful warnings

@jofrn
Copy link
Contributor Author

jofrn commented Apr 25, 2024

Most or all of these shouldn't be added. The point is to silence the warnings for cases where we never want to import them. This is just hiding the useful warnings

It definitely isn't all because this applies ShouldIgnore to each (and every) skipped GI Pattern that we have. At least one Pattern'd be bound to require this (forever!)... will need to examine them more closely; you mentioned some time back that it should be only for patterns applied to scalars, correct? This commit is surely more than that, so will make the next one more precise and include only those.

@arsenm
Copy link
Contributor

arsenm commented Apr 25, 2024

will need to examine them more closely; you mentioned some time back that it should be only for patterns applied to scalars, correct? This commit is surely more than that, so will make the next one more precise and include only those.

Nothing about scalars, it's about usage intent. I think there were some pseudos we bypass which we don't need the pattern. I haven't looked at the -warn-on-skipped patterns output in a while so I don't remember what the obvious cases are

@jofrn
Copy link
Contributor Author

jofrn commented Apr 25, 2024

I see. Alright, let's see then...

@arsenm
Copy link
Contributor

arsenm commented May 8, 2024

Probably should just abandon this. We definitely do not want to blindly throw this on everything that fails to import. This is reserved as a tool for whenever someone is aiming for 100% pattern coverage

@jofrn jofrn closed this May 8, 2024
@jofrn
Copy link
Contributor Author

jofrn commented May 8, 2024

Okay, that is good thinking since we do not want to commit this actually; ... closed it.

It can be used as a reference of all Patterns that have a skipped pattern warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants