[PATCH] D73510: Reland "[StackColoring] Remap PseudoSourceValue frame indices via MachineFunction::getPSVManager()""

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 27 15:51:07 PST 2020


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

lgtm



================
Comment at: llvm/lib/CodeGen/StackColoring.cpp:1080
+      const PseudoSourceValue *NewSV =
+          MF->getPSVManager().getFixedStack(SlotRemap[E.index()]);
+      for (MachineMemOperand *Ref : E.value())
----------------
Are you sure it wouldn't be better to do `*SlotRemap.find(E.index())`? Then it is clear that the operation is readonly. As is, I agree that it is impossible for this to insert a value, the vector for this index will only be non-empty if there is already an entry in the table.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73510





More information about the llvm-commits mailing list