[llvm] r269969 - When looking for a spill slot in reg scavenger, find one that matches RC

Krzysztof Parzyszek via llvm-commits llvm-commits at lists.llvm.org
Fri May 20 09:11:50 PDT 2016


Getting to this particular place in register scavenger is an indication 
of a problem.  That should not happen under any conditions, so it 
qualifies for llvm_unreachable.  There is nothing that the user can do 
to remedy this situation once it happens.  That ties to your comment 
about when to use unreachable vs report_fatal_error.

I was under impression that llvm_unreachable expands to nothing in 
release mode---turns out it is not true.  I'd rather remove the 
report_fatal_error and keep the unreachable in this case.

-Krzysztof



On 5/20/2016 11:01 AM, Benjamin Kramer wrote:
> report_fatal_error produces user-visible errors, I don't think
> including stack traces there is in any way helpful and will only cause
> confusion. If a compiler dev doesn't like using a debugger they can
> still grep for the error message and quickly find where it's coming
> from ...
>
> On Fri, May 20, 2016 at 5:51 PM, Krzysztof Parzyszek
> <kparzysz at codeaurora.org> wrote:
>> On 5/20/2016 10:43 AM, Benjamin Kramer wrote:
>>>
>>> You can
>>> easily get a stack trace from a debugger, no need to use
>>> llvm_unreachable for that.
>>
>>
>> That forces people to use debuggers, which I really don't like.
>>
>> Maybe printing the stack trace from report_fatal_error (when assertions are
>> enabled) would be an option?
>>
>> -Krzysztof
>>
>>
>>
>> --
>> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by
>> The Linux Foundation


-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation


More information about the llvm-commits mailing list