public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/aldyh/heads/ranger-relational)] Utilize global range when propagating on-netry cache.
@ 2021-04-22 22:33 Andrew Macleod
0 siblings, 0 replies; only message in thread
From: Andrew Macleod @ 2021-04-22 22:33 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:05eb845936b3e7e34b740189ddb58620e98f92b5
commit 05eb845936b3e7e34b740189ddb58620e98f92b5
Author: Andrew MacLeod <amacleod@redhat.com>
Date: Thu Apr 22 15:16:14 2021 -0400
Utilize global range when propagating on-netry cache.
Diff:
---
gcc/gimple-range-cache.cc | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/gcc/gimple-range-cache.cc b/gcc/gimple-range-cache.cc
index 807c65e2956..cb465749b4f 100644
--- a/gcc/gimple-range-cache.cc
+++ b/gcc/gimple-range-cache.cc
@@ -923,8 +923,13 @@ ranger_cache::propagate_cache (tree name)
int_range_max edge_range;
int_range_max equiv_range;
int_range_max tmp_range;
+ int_range_max global_range;
+ bool has_global = false;
bool has_equivs;
+ if (m_globals.get_global_range (global_range, name))
+ has_global = true;
+
// Process each block by seeing if its calculated range on entry is
// the same as its cached value. If there is a difference, update
// the cache to reflect the new value, and check to see if any
@@ -958,6 +963,11 @@ ranger_cache::propagate_cache (tree name)
if (!outgoing_edge_range_p (edge_range, e, name))
{
ssa_range_in_bb (edge_range, name, e->src);
+ // This will allow new globals to be propagated into cycles
+ // Without this, the old value can feed into a block
+ // and prevent propagation.
+ if (has_global)
+ edge_range.intersect (global_range);
if (DEBUG_RANGE_CACHE)
{
fprintf (dump_file, "No outgoing edge range, picked up ");
@@ -1177,7 +1187,7 @@ ranger_cache::fill_block_cache (tree name, basic_block bb, basic_block def_bb)
}
if (DEBUG_RANGE_CACHE)
- fprintf (dump_file, "pushing undefined pred block. ");
+ fprintf (dump_file, "pushing undefined pred block.\n");
// If the pred hasn't been visited (has no range), add it to
// the list.
gcc_checking_assert (!m_on_entry.bb_range_p (name, pred));
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-04-22 22:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-22 22:33 [gcc(refs/users/aldyh/heads/ranger-relational)] Utilize global range when propagating on-netry cache 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).