[PATCH] D125699: [StackColoring] Don't merge slots with differing StackIDs

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 16 13:33:43 PDT 2022


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

We have a similar fix downstream and I actually thought we already upstreamed this. In any case, good fix!



================
Comment at: llvm/lib/CodeGen/StackColoring.cpp:1322
+        // Objects with different stack IDs cannot be merged.
+        if (MFI->getStackID(SortedSlots[I]) != MFI->getStackID(SortedSlots[J]))
+          continue;
----------------
minor nit: if you move this code two lines below, you can use `FirstSlot` and `SecondSlot`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125699



More information about the llvm-commits mailing list