This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Ping] [patch, arm] Fix PR45701
- From: Yao Qi <yao at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 26 Nov 2010 09:51:26 +0800
- Subject: [Ping] [patch, arm] Fix PR45701
- References: <4C9966FE.2050707@codesourcery.com> <1285258289.13878.217.camel@e102346-lin.cambridge.arm.com> <4C9F60B2.2090108@codesourcery.com> <1285581337.22518.21.camel@e102346-lin.cambridge.arm.com> <4CA097B0.5060908@codesourcery.com>
On 09/27/2010 09:10 PM, Yao Qi wrote:
> Richard Earnshaw wrote:
>> On Sun, 2010-09-26 at 23:03 +0800, Yao Qi wrote:
>>> Richard Earnshaw wrote:
>>>> On Wed, 2010-09-22 at 10:16 +0800, Yao Qi wrote:
>>>> How does this track a function with more than one tailcall? It seems
>>>> that it only keeps track of the last tail-call emitted. What happens if
>>>> the first one uses R3, but the second one doesn't?
>>>>
>>> We can use VEC (rtx, gc) tail_call_insns to record all tail-call insns,
>>> and check all of them in arm_get_frame_offsets to see if r3 has been
>>> used for any tail-calls. Beside this, I've added three new test cases.
>>>
>>> Tested on arm-none-linux-gnueabi and i686-pc-linux-gnu. No regression.
>>> Is it OK?
>>>
>>
>> VEC seems a bit heavy-weight for this. Wouldn't an EXPR_LIST be better?
>> After all, you only pass over it in a linear manner and there's no
>> required order.
>>
>
> Here is a new patch as you suggested.
>
Ping.
http://gcc.gnu.org/ml/gcc-patches/2010-09/msg02114.html
gcc/
PR target/45701
* function.h (struct rtl_data): Replace field bool
tail_call_emit by rtx tail_call_insns.
* function.c (free_after_compilation): Free EXPR_LIST.
* call.c (expand_call): Modified code to match new data
structures.
* cfgcleanup.c (rest_of_handle_jump): Likewise.
* config/i386/i386.c (find_drap_reg): Likewise.
* config/arm/arm.c (arm_output_epilogue):Likewise.
(arm_get_frame_offsets): Use r3 for padding stack to 8-byte
alignment if r3 is not used to pass values to tail call.
gcc/testsuite/
PR target/45701
* gcc.target/arm/pr45701-1.c: New test.
* gcc.target/arm/pr45701-2.c: New test.
* gcc.target/arm/pr45701-3.c: New test.
--
Yao (éå)