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]

Re: [PATCH, MPX, 2/X] Pointers Checker [16/25] Tail recursion


2013/11/19 Jeff Law <law@redhat.com>:
> On 11/18/13 12:16, Ilya Enkovich wrote:
>>
>> With current recursion elimination we will have:
>>
>> test (int *param1)
>> {
>> <bb1>:
>>
>> <bb2>:
>>    _7 = PHI<param1(D) (bb1), _6 (bb2)>
>>    bounds2 = __builtin_arg_bounds (_7) -- WRONG
>
> I wouldn't say it's wrong.  It's conservatively correct if properly
> implemented.   Why precisely do you consider this wrong?  If your code can't
> handle it, it really should be fixed.

It is wrong because __builtin_arg_bounds is used to get bounds of
input parameter and PHI node here is not an input parameter.  Correctl
handling of __builtin_arg_bounds in this 'wrong' example requires
adding it a PHI node semantics based on it's arg.  For me it seems
more complex then generating a regular PHI node for bounds and makes
GIMPLE less readable.

Ilya

>
> Jeff
>
>


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