public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-1915] Allow PHIs to pick up global values.
@ 2021-06-29 19:09 Andrew Macleod
0 siblings, 0 replies; only message in thread
From: Andrew Macleod @ 2021-06-29 19:09 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:604dce2d74d3417970e23e7ad38322d1adbca2e2
commit r12-1915-g604dce2d74d3417970e23e7ad38322d1adbca2e2
Author: Andrew MacLeod <amacleod@redhat.com>
Date: Fri Jun 25 15:31:39 2021 -0400
Allow PHIs to pick up global values.
We can also apply known global values to PHI nodes in EVRP.
* value-query.cc (gimple_range_global): Allow phis.
Diff:
---
gcc/value-query.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/value-query.cc b/gcc/value-query.cc
index 17dfdb1ccbe..730a2149275 100644
--- a/gcc/value-query.cc
+++ b/gcc/value-query.cc
@@ -419,7 +419,8 @@ gimple_range_global (tree name)
gcc_checking_assert (gimple_range_ssa_p (name));
tree type = TREE_TYPE (name);
- if (SSA_NAME_IS_DEFAULT_DEF (name) || (cfun && cfun->after_inlining))
+ if (SSA_NAME_IS_DEFAULT_DEF (name) || (cfun && cfun->after_inlining)
+ || is_a<gphi *> (SSA_NAME_DEF_STMT (name)))
{
value_range vr;
get_range_global (vr, name);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-29 19:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-29 19:09 [gcc r12-1915] Allow PHIs to pick up global values 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).