[PATCH] [RegisterScavenger] Fix handling of predicated instructions

Quentin Colombet qcolombet at apple.com
Tue Apr 28 09:49:18 PDT 2015


> On Apr 22, 2015, at 1:37 PM, Tobias Edler von Koch <tobias at codeaurora.org> wrote:
> 
> +llvm-commits
> 
> On Tue, 21 Apr 2015 14:18:56 -0700 Quentin Colombet
> <qcolombet at apple.com> wrote:
>> 
>>> On Apr 21, 2015, at 1:35 PM, Evan Cheng <evan.cheng at apple.com> wrote:
>>> 
>>> + Quentin
>>> 
>>> Quentin, what do you think? More specifically, is it true that kill flags are always in place on predicated instructions?
>> 
>> I haven’t checked the if-converstion pass, but I am not sure those flags are updated correctly with predicated instructions.
>> 
>> Tobias, which commit makes you think the problem has been solved?
> 
> I don't know of a specific commit. But here's my reasoning:
> 
> If kill flags were incorrectly set on predicate instructions, wouldn't
> we see uses of those registers after they were killed? The
> MachineVerifier would flag these up.

Not necessarily. IIRC, the MachineVerifier relies on the live-in information which is updated independently than the kill flags. The consequence is as long as the libe-in information is correct and the uses in different block, the kill flag may be wrong and the MachineVerifier will not complain.

Could you double check how the MachineVerifier actually work with the kill flags?

Cheers,
-Quentin
> 
> The opposite case, a kill flag not being set when it really should be,
> is still fine - the patch shouldn't affect that situation.
> 
> Tobias
> 
> -- 
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a
> Linux Foundation Collaborative Project.





More information about the llvm-commits mailing list