[PATCH] D95703: [GlobalISel] Propagate extends through G_PHIs into the incoming value blocks.

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 29 16:07:07 PST 2021


paquette added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:3571
+  // Extending a vector may be expensive, don't do this until heuristics are
+  // better.
+  if (MRI.getType(DstReg).isVector())
----------------
Change "don't do this until heuristics are better" into a TODO so it's easier for people to find?


================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:3575
+
+  // Try to match a phi, who's only use is an extend.
+  if (!MRI.hasOneNonDBGUse(DstReg))
----------------



================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:3632
+  SetVector<MachineInstr *> SrcMIs;
+  DenseMap<MachineInstr *, MachineInstr *> OldToNewSrcMap;
+  for (unsigned SrcIdx = 1; SrcIdx < MI.getNumOperands(); SrcIdx += 2) {
----------------
Why not `SmallDenseMap`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95703



More information about the llvm-commits mailing list