public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-242] [Ada] Remove tiny and incomplete optimization for unset references
@ 2022-05-10 8:22 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-05-10 8:22 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:8cec0688df7258e16b7c9d2614e16b5b9346da1d
commit r13-242-g8cec0688df7258e16b7c9d2614e16b5b9346da1d
Author: Piotr Trojanek <trojanek@adacore.com>
Date: Thu Jan 20 22:37:30 2022 +0100
[Ada] Remove tiny and incomplete optimization for unset references
Code cleanup; behaviour is unaffected.
gcc/ada/
* sem_warn.adb (Check_Unset_Reference): The early test was only
saving time of calls to Original_Node, Comes_From_Source and
Nkind, which are all quick and cheap.
Diff:
---
gcc/ada/sem_warn.adb | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb
index 8ca5c76a075..31ba4d1e903 100644
--- a/gcc/ada/sem_warn.adb
+++ b/gcc/ada/sem_warn.adb
@@ -1882,15 +1882,6 @@ package body Sem_Warn is
return;
end if;
- -- Nothing to do for numeric or string literal. Do this test early to
- -- save time in a common case (it does not matter that we do not include
- -- character literal here, since that will be caught later on in the
- -- when others branch of the case statement).
-
- if Nkind (N) in N_Numeric_Or_String_Literal then
- return;
- end if;
-
-- Ignore reference unless it comes from source. Almost always if we
-- have a reference from generated code, it is bogus (e.g. calls to init
-- procs to set default discriminant values).
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-10 8:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-10 8:22 [gcc r13-242] [Ada] Remove tiny and incomplete optimization for unset references Pierre-Marie de Rodat
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).