[PATCH] D46298: AMDGPU: Remove deadcode in isSDNodeSourceOfDivergence()
Tom Stellard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 23 20:39:02 PDT 2018
tstellar added a comment.
In https://reviews.llvm.org/D46298#1086262, @alex-t wrote:
> Could you please clarify - why do you consider that check meaningless for r600?
> I see that this line : " const SISubtarget &ST = MF->getSubtarget<SISubtarget>(); " is misleading and in fact is not correct.
> I'd better check and choose the R600Subtarget or SISubtarget.
> If I understand right we need just check which subtarget to retrieve for physregs check.
>
> Since we consider any VGPR formal argument as divergent it does not matter R600 or SI at all.
> We need to choose right TargetRegisterInfo (r600 or SI again)
>
> So, for virtual register : if (MRI.isLiveIn(Reg) && TRI.isVGPR(Reg) ) return true
>
> Or I maybe don't know something substantial? :)
I would expect the TRI.isVGPR() call to crash if this was called from an R600 code path, so that made me think this was dead code.
Repository:
rL LLVM
https://reviews.llvm.org/D46298
More information about the llvm-commits
mailing list