This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ping] [patch, arm] Fix PR45701


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 (éå)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]