public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <rguenther@suse.de>
To: Kugan <kugan.vivekanandarajah@linaro.org>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	    Jakub Jelinek <jakub@redhat.com>, Jeff Law <law@redhat.com>
Subject: Re: [RFC][PATCH 2/3]  Propagate and save value ranges wrapped information
Date: Mon, 19 Jan 2015 12:52:00 -0000	[thread overview]
Message-ID: <alpine.LSU.2.11.1501191223460.12482@zhemvz.fhfr.qr> (raw)
In-Reply-To: <54B9C45B.3010704@linaro.org>

On Sat, 17 Jan 2015, Kugan wrote:

> 
> This patch propagate value range wrapps attribute and save this to
> SSA_NAME.

diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 9b7695d..832c35d 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -103,6 +103,9 @@ struct value_range_d
   tree min;
   tree max;
 
+  /* Set to true if values in this value range could wrapp. */
+  bool is_wrapped;
+
   /* Set of SSA names whose value ranges are equivalent to this one.
      This set is only valid when TYPE is VR_RANGE or VR_ANTI_RANGE.  */
   bitmap equiv;

I can't make sense of this description (wrap with one p as well).
I assume you mean that the expression that has this value-range
assigned has an operation that may have wrapped?  (a value
can't wrap)

You need to specify how is_wrapped behaves for range union and
intersect operations and which operations can wrap.

I miss an overall description of these patches as to a) why you
need this information and b) why it helps.

It's now also too late and thus you have plenty of time until stage1
starts again.

Thanks,
Richard.

> Thanks,
> Kugan
> 
> gcc/ChangeLog:
> 
> 2015-01-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
> 
> 	* builtins.c (determine_block_size): Use new definition of
> 	 get_range_info.
> 	* gimple-pretty-print.c (dump_ssaname_info): Dump new wrapped info.
> 	* internal-fn.c (get_range_pos_neg): Use new definition of
> 	 get_range_info.
> 	(get_min_precision): Likewise.
> 	* tree-ssa-copy.c (fini_copy_prop): Use new definition of
> 	 duplicate_ssa_range_info.
> 	* tree-ssa-loop-im.c
> 	(move_computations_dom_walker::before_dom_children): Likewise.
> 	* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children): Likewise.
> 	* tree-ssa-loop-niter.c (determine_value_range): Use new definition.
> 	* tree-ssanames.c (set_range_info): Save wrapped information.
> 	(get_range_info): Retrive wrapped information.
> 	(set_nonzero_bits): Set wrapped info.
> 	(duplicate_ssa_name_range_info): Likewise.
> 	(duplicate_ssa_name_fn): Likewise.
> 	* tree-ssanames.h: (set_range_info): Update definition.
> 	(get_range_info): Ditto.
> 	* tree-vect-patterns.c (vect_recog_divmod_pattern): Use new
> 	declaration get_range_info.
> 	* tree-vrp.c (struct value_range_d): Add wrapped field.
> 	(set_value_range): Calculate and add wrapped field.
> 	(set_and_canonicalize_value_range): Likewise.
> 	(copy_value_range): Likewise.
> 	(set_value_range_to_value): Likewise.
> 	(set_value_range_to_nonnegative): Likewise.
> 	(set_value_range_to_nonnull): Likewise.
> 	(set_value_range_to_truthvalue): Likewise.
> 	(abs_extent_range): Likewise.
> 	(get_value_range): Return wrapped info.
> 	(update_value_range): Save wrapped info.
> 	(extract_range_from_assert): Extract and update wrapped info.
> 	(extract_range_from_ssa_name): Likewise.
> 	(vrp_int_const_binop): Likewise.
> 	(extract_range_from_multiplicative_op_1): Likewise.
> 	(extract_range_from_binary_expr_1): Likewise.
> 	(extract_range_from_binary_expr): Likewise.
> 	(extract_range_from_unary_expr_1): Likewise.
> 	(extract_range_from_comparison): Likewise.
> 	(extract_range_basic): Likewise.
> 	(adjust_range_with_scev): Likewise.
> 	(dump_value_range): Dump wrapped info.
> 	(remove_range_assertions): Update parameters.
> 	(vrp_intersect_ranges_1): Propagate wrapped info.
> 	(vrp_meet_1): Likewise.
> 	(vrp_visit_phi_node): Save wrapped info to SSA.
> 	(vrp_finalize): Likewise.
> 	* tree.h (SSA_NAME_ANTI_RANGE_P): Remove.
> 	(SSA_NAME_RANGE_OVF_P): New.
> 
> gcc/testsuite/ChangeLog:
> 
> 2015-01-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
> 
> 	* gcc.dg/tree-ssa/vrp92.c: Update scanned pattern.
> 
> 

-- 
Richard Biener <rguenther@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Jennifer Guild,
Dilip Upmanyu, Graham Norton HRB 21284 (AG Nuernberg)

  reply	other threads:[~2015-01-19 11:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-17  2:10 [RFC][PATCH 0/3] Re-enable zero/sign extension elimination using value ranges Kugan
2015-01-17  2:11 ` [RFC][PATCH 1/3] Free a bit in SSA_NAME to save wrapped information Kugan
2015-04-22 22:14   ` Kugan
2015-01-17  2:44 ` [RFC][PATCH 2/3] Propagate and save value ranges " Kugan
2015-01-19 12:52   ` Richard Biener [this message]
2015-04-22 22:11     ` Kugan
2015-04-30 11:44       ` Richard Biener
2015-04-30 11:53         ` Jakub Jelinek
2015-04-30 12:13           ` Richard Biener
2015-05-01  4:55         ` Kugan
2015-01-17  2:58 ` [RFC][PATCH 3/3] Enable zero/sign extension elimination Kugan
2015-04-22 22:15   ` Kugan
2015-04-22 23:48     ` H.J. Lu
2015-04-22 23:54       ` Kugan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LSU.2.11.1501191223460.12482@zhemvz.fhfr.qr \
    --to=rguenther@suse.de \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=kugan.vivekanandarajah@linaro.org \
    --cc=law@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).