[PATCH] D135044: [GlobalISel] Allow prelegalizer combiners to have access to LegalizerInfo.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 2 19:11:31 PDT 2022


arsenm 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);
----------------
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


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