[PATCH 1/2] AMDGPU/SIInsertWaitcnts: Fix comparison of integers of different signs

Mauro Rossi via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 9 07:39:22 PDT 2018


Hi Mark,
no problem

Pardon me, if I may have contacted wrong people or in the wrong way,
because I am not familiar with your proceedings
and please review it because I've very basic coding skills,
which gives the worst combination possible :-)
Kind regards

Mauro





Il giorno lun 9 lug 2018 alle ore 17:37 Mark Searles <m.c.searles at gmail.com>
ha scritto:

> Mauro,
>
> Sorry, I thought you just wanted a review from me, not for me to submit
> the patch itself. Perhaps that was a wrong assumption. I will submit the
> patch; give me a day or two.
>
> Thanks,
>
> Mark
>
> On Sun, Jul 8, 2018 at 1:23 PM Mauro Rossi <issor.oruam at gmail.com> wrote:
>
>> Hi,
>>
>>
>> Il giorno lun 11 giu 2018 alle ore 18:01 Mark Searles <
>> m.c.searles at gmail.com> ha scritto:
>>
>>> LGTM
>>>
>>> Mark
>>>
>>
>> Could you please check if the patch has been applied?
>>
>> With llvm-mirrors/master branch the building error is still happening
>> with Android and also in stable branch
>> and the commit is necessary to avoid the building error.
>> Kind regards
>>
>> Mauro
>>
>>
>>>
>>> On Mon, Jun 11, 2018 at 12:06 AM Hans Wennborg <hans at chromium.org>
>>> wrote:
>>>
>>>> - llvm-dev, +llvm-commits
>>>>
>>>> Mark, this looks like your code. Can you take a look?
>>>>
>>>>
>>>> On Sun, Jun 10, 2018 at 3:34 PM, Mauro Rossi <issor.oruam at gmail.com>
>>>> wrote:
>>>> > Fixes the following building error:
>>>> >
>>>> > external/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp:1903:61:
>>>> > error: comparison of integers of different signs:
>>>> > 'typename iterator_traits<__wrap_iter<MachineBasicBlock **>
>>>> >::difference_type'
>>>> > (aka 'int') and 'unsigned int' [-Werror,-Wsign-compare]
>>>> >                       BlockWaitcntProcessedSet.end(), &MBB) < Count))
>>>> {
>>>> >                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~
>>>> > 1 error generated.
>>>> >
>>>> > Fixes: 4f520606fc ("[AMDGPU] Do not only rely on BB number when
>>>> finding bottom loop")
>>>> > ---
>>>> >  lib/Target/AMDGPU/SIInsertWaitcnts.cpp | 2 +-
>>>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>>>> >
>>>> > diff --git a/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
>>>> b/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
>>>> > index fb24d528c33..c3c93cc85e2 100644
>>>> > --- a/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
>>>> > +++ b/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
>>>> > @@ -1900,7 +1900,7 @@ bool
>>>> SIInsertWaitcnts::runOnMachineFunction(MachineFunction &MF) {
>>>> >        // If the loop has multiple back-edges, and so more than one
>>>> "bottom"
>>>> >        // basic block, we have to guarantee a re-walk over every
>>>> blocks.
>>>> >        if ((std::count(BlockWaitcntProcessedSet.begin(),
>>>> > -                      BlockWaitcntProcessedSet.end(), &MBB) <
>>>> Count)) {
>>>> > +                      BlockWaitcntProcessedSet.end(), &MBB) < (int)
>>>> Count)) {
>>>> >          BlockWaitcntBracketsMap[&MBB]->setRevisitLoop(true);
>>>> >          LLVM_DEBUG(dbgs() << "set-revisit1: Block"
>>>> >                            <<
>>>> ContainingLoop->getHeader()->getNumber() << '\n';);
>>>> > --
>>>> > 2.17.1
>>>> >
>>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180709/a34fe824/attachment.html>


More information about the llvm-commits mailing list