public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/aldyh/heads/ranger-relational)] Suck non-null bit from any immediate dominators.
@ 2021-04-22 16:58 Aldy Hernandez
0 siblings, 0 replies; only message in thread
From: Aldy Hernandez @ 2021-04-22 16:58 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:6a00894cde564fd2c2b513f9a9dea7d12adac05f
commit 6a00894cde564fd2c2b513f9a9dea7d12adac05f
Author: Aldy Hernandez <aldyh@redhat.com>
Date: Thu Apr 22 17:14:46 2021 +0200
Suck non-null bit from any immediate dominators.
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 dbe1018b9db..807c65e2956 100644
--- a/gcc/gimple-range-cache.cc
+++ b/gcc/gimple-range-cache.cc
@@ -60,7 +60,17 @@ non_null_ref::non_null_deref_p (tree name, basic_block bb)
if (!m_nn[v])
process_name (name);
- return bitmap_bit_p (m_nn[v], bb->index);
+ if (bitmap_bit_p (m_nn[v], bb->index))
+ return true;
+
+ // See if any dominator has set non-zero.
+ if (dom_info_available_p (CDI_DOMINATORS))
+ {
+ for ( ; bb; bb = get_immediate_dominator (CDI_DOMINATORS, bb))
+ if (bitmap_bit_p (m_nn[v], bb->index))
+ return true;
+ }
+ return false;
}
// Allocate an populate the bitmap for NAME. An ON bit for a block
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-04-22 16:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-22 16:58 [gcc(refs/users/aldyh/heads/ranger-relational)] Suck non-null bit from any immediate dominators 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).