This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel] Add Predicates to GICombineRule
ClosedPublic

Authored by Pierre-vh on Oct 25 2022, 6:42 AM.

Details

Summary

Small QoL change to allow Predicates to be used in GICombineRule.
Currently only one combine in the AMDGPU backend makes use of it.

The implementation is pretty simple to get started but of course we can expand this later on and optimize predicate checking better if needed.

Diff Detail

Event Timeline

Pierre-vh created this revision.Oct 25 2022, 6:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 25 2022, 6:42 AM
Pierre-vh requested review of this revision.Oct 25 2022, 6:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 25 2022, 6:42 AM
Pierre-vh updated this revision to Diff 470467.Oct 25 2022, 6:44 AM

Add missing test

Pierre-vh updated this revision to Diff 470468.Oct 25 2022, 6:44 AM

Oops, newline at EOF.

Pierre-vh updated this revision to Diff 470481.Oct 25 2022, 7:16 AM

Fix predicate

dsanders accepted this revision.Oct 25 2022, 10:14 AM

LGTM, ideally as you say this ought to be part of the partitioning so the generated can code efficiently get to the relevant leaves more directly but this is fine for now

This revision is now accepted and ready to land.Oct 25 2022, 10:14 AM
This revision was automatically updated to reflect the committed changes.
foad added a comment.Oct 26 2022, 3:13 AM

LGTM, ideally as you say this ought to be part of the partitioning so the generated can code efficiently get to the relevant leaves more directly but this is fine for now

Maybe leave a TODO in the code to that effect?