[PATCH] D141135: [RFC][GlobalISel] Replace the current GlobalISel matcher with a bottom-up matcher

Kai Nacke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 6 08:15:42 PST 2023


Kai added a comment.

In D141135#4031488 <https://reviews.llvm.org/D141135#4031488>, @arsenm wrote:

>> Adding the new parameter to tryCombineAll() should possibly be a separate PR. I think that introducing a new class CombinerState, which is just a thin wrapper around a DenseMap<MachineInstr *, unsigned>, would also make sense.
>
> Like D81899 <https://reviews.llvm.org/D81899>?

I think this does not go far enough. To be able to look over the boundary of a basic block the state must be available for the while MachineFunction.
Therefore I store the state in the `Combiner`, and pass it down to `CombinerInfo::combine`. An alternative would be to add a new member to `CombinerInfo`. This is just for the life time requirement, the usage is only in the `tryCombineAll()`, but I have not yet found a better solution.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141135/new/

https://reviews.llvm.org/D141135



More information about the llvm-commits mailing list