Page MenuHomePhabricator

[gicombiner] Allow generated CombinerHelpers to have additional arguments
ClosedPublic

Authored by dsanders on Jun 15 2020, 12:07 PM.

Details

Summary

This allows combiners to delegate to other helpers or depend
on additional information. It's not great as an overall
solution though as callers must provide the argument on every call, even for
static data like an additional helper. Another patch will follow to
support additional members of the generated combiner.

Diff Detail

Event Timeline

dsanders created this revision.Jun 15 2020, 12:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2020, 12:07 PM
Herald added a subscriber: wdng. · View Herald Transcript

Doesn't https://reviews.llvm.org/D81863 make this unnecessary?

No, at the moment some targets are still using this for their CombinerHelper. Even if we make CombinerHelper a standard one there's still potential for this to be used by non-static things like the results of compute known bits* or some other (possibly target specific) localized knowledge. Essentially, D81863 covers static/global knowledge and this covers dynamic/local knowledge.

*The analysis pass itself would be static and but the results are dynamic so it really comes down to the preferred way to use that one.

This revision is now accepted and ready to land.Jun 16 2020, 10:59 AM
This revision was automatically updated to reflect the committed changes.