* [COMMITTED] PR tree-optimization/110205 -Fix some warnings
@ 2023-07-28 20:37 Andrew MacLeod
0 siblings, 0 replies; only message in thread
From: Andrew MacLeod @ 2023-07-28 20:37 UTC (permalink / raw)
To: gcc-patches; +Cc: hernandez, aldy
[-- Attachment #1: Type: text/plain, Size: 150 bytes --]
This patch simply fixes the code up a little to remove potential warnings.
Bootstrapped on x86_64-pc-linux-gnu with no regressions. Pushed.
Andrew
[-- Attachment #2: 0001-Fix-some-warnings.patch --]
[-- Type: text/x-patch, Size: 4610 bytes --]
From 7905c071c35070fff3397b1e24f140c128c08e64 Mon Sep 17 00:00:00 2001
From: Andrew MacLeod <amacleod@redhat.com>
Date: Mon, 10 Jul 2023 13:58:22 -0400
Subject: [PATCH 1/3] Fix some warnings
PR tree-optimization/110205
* gimple-range-cache.h (ranger_cache::m_estimate): Delete.
* range-op-mixed.h (operator_bitwise_xor::op1_op2_relation_effect):
Add final override.
* range-op.cc (operator_lshift): Add missing final overrides.
(operator_rshift): Ditto.
---
gcc/gimple-range-cache.h | 1 -
gcc/range-op-mixed.h | 2 +-
gcc/range-op.cc | 44 ++++++++++++++++++----------------------
3 files changed, 21 insertions(+), 26 deletions(-)
diff --git a/gcc/gimple-range-cache.h b/gcc/gimple-range-cache.h
index 93d16294d2e..a0f436b5723 100644
--- a/gcc/gimple-range-cache.h
+++ b/gcc/gimple-range-cache.h
@@ -137,7 +137,6 @@ private:
void exit_range (vrange &r, tree expr, basic_block bb, enum rfd_mode);
bool edge_range (vrange &r, edge e, tree name, enum rfd_mode);
- phi_analyzer *m_estimate;
vec<basic_block> m_workback;
class update_list *m_update;
};
diff --git a/gcc/range-op-mixed.h b/gcc/range-op-mixed.h
index 3cb904f9d80..b623a88cc71 100644
--- a/gcc/range-op-mixed.h
+++ b/gcc/range-op-mixed.h
@@ -574,7 +574,7 @@ public:
tree type,
const irange &op1_range,
const irange &op2_range,
- relation_kind rel) const;
+ relation_kind rel) const final override;
void update_bitmask (irange &r, const irange &lh,
const irange &rh) const final override;
private:
diff --git a/gcc/range-op.cc b/gcc/range-op.cc
index 615e5fe0036..19fdff0eb64 100644
--- a/gcc/range-op.cc
+++ b/gcc/range-op.cc
@@ -2394,22 +2394,21 @@ class operator_lshift : public cross_product_operator
using range_operator::fold_range;
using range_operator::op1_range;
public:
- virtual bool op1_range (irange &r, tree type,
- const irange &lhs,
- const irange &op2,
- relation_trio rel = TRIO_VARYING) const;
- virtual bool fold_range (irange &r, tree type,
- const irange &op1,
- const irange &op2,
- relation_trio rel = TRIO_VARYING) const;
+ virtual bool op1_range (irange &r, tree type, const irange &lhs,
+ const irange &op2, relation_trio rel = TRIO_VARYING)
+ const final override;
+ virtual bool fold_range (irange &r, tree type, const irange &op1,
+ const irange &op2, relation_trio rel = TRIO_VARYING)
+ const final override;
virtual void wi_fold (irange &r, tree type,
const wide_int &lh_lb, const wide_int &lh_ub,
- const wide_int &rh_lb, const wide_int &rh_ub) const;
+ const wide_int &rh_lb,
+ const wide_int &rh_ub) const final override;
virtual bool wi_op_overflows (wide_int &res,
tree type,
const wide_int &,
- const wide_int &) const;
+ const wide_int &) const final override;
void update_bitmask (irange &r, const irange &lh,
const irange &rh) const final override
{ update_known_bitmask (r, LSHIFT_EXPR, lh, rh); }
@@ -2421,27 +2420,24 @@ class operator_rshift : public cross_product_operator
using range_operator::op1_range;
using range_operator::lhs_op1_relation;
public:
- virtual bool fold_range (irange &r, tree type,
- const irange &op1,
- const irange &op2,
- relation_trio rel = TRIO_VARYING) const;
+ virtual bool fold_range (irange &r, tree type, const irange &op1,
+ const irange &op2, relation_trio rel = TRIO_VARYING)
+ const final override;
virtual void wi_fold (irange &r, tree type,
const wide_int &lh_lb,
const wide_int &lh_ub,
const wide_int &rh_lb,
- const wide_int &rh_ub) const;
+ const wide_int &rh_ub) const final override;
virtual bool wi_op_overflows (wide_int &res,
tree type,
const wide_int &w0,
- const wide_int &w1) const;
- virtual bool op1_range (irange &, tree type,
- const irange &lhs,
- const irange &op2,
- relation_trio rel = TRIO_VARYING) const;
- virtual relation_kind lhs_op1_relation (const irange &lhs,
- const irange &op1,
- const irange &op2,
- relation_kind rel) const;
+ const wide_int &w1) const final override;
+ virtual bool op1_range (irange &, tree type, const irange &lhs,
+ const irange &op2, relation_trio rel = TRIO_VARYING)
+ const final override;
+ virtual relation_kind lhs_op1_relation (const irange &lhs, const irange &op1,
+ const irange &op2, relation_kind rel)
+ const final override;
void update_bitmask (irange &r, const irange &lh,
const irange &rh) const final override
{ update_known_bitmask (r, RSHIFT_EXPR, lh, rh); }
--
2.40.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-07-28 20:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-28 20:37 [COMMITTED] PR tree-optimization/110205 -Fix some warnings Andrew MacLeod
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).