aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@gcc.gnu.org>2019-06-28 07:21:00 +0000
committerAldy Hernandez <aldyh@gcc.gnu.org>2019-06-28 07:21:00 +0000
commit2f7edc3f149d9ad5c066fe62dd9086a22e2570ea (patch)
treeaec45792f63de0b57b605e5a845d916a04ad3bfb /gcc
parent2059826ab5ae8009f485279dc5efb345ab5c4c3f (diff)
downloadgcc-2f7edc3f149d9ad5c066fe62dd9086a22e2570ea.zip
gcc-2f7edc3f149d9ad5c066fe62dd9086a22e2570ea.tar.gz
gcc-2f7edc3f149d9ad5c066fe62dd9086a22e2570ea.tar.bz2
Remove unnecessary includes.
Fix up some comments. From-SVN: r272777
Diffstat (limited to 'gcc')
-rw-r--r--gcc/common.opt5
-rw-r--r--gcc/function-tests.c8
-rw-r--r--gcc/gimple-loop-versioning.cc1
-rw-r--r--gcc/gimple-ssa-evrp-analyze.c1
-rw-r--r--gcc/gimple-ssa-evrp.c1
-rw-r--r--gcc/gimple-ssa-sprintf.c1
-rw-r--r--gcc/gimple-ssa-warn-restrict.c1
-rw-r--r--gcc/range-op.c1
-rw-r--r--gcc/range-op.h13
-rw-r--r--gcc/range.cc2
-rw-r--r--gcc/range.h2
-rw-r--r--gcc/tree-ssa-dom.c1
-rw-r--r--gcc/tree-ssa-threadedge.c1
-rw-r--r--gcc/tree-vrp.c4
14 files changed, 19 insertions, 23 deletions
diff --git a/gcc/common.opt b/gcc/common.opt
index 78c3a25..ac70c0b 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -1800,7 +1800,10 @@ Enum(rvrp_order) String(backward) Value(RVRP_ORDER_BACKWARD)
EnumValue
Enum(rvrp_order) String(conditionals) Value(RVRP_ORDER_CONDITIONALS)
-; Temporary testing construct.
+;; Perform VRP range folding with either range-ops or the traditional
+;; extract_range_from_{binary,unary}_expr functions. This is meant to
+;; be a transitional testing construct to verify that both agree.
+
franges=
Common Joined RejectNegative Enum(ranges_mode) Var(flag_ranges_mode) Init(RANGES_CHECKING)
-franges=[checking|vrp|range-ops] Set the mode for calculating ranges.
diff --git a/gcc/function-tests.c b/gcc/function-tests.c
index be3f67f..2440dd6 100644
--- a/gcc/function-tests.c
+++ b/gcc/function-tests.c
@@ -570,11 +570,11 @@ test_conversion_to_ssa ()
ASSERT_EQ (SSA_NAME, TREE_CODE (gimple_return_retval (return_stmt)));
}
-/* Test the irange class. We must start this here because we need
- cfun set. */
+/* Test range folding. We must start this here because we need cfun
+ set. */
static void
-test_iranges ()
+test_ranges ()
{
tree fndecl = build_trivial_high_gimple_function ();
function *fun = DECL_STRUCT_FUNCTION (fndecl);
@@ -687,7 +687,7 @@ function_tests_c_tests ()
test_gimplification ();
test_building_cfg ();
test_conversion_to_ssa ();
- test_iranges ();
+ test_ranges ();
test_expansion_to_rtl ();
}
diff --git a/gcc/gimple-loop-versioning.cc b/gcc/gimple-loop-versioning.cc
index 207a472..fe27300 100644
--- a/gcc/gimple-loop-versioning.cc
+++ b/gcc/gimple-loop-versioning.cc
@@ -37,7 +37,6 @@ along with GCC; see the file COPYING3. If not see
#include "tree-inline.h"
#include "domwalk.h"
#include "alloc-pool.h"
-#include "range.h"
#include "vr-values.h"
#include "gimple-ssa-evrp-analyze.h"
#include "tree-vectorizer.h"
diff --git a/gcc/gimple-ssa-evrp-analyze.c b/gcc/gimple-ssa-evrp-analyze.c
index ea6b940..1738d7c 100644
--- a/gcc/gimple-ssa-evrp-analyze.c
+++ b/gcc/gimple-ssa-evrp-analyze.c
@@ -39,7 +39,6 @@ along with GCC; see the file COPYING3. If not see
#include "alloc-pool.h"
#include "domwalk.h"
#include "tree-cfgcleanup.h"
-#include "range.h"
#include "vr-values.h"
#include "gimple-ssa-evrp-analyze.h"
diff --git a/gcc/gimple-ssa-evrp.c b/gcc/gimple-ssa-evrp.c
index e70f626..beb20b8 100644
--- a/gcc/gimple-ssa-evrp.c
+++ b/gcc/gimple-ssa-evrp.c
@@ -39,7 +39,6 @@ along with GCC; see the file COPYING3. If not see
#include "alloc-pool.h"
#include "domwalk.h"
#include "tree-cfgcleanup.h"
-#include "range.h"
#include "vr-values.h"
#include "gimple-ssa-evrp-analyze.h"
diff --git a/gcc/gimple-ssa-sprintf.c b/gcc/gimple-ssa-sprintf.c
index 06dd99c..d7a6128 100644
--- a/gcc/gimple-ssa-sprintf.c
+++ b/gcc/gimple-ssa-sprintf.c
@@ -84,7 +84,6 @@ along with GCC; see the file COPYING3. If not see
#include "diagnostic.h"
#include "domwalk.h"
#include "alloc-pool.h"
-#include "range.h"
#include "vr-values.h"
#include "gimple-ssa-evrp-analyze.h"
#include "ssa-range.h"
diff --git a/gcc/gimple-ssa-warn-restrict.c b/gcc/gimple-ssa-warn-restrict.c
index 9b7e910..00379af 100644
--- a/gcc/gimple-ssa-warn-restrict.c
+++ b/gcc/gimple-ssa-warn-restrict.c
@@ -31,7 +31,6 @@
#include "ssa.h"
#include "gimple-pretty-print.h"
#include "ssa-range.h"
-#include "tree-vrp.h"
#include "gimple-ssa-warn-restrict.h"
#include "diagnostic-core.h"
#include "fold-const.h"
diff --git a/gcc/range-op.c b/gcc/range-op.c
index b6ffe8c..4a72c73 100644
--- a/gcc/range-op.c
+++ b/gcc/range-op.c
@@ -44,7 +44,6 @@ along with GCC; see the file COPYING3. If not see
#include "gimple-walk.h"
#include "tree-cfg.h"
#include "wide-int.h"
-#include "range.h"
#include "range-op.h"
#include "wide-int-range.h"
diff --git a/gcc/range-op.h b/gcc/range-op.h
index 07bc58a..1dd0e94 100644
--- a/gcc/range-op.h
+++ b/gcc/range-op.h
@@ -21,7 +21,7 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_RANGE_OP_H
#define GCC_RANGE_OP_H
-// This class is implmented for each kind of operator that is supported by
+// This class is implemented for each kind of operator that is supported by
// the range generator. It serves dual purposes.
//
// 1 - Generates range information for the specific operation between
@@ -38,7 +38,7 @@ along with GCC; see the file COPYING3. If not see
// each element of the range.
//
// 3 - Creates a range for an operand based on whether the result is 0 or
-// non-zero. Tihs is mostly for logical true false, but can serve other
+// non-zero. This is mostly for logical true false, but can serve other
// purposes.
// ie 0 = op1 - op2 implies op2 has the same range as op1.
@@ -53,12 +53,13 @@ public:
virtual bool fold_range (irange& r, const irange& op1,
const irange& op2) const;
- // Set the range for op? in the general case. LHS is the range for the LHS
- // of the expression, VAL is the range for the other operand, and
- // the result is returned in R.
+ // Set the range for op? in the general case. LHS is the range for
+ // the LHS of the expression, VAL is the range for the other
+ // operand, and the result is returned in R.
// ie [range] = op1 + VAL
// This is re-formed as new_range = [range] - VAL.
- // Return TRUE if the operation could be performed and the range is valid. */
+ // Return TRUE if the operation could be performed and the range is
+ // valid.
virtual bool op1_range (irange& r, const irange& lhs,
const irange& op2) const;
virtual bool op2_range (irange& r, const irange& lhs,
diff --git a/gcc/range.cc b/gcc/range.cc
index f0f711b..30b6b10 100644
--- a/gcc/range.cc
+++ b/gcc/range.cc
@@ -1,4 +1,4 @@
-/* SSA range analysis implementation. -*- C++ -*-
+/* High resolution range class.
Copyright (C) 2017 Free Software Foundation, Inc.
Contributed by Aldy Hernandez <aldyh@redhat.com>.
diff --git a/gcc/range.h b/gcc/range.h
index 59def12..0a1bf2c 100644
--- a/gcc/range.h
+++ b/gcc/range.h
@@ -1,4 +1,4 @@
-/* Header file for range analysis.
+/* Header file for high resolution range class. -*- C++ -*-
Copyright (C) 2017-2019 Free Software Foundation, Inc.
Contributed by Aldy Hernandez <aldyh@redhat.com>.
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c
index 32b4d8e..37050cc 100644
--- a/gcc/tree-ssa-dom.c
+++ b/gcc/tree-ssa-dom.c
@@ -48,7 +48,6 @@ along with GCC; see the file COPYING3. If not see
#include "dbgcnt.h"
#include "alloc-pool.h"
#include "tree-vrp.h"
-#include "range.h"
#include "vr-values.h"
#include "gimple-ssa-evrp-analyze.h"
diff --git a/gcc/tree-ssa-threadedge.c b/gcc/tree-ssa-threadedge.c
index 3e87375..781f802 100644
--- a/gcc/tree-ssa-threadedge.c
+++ b/gcc/tree-ssa-threadedge.c
@@ -38,7 +38,6 @@ along with GCC; see the file COPYING3. If not see
#include "gimple-fold.h"
#include "cfganal.h"
#include "alloc-pool.h"
-#include "range.h"
#include "vr-values.h"
#include "gimple-ssa-evrp-analyze.h"
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 84ab167..3d60f17 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -68,7 +68,7 @@ along with GCC; see the file COPYING3. If not see
#include "vr-values.h"
#include "builtins.h"
#include "wide-int-range.h"
-#include "grange.h"
+#include "range-op.h"
static bool
ranges_from_anti_range (const value_range_base *ar,
@@ -1311,7 +1311,7 @@ ranges_from_anti_range (const value_range_base *ar,
bool handle_pointers)
{
/* ?? This function is called multiple times from num_pairs,
- lower_bound, and upper_bound. We should either memoize this, or
+ lower_bound, and upper_bound. We should probably memoize this, or
rewrite the callers in such a way that we're not re-calculating
this constantly. */