[llvm] r298260 - [Outliner] Remove output for offset range check

Jessica Paquette via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 20 09:37:57 PDT 2017


Oh, you’re right. That’s weird and wrong. Fixed.

Jessica

> On Mar 20, 2017, at 9:32 AM, Quentin Colombet <qcolombet at apple.com> wrote:
> 
> Hi Jessica,
> 
> The change seems backward to me.
> You kept the output but got rid of the return illegal.
> 
> Cheers,
> -Quentin
>> On Mar 20, 2017, at 8:51 AM, Jessica Paquette via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>> 
>> Author: paquette
>> Date: Mon Mar 20 10:51:45 2017
>> New Revision: 298260
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=298260&view=rev
>> Log:
>> [Outliner] Remove output for offset range check
>> 
>> Forgot to remove some output before committing last time. (Instruction fixups
>> don't actually overflow anywhere in the test suite so far, so I missed it).
>> 
>> To prevent the outliner from screaming "Overflow!" in the event that that
>> does happen, this commit removes that output.
>> 
>> Modified:
>>   llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.cpp
>> 
>> Modified: llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.cpp?rev=298260&r1=298259&r2=298260&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.cpp (original)
>> +++ llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.cpp Mon Mar 20 10:51:45 2017
>> @@ -4348,10 +4348,8 @@ AArch64InstrInfo::getOutliningType(Machi
>>      // TODO: We should really test what happens if an instruction overflows.
>>      // This is tricky to test with IR tests, but when the outliner is moved
>>      // to a MIR test, it really ought to be checked.
>> -      if (Offset + 16 < MinOffset || Offset + 16 > MaxOffset) {
>> +      if (Offset + 16 < MinOffset || Offset + 16 > MaxOffset)
>>        errs() << "Overflow!\n";
>> -        return MachineOutlinerInstrType::Illegal;
>> -      }
>> 
>>      // It's in range, so we can outline it.
>>      return MachineOutlinerInstrType::Legal;
>> 
>> 
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> 



More information about the llvm-commits mailing list