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] Fix devirt from dropping lhs with TREE_ADDRESSABLE type on noreturn calls (PR c++/71210)


On Fri, May 20, 2016 at 01:59:48PM +0200, Jakub Jelinek wrote:
> On Fri, May 20, 2016 at 01:40:01PM +0200, Marek Polacek wrote:
> > > +		  if (lhs
> > > +		      && (gimple_call_flags (stmt) & ECF_NORETURN)
> > > +		      && (VOID_TYPE_P (TREE_TYPE (gimple_call_fntype (stmt)))
> > > +			  || ((TREE_CODE (TYPE_SIZE_UNIT (TREE_TYPE (lhs)))
> > > +			       == INTEGER_CST)
> > > +			      && !TREE_ADDRESSABLE (TREE_TYPE (lhs)))))
> > 
> > Do you think it would be worth it to factor out this check into a new
> > predicate and use it throughout the codebase?
> 
> I think it would be worthwhile.  Are you willing to write a patch for this?

Yeah, sure.  can_remove_lhs_p?

	Marek


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