mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
64a6f143a1b2d8a8e24e5c2c302d0b3977592b57
There are cases where GNAT introduces a dependence on the secondary stack in a build-in-place function with a result subtype that is definite, when this dependence could be avoided. In particular this is done for record types that requires finalization due to having a controlled component. At one time such functions required the secondary stack in order to properly handle cases where the function might raise an exception (to avoid improper finalization in the caller), but that is no longer necessary. We remove the dependence of these functions on the SS, along with the BIPalloc formal and the generation of the big if_statement that uses that formal. An additional small change is to revise the condition for determining when to generate SS mark/release within functions. gcc/ada/ChangeLog: * exp_ch6.ads (Make_Build_In_Place_Call_In_Allocator): Simplify comment. * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Remove obsolete comment about not being able to allocate fixed-size controlled results on the caller side, and replace another obsolete comment with a simpler comment. Call Build_Allocate_Deallocate_Proc when the function doesn't need a BIPalloc formal to ensure that function results with controlled parts allocated on the caller side will be chained for finalization. (Make_Build_In_Place_Call_In_Object_Declaration): Call Needs_BIP_Collection on the function's Entity_Id rather than the function call. (Needs_BIP_Collection): If a BIP function doesn't need a BIPalloc formal then it doesn't need a BIP collection either; return False in that case. (Needs_BIP_Alloc_Form): Remove test of Needs_BIP_Collection. * exp_ch7.adb (Expand_Cleanup_Actions): Move test of Uses_Sec_Stack to be the first conjunct in setting of Needs_Sec_Stack_Mark, and put the other tests in a disjunction subsidiary to that. Improve preceding comment.
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
This directory contains the GNU Compiler Collection (GCC). The GNU Compiler Collection is free software. See the files whose names start with COPYING for copying permission. The manuals, and some of the runtime libraries, are under different terms; see the individual source files for details. The directory INSTALL contains copies of the installation information as HTML and plain text. The source of this information is gcc/doc/install.texi. The installation information includes details of what is included in the GCC sources and what files GCC installs. See the file gcc/doc/gcc.texi (together with other files that it includes) for usage and porting information. An online readable version of the manual is in the files gcc/doc/gcc.info*. See http://gcc.gnu.org/bugs/ for how to report bugs usefully. Copyright years on GCC source files may be listed using range notation, e.g., 1987-2012, indicating that every year in the range, inclusive, is a copyrightable year that could otherwise be listed individually.
Description
Languages
C++
30.7%
C
30.2%
Ada
14.4%
D
6.1%
Go
5.7%
Other
12.4%