[PATCH, Pointer Bounds Checker 22/x] Inline

Jeff Law law@redhat.com
Tue Sep 23 19:55:00 GMT 2014


On 08/18/14 09:35, Ilya Enkovich wrote:
> Here is an updated version.
>
> Thanks,
> Ilya
> --
> 2014-08-15  Ilya Enkovich  <ilya.enkovich@intel.com>
>
> 	* ipa-inline.c (early_inliner): Check edge has summary allocated.
> 	* tree-inline.c: Include tree-chkp.h.
> 	(declare_return_variable): Add arg holding
> 	returned bounds slot.  Create and initialize returned bounds var.
> 	(remap_gimple_stmt): Handle returned bounds.
> 	Return sequence of statements instead of a single statement.
> 	(insert_init_stmt): Add declaration.
> 	(remap_gimple_seq): Adjust to new remap_gimple_stmt signature.
> 	(copy_bb): Adjust to changed return type of remap_gimple_stmt.
> 	(expand_call_inline): Handle returned bounds.  Add bounds copy
> 	for generated mem to mem assignments.
> 	* tree-inline.h (copy_body_data): Add fields retbnd and
> 	assign_stmts.
> 	* cgraph.c: Include tree-chkp.h.
> 	(cgraph_redirect_edge_call_stmt_to_callee): Support
> 	returned bounds.
> 	* value-prof.c: Include tree-chkp.h.
> 	(gimple_ic): Support returned bounds.
OK for the trunk.

FWIW, when building up gimple (or RTL if you were ever to do that one 
day), it's sometimes helpful to the reviewer to show what you're doing. 
  For example, it took me a bit of time to realize that you needed the 
output from the direct call as an argument to the duplicated RETBND 
statement.  It looked for quite a while like you'd simply made a mistake.

I'm a bit curious why you removed the original RETBND statement in 
value-prof, only to reinsert it.  Is there some reason you needed to do 
that?

Richi -- in response to your comment about working around a bug earlier 
in this thread.  As Ilya mentioned, he just cloned existing practice in 
that code for creating the copy of the call.


Jeff



More information about the Gcc-patches mailing list