public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-1931] Limit ranger query in ipa-prop.cc to integrals.
@ 2022-08-02 12:56 Aldy Hernandez
  0 siblings, 0 replies; only message in thread
From: Aldy Hernandez @ 2022-08-02 12:56 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:e9f5b4fa4f2c93ef76e3766b3edabfaebc100741

commit r13-1931-ge9f5b4fa4f2c93ef76e3766b3edabfaebc100741
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Tue Aug 2 12:14:22 2022 +0200

    Limit ranger query in ipa-prop.cc to integrals.
    
    ipa-* still works on legacy value_range's which only support
    integrals.  This patch limits the query to integrals, as to not get a
    floating point range that can't exist in an irange.
    
    gcc/ChangeLog:
    
            * ipa-prop.cc (ipa_compute_jump_functions_for_edge): Limit ranger
            query to integrals.

Diff:
---
 gcc/ipa-prop.cc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gcc/ipa-prop.cc b/gcc/ipa-prop.cc
index fb8f97397dc..ca5b9f31570 100644
--- a/gcc/ipa-prop.cc
+++ b/gcc/ipa-prop.cc
@@ -2303,6 +2303,10 @@ ipa_compute_jump_functions_for_edge (struct ipa_func_body_info *fbi,
 	{
 	  if (TREE_CODE (arg) == SSA_NAME
 	      && param_type
+	      /* Limit the ranger query to integral types as the rest
+		 of this file uses value_range's, which only hold
+		 integers and pointers.  */
+	      && irange::supports_p (TREE_TYPE (arg))
 	      && get_range_query (cfun)->range_of_expr (vr, arg)
 	      && !vr.undefined_p ())
 	    {


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-02 12:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-02 12:56 [gcc r13-1931] Limit ranger query in ipa-prop.cc to integrals Aldy Hernandez

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).