From: Jan Hubicka Date: Sun, 29 Nov 2020 15:31:47 +0000 (+0100) Subject: Skip EAF_UNUSED parameters in handle_pure_call X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=01148fa656ba5a68bfe6d788c1a9bacd48ccc44f;p=gcc.git Skip EAF_UNUSED parameters in handle_pure_call * tree-ssa-structalias.c (handle_pure_call): Skip EAF_UNUSED parameters. --- diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 9f4de96d544..cf653be8b6d 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -4274,6 +4274,11 @@ handle_pure_call (gcall *stmt, vec *results) for (i = 0; i < gimple_call_num_args (stmt); ++i) { tree arg = gimple_call_arg (stmt, i); + int flags = gimple_call_arg_flags (stmt, i); + + /* If the argument is not used we can ignore it. */ + if (flags & EAF_UNUSED) + continue; if (!uses) { uses = get_call_use_vi (stmt);