public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, Pointer Bounds Checker 24/x] PRE
@ 2014-06-03  7:13 Ilya Enkovich
  2014-06-03  9:33 ` Richard Biener
  0 siblings, 1 reply; 5+ messages in thread
From: Ilya Enkovich @ 2014-06-03  7:13 UTC (permalink / raw)
  To: gcc-patches

Hi,

This patch preserves CALL_WITH_BOUNDS flag for calls during PRE.

Bootstrapped and tested on linux-x86_64.

Thanks,
Ilya
--
gcc/

2014-06-03  Ilya Enkovich  <ilya.enkovich@intel.com>

	* tree-ssa-pre.c (create_component_ref_by_pieces_1): Store
	CALL_WITH_BOUNDS_P for calls.
	(copy_reference_ops_from_call): Restore CALL_WITH_BOUNDS_P
	flag.


diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 1e55356..d5b9f3b 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -2579,6 +2579,8 @@ create_component_ref_by_pieces_1 (basic_block block, vn_reference_t ref,
 				   (TREE_CODE (fn) == FUNCTION_DECL
 				    ? build_fold_addr_expr (fn) : fn),
 				   nargs, args);
+	if (currop->op2 == integer_one_node)
+	  CALL_WITH_BOUNDS_P (folded) = true;
 	free (args);
 	if (sc)
 	  CALL_EXPR_STATIC_CHAIN (folded) = sc;
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index f7ec8b6..e83d9dc 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -1124,6 +1124,8 @@ copy_reference_ops_from_call (gimple call,
   temp.opcode = CALL_EXPR;
   temp.op0 = gimple_call_fn (call);
   temp.op1 = gimple_call_chain (call);
+  if (gimple_call_with_bounds_p (call))
+    temp.op2 = integer_one_node;
   temp.off = -1;
   result->safe_push (temp);
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-09-15  8:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-03  7:13 [PATCH, Pointer Bounds Checker 24/x] PRE Ilya Enkovich
2014-06-03  9:33 ` Richard Biener
2014-08-18 13:02   ` Ilya Enkovich
2014-09-03 19:25     ` Jeff Law
2014-09-15  8:01       ` Ilya Enkovich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).