[PATCH] D135044: [GlobalISel] Allow prelegalizer combiners to have access to LegalizerInfo.
Amara Emerson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 2 23:35:16 PDT 2022
aemerson added inline comments.
================
Comment at: llvm/lib/Target/AArch64/GISel/AArch64PreLegalizerCombiner.cpp:380-381
MachineIRBuilder &B) const {
- CombinerHelper Helper(Observer, B, KB, MDT);
+ const auto *LI =
+ MI.getParent()->getParent()->getSubtarget().getLegalizerInfo();
+ CombinerHelper Helper(Observer, B, /* IsPreLegalize*/ true, KB, MDT, LI);
----------------
arsenm wrote:
> aemerson wrote:
> > arsenm wrote:
> > > Easier to read this out of the CombinerHelper
> > Not sure what you mean?
> Should have a getter for Helper.LI, MI.getParent()->getParent()->getSubtarget().getLegalizerInfo() is really long
We're trying to construct a CombinerHelper here so we don't have that available yet. I'll shorten it a bit to use `MI.getMF()` instead.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135044/new/
https://reviews.llvm.org/D135044
More information about the llvm-commits
mailing list