This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 1/2] Come up with function_decl_type and use it in tree_function_decl.
On 7/25/19 2:53 AM, Marc Glisse wrote:
> I would also mark DECL_IS_OPERATOR_DELETE_P the other operators delete, because of the name of the macro, but it is not important for this patch.
I'm planning to install the patch as is right after I'll get an approval of the 1/2 part.
Feel free to prepare a patch that will put the DECL_IS_OPERATOR_DELETE_P to other delete operators.
> DCE has special code to avoid removing the LHS of malloc when it is unused. Is there something different about operator new that makes it not need the same handling?
> The patch is happy to simplify malloc+delete or new+free. That makes sense to me, if someone wants to diagnose weird mixes, that's a separate work they can do later.
> (Not this patch: I wonder how much speed we would lose by making gimple_call_operator_delete_p take a gimple* and check if the thing is a call, so we don't have to repeat is_gimple_call and as_a<gcall*> in half of the callers. An overload (overkill) would of course lose nothing. But, with just the gimple* version, especially if it was in a .h, I wonder if we would manage to eliminate the overhead of checking is_gimple_call when we already know it is a call)