[PATCH] D45157: [RegUsageInfoCollector] Don't assume the alias of a defined reg is always already in the set.

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 23 13:44:47 PDT 2018


qcolombet added a comment.

I am not sure I like the patch in the sense that the comment for UsedPhysRegsMask (in ’MachineRegisterInfo.h) explicitly said that it should contain all the aliases.

So either, we change this assumption (which that patch does) and we update the patch to change the comment *and* we make sure it does not break anything else if other targets start to not put the aliases in that set, or we fix that target to add the aliases when it creates the set.

>From a high level point of view, it looks riskier to take the first approach. Can't we change the code that set this mask in SystemZ?

@jonpa from the PR, I didn't get if the mask was "wrong" before RegCollectUsage starts or if it is RegCollectUsage that fails to update it. IIRC, RegCollectUsage does not change UsedPhysRegsMask, so I was assuming the state was wrong to begin with.


https://reviews.llvm.org/D45157





More information about the llvm-commits mailing list