public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-4457] Fix wrong code in ldost-strlen-1.c
@ 2021-10-16 12:45 Jan Hubicka
0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2021-10-16 12:45 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:99b287b8ef51a0be52f7400879a619dc5f993f31
commit r12-4457-g99b287b8ef51a0be52f7400879a619dc5f993f31
Author: Jan Hubicka <hubicka@ucw.cz>
Date: Sat Oct 16 14:45:06 2021 +0200
Fix wrong code in ldost-strlen-1.c
gcc/ChangeLog:
PR tree-optimization/102720
* tree-ssa-structalias.c (compute_points_to_sets): Fix producing
of call used and clobbered sets.
Diff:
---
gcc/tree-ssa-structalias.c | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 6f12a66ee0d..2e6513bb72a 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -7541,17 +7541,18 @@ compute_points_to_sets (void)
determine_global_memory_access (stmt, NULL,
&reads_global_memory,
&uses_global_memory);
- if (!uses_global_memory)
- ;
- else if ((vi = lookup_call_use_vi (stmt)) != NULL)
+ if ((vi = lookup_call_use_vi (stmt)) != NULL)
{
*pt = find_what_var_points_to (cfun->decl, vi);
/* Escaped (and thus nonlocal) variables are always
implicitly used by calls. */
/* ??? ESCAPED can be empty even though NONLOCAL
always escaped. */
- pt->nonlocal = uses_global_memory;
- pt->escaped = uses_global_memory;
+ if (uses_global_memory)
+ {
+ pt->nonlocal = uses_global_memory;
+ pt->escaped = uses_global_memory;
+ }
}
else if (uses_global_memory)
{
@@ -7572,17 +7573,18 @@ compute_points_to_sets (void)
determine_global_memory_access (stmt, &writes_global_memory,
NULL, NULL);
- if (!writes_global_memory)
- ;
- else if ((vi = lookup_call_clobber_vi (stmt)) != NULL)
+ if ((vi = lookup_call_clobber_vi (stmt)) != NULL)
{
*pt = find_what_var_points_to (cfun->decl, vi);
/* Escaped (and thus nonlocal) variables are always
implicitly clobbered by calls. */
/* ??? ESCAPED can be empty even though NONLOCAL
always escaped. */
- pt->nonlocal = writes_global_memory;
- pt->escaped = writes_global_memory;
+ if (writes_global_memory)
+ {
+ pt->nonlocal = writes_global_memory;
+ pt->escaped = writes_global_memory;
+ }
}
else if (writes_global_memory)
{
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-16 12:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-16 12:45 [gcc r12-4457] Fix wrong code in ldost-strlen-1.c Jan Hubicka
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).