diff options
author | Hristian Kirtchev <kirtchev@adacore.com> | 2018-06-11 09:16:54 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2018-06-11 09:16:54 +0000 |
commit | 692918a9c1e601ecf81f99eb4926268964f62181 (patch) | |
tree | af872ce2ce742199a99bca8764dcc9621416aae8 /gcc/tree-ssa-strlen.c | |
parent | 51b84f99dca6308f581da724faf7f4646d991f1a (diff) | |
download | gcc-692918a9c1e601ecf81f99eb4926268964f62181.zip gcc-692918a9c1e601ecf81f99eb4926268964f62181.tar.gz gcc-692918a9c1e601ecf81f99eb4926268964f62181.tar.bz2 |
[Ada] Performance degradation with references
This patch modifies the creation of markers for variable references in the
context of SPARK elaboration checks. Previously, prior to checking whether a
reference requires such a marker, the compiler performed a logarithmic look up
to determine whether the reference appears within a call. This action caused
the compiler to degrade when a source program contains multiple (100,000s)
references. Now, the compiler no longer performs the look up immediately.
2018-06-11 Hristian Kirtchev <kirtchev@adacore.com>
gcc/ada/
* sem_ch8.adb (Find_Direct_Name): Mode the declaration of
Is_Assignment_LHS further in. Use predicate
Needs_Variable_Reference_Marker to determine whether to create a
variable marker.
(Find_Expanded_Name): Mode the declaration of Is_Assignment_LHS further
in. Use predicate Needs_Variable_Reference_Marker to determine whether
to create a variable marker.
* sem_elab.adb (Build_Variable_Reference_Marker): Remove the various
checks that determine whether the identifier or expanded name is a
suitable variable reference. The checks are now performed by
Needs_Variable_Reference_Marker.
* sem_res.adb (Resolve_Actuals): Use predicate
Needs_Variable_Reference_Marker to determine whether to create a
variable marker.
* sem_util.adb (Needs_Variable_Reference_Marker): New routine.
* sem_util.ads (Needs_Variable_Reference_Marker): New routine.
From-SVN: r261400
Diffstat (limited to 'gcc/tree-ssa-strlen.c')
0 files changed, 0 insertions, 0 deletions