This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel] Refactor Combiner API
ClosedPublic

Authored by Pierre-vh on Aug 24 2023, 12:42 AM.

Details

Summary

Remove CodeGen leftovers from the old combiner backend and adapt the API to fit the new backend better.
It's now quite a bit closer to how InstructionSelector works.

  • CombinerInfo is now a simple "options" struct.
  • Combiner is now the base class of all TableGen'd combiner implementation.
    • Many fields have been moved from derived classes into that class.
    • It has been refactored to create & own the Observer and Builder.
  • tryCombineAll TableGen'd method can now be renamed, which allows targets to implement the actual tryCombineAll call manually and do whatever they want to do before/after it.

Note: CombinerHelper needs to be mutable because none of its methods are const. This can be revisited later.

Depends on D158710

Diff Detail

Event Timeline

Pierre-vh created this revision.Aug 24 2023, 12:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 24 2023, 12:42 AM
Pierre-vh requested review of this revision.Aug 24 2023, 12:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 24 2023, 12:42 AM
Pierre-vh updated this revision to Diff 554975.Aug 31 2023, 4:16 AM

Rebase + gentle ping

aemerson accepted this revision.Aug 31 2023, 7:29 AM

LGTM.

This revision is now accepted and ready to land.Aug 31 2023, 7:29 AM
dsanders accepted this revision.Aug 31 2023, 11:25 AM
This revision was landed with ongoing or failed builds.Sep 4 2023, 11:19 PM
This revision was automatically updated to reflect the committed changes.