On 16 October 2012 14:58, Ramana Radhakrishnan <[email protected]> wrote: > shrink-wrap.patch doesn't apply cleanly to the revision you suggest. If you > give a clean patch and some description of what happens I might be able to > take a look ..
Please try the new one. With the patch, your build might fail when
build libraries.
internal compiler error: in maybe_record_trace_start, at dwarf2cfi.c:2224
To get a toolchain, just remove the line at dwarf2cfi.c:2224.
gcc_checking_assert (cfi_row_equal_p (cur_row, ti->beg_row));
After build OK. Re add the line at dwarf2cfi.c:2224 and make install.
> What do you expect to happen with the testcases ? ICE ? wrong-code ,
> wrong-debug info, what ?
All cases will be ICE due to wrong debug info.
My option is: -mthumb -mcpu=cortex-m3 -O2 -g
For all cases, it will ICE.
internal compiler error: in maybe_record_trace_start, at dwarf2cfi.c:2224
The root cause:
Without shrink-wrap, the code is like
push
...
pop
return //The return has only one predecessor. No dwarf check for this
case, even if the dwarf info is wrong.
With shrink-wrap, the basic code is like
tst ... L1
push
...
pop
return // no dwarf check for it
L1:
simple_return // no dwarf check for it
After some optimization the code is like
tst ... L1
push
...
pop
// ************The return is optimized *********
L1:
simple_return //Now the simple_return has two predecessors. dwarf
check fail at this block if the debug info is wrong.
Thanks!
-Zhenqiang
> ________________________________________
> From: Zhenqiang Chen [[email protected]]
> Sent: 16 October 2012 04:44
> To: Ramana Radhakrishnan
> Cc: linaro-toolchain
> Subject: Re: Add dwarf/unwind info in epilogue
>
> On 16 October 2012 10:22, Ramana Radhakrishnan
> <[email protected]> wrote:
>> Zhenqiang,
>>
>> I've been spending sometime scratching my head around this one tonight. Can
>> you show me the original shrink-wrap patch as well the test case that
>> triggers this failure ? I have my suspicion on something but need to run a
>> few experiments before commenting further.
>
> p4.patch is from the mail-list discussion:
> http://old.nabble.com/Shrink-wrapping%3A-Introduction-to31220423.html
>
> shrink-wrap.patch is my patch against r192445.
>
> *.c are test cases: -O2 -g
>
> There is no fail in gcc-linaro-4.5 since "simple_return" and "normal
> return" can not be optimized as one common return.
>
> Thanks!
> -Zhenqiang
>
>
>> On 15 Oct 2012, at 10:57, Zhenqiang Chen <[email protected]> wrote:
>>
>>> Hi Ramana,
>>>
>>> The attached file is a reference patch to add more dwarf/unwind info
>>> in epilogue. Please help to review.
>>>
>>> Without the patch, dwarf check fail for the following cases when
>>> enabling shrink-wrap:
>>>
>>> tst ... L1 //simple_return
>>> push ...
>>> ...
>>> pop ... //.cfa_offset is not 0
>>> L1:
>>> bx lr //common simple_return
>>>
>>> Thanks!
>>> -Zhenqiang<dwarf.patch>_______________________________________________
>>> linaro-toolchain mailing list
>>> [email protected]
>>> http://lists.linaro.org/mailman/listinfo/linaro-toolchain
>>
>>
>
shrink-wrap.patch
Description: Binary data
_______________________________________________ linaro-toolchain mailing list [email protected] http://lists.linaro.org/mailman/listinfo/linaro-toolchain
