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] Handle new operators with no arguments in DCE.


PING^1

On 8/8/19 10:43 AM, Martin Liška wrote:
> On 8/7/19 4:12 PM, Richard Biener wrote:
>> On Wed, Aug 7, 2019 at 2:04 PM Martin Liška <mliska@suse.cz> wrote:
>>>
>>> On 8/7/19 12:51 PM, Jakub Jelinek wrote:
>>>> On Wed, Aug 07, 2019 at 12:44:28PM +0200, Martin Liška wrote:
>>>>> On 8/7/19 11:51 AM, Richard Biener wrote:
>>>>>> I think the simplest way to achieve this is to not copy, aka clear,
>>>>>> DECL_IS_OPERATOR_* when cloning and removing arguments
>>>>>> (cloning for a constant align argument should be OK for example, as is
>>>>>> for a constant address).  Or simply always when cloning.
>>>>>
>>>>> Ok, then I'm suggesting following tested patch.
>>>>>
>>>>> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>>>>
>>>> What about LAMBDA_FUNCTION, doesn't cloning which changes arguments in any
>>>> way invalidate that too, i.e. shouldn't it be just
>>>>   FUNCTION_DECL_DECL_TYPE (new_node->decl) = NONE;
>>>
>>> Well, how are lambdas involved in the new/delete DCE here? Lambdas with removed
>>> arguments should not interfere here.
>>
>> But for coverage where we do
>>
>>   gcov_write_unsigned (DECL_ARTIFICIAL (current_function_decl)
>>                        && !DECL_FUNCTION_VERSIONED (current_function_decl)
>>                        && !DECL_LAMBDA_FUNCTION_P (current_function_decl));
>>
>> all clones should be considered artificial?
> 
> Well, from coverage perspective most of them are fine.
> 
>>
>> Anyway, your patch is OK, we can think about lambdas separately.  Can you
>> simplify the DCE code after the patch?
> 
> I installed the patch and I'm sending the follow up cleanup.
> 
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
> 
> Ready to be installed?
> Thanks,
> Martin
> 
>>
>> Thanks,
>> Richard.
>>
>>>> instead?  On the other side, if the cloning doesn't change arguments in any
>>>> way, do we still want to clear those flags?
>>>
>>> Well, I would consider it safer to drop it always.
>>>
>>> Martin
>>>
>>>>
>>>>       Jakub
>>>>
>>>
> 


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