[PATCH] D45968: StackSlotColoring: Decide colors per stack ID

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 23 13:21:53 PDT 2018


arsenm added a comment.

In https://reviews.llvm.org/D45968#1075929, @qcolombet wrote:

> Disclaimer: I haven't never looked at how this pass actually works so take my comments with a grain of salt!
>
> Hi Matt,
>
> If we do the tracking per StackID, how do we make sure the UsedColors don't overlaps between conflicting StackIDs?
>
> Basically, I am not saying the patch is wrong, instead I am looking at what kind of assert/verify we could add to make sure it doesn't happen going down the path of the data not being "globally sync-ed".
>
> Cheers,
> -Quentin


The set of used colors is tracked separately for each one (i.e. UsedColors is now a vector of tracked colors per stack ID), as is the rest of the machinery. I added some assertions in the backend which catch some of these, and one in this patch. It's possible there's a better place for the assert.


https://reviews.llvm.org/D45968





More information about the llvm-commits mailing list