* [C++] Make constructions inlined
@ 2007-01-17 16:58 Jan Hubicka
2007-01-18 16:16 ` Dirk Mueller
2007-01-23 3:31 ` Mark Mitchell
0 siblings, 2 replies; 3+ messages in thread
From: Jan Hubicka @ 2007-01-17 16:58 UTC (permalink / raw)
To: gcc-patches, mark
Hi,
while looking at the C++ hello world, I noticed that
static_storage_duration_functions are not inlined into the constructors.
This just makes the programs bigger and I guess it increases the startup
times that is sometimes limiting factor.
decl2.c prohibits inlining for reasons that should be long time
obsolette after switching to unit-at-a-time.
Perhaps concerning the program startup times, like we have
text.hot/text.cold sections, we could introduce
text.construct/text.destruct and place there the
constructors/destructors themselves and all functions reachable only at
construction/destruction time.
Bootstrapped/regtested i686-linux, OK?
:ADDPATCH c++:
Honza
* decl2.c (start_objects, start_static_storage_duration_function):
Do not make the functions uninlinable.
Index: cp/decl2.c
===================================================================
*** cp/decl2.c (revision 120834)
--- cp/decl2.c (working copy)
*************** start_objects (int method_type, int init
*** 2340,2352 ****
body = begin_compound_stmt (BCS_FN_BODY);
- /* We cannot allow these functions to be elided, even if they do not
- have external linkage. And, there's no point in deferring
- compilation of these functions; they're all going to have to be
- out anyhow. */
- DECL_INLINE (current_function_decl) = 0;
- DECL_UNINLINABLE (current_function_decl) = 1;
-
return body;
}
--- 2340,2345 ----
*************** start_static_storage_duration_function (
*** 2444,2449 ****
--- 2437,2443 ----
type);
TREE_PUBLIC (ssdf_decl) = 0;
DECL_ARTIFICIAL (ssdf_decl) = 1;
+ DECL_INLINE (ssdf_decl) = 1;
/* Put this function in the list of functions to be called from the
static constructors and destructors. */
*************** start_static_storage_duration_function (
*** 2497,2507 ****
/* Set up the scope of the outermost block in the function. */
body = begin_compound_stmt (BCS_FN_BODY);
- /* This function must not be deferred because we are depending on
- its compilation to tell us what is TREE_SYMBOL_REFERENCED. */
- DECL_INLINE (ssdf_decl) = 0;
- DECL_UNINLINABLE (ssdf_decl) = 1;
-
return body;
}
--- 2491,2496 ----
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [C++] Make constructions inlined
2007-01-17 16:58 [C++] Make constructions inlined Jan Hubicka
@ 2007-01-18 16:16 ` Dirk Mueller
2007-01-23 3:31 ` Mark Mitchell
1 sibling, 0 replies; 3+ messages in thread
From: Dirk Mueller @ 2007-01-18 16:16 UTC (permalink / raw)
To: gcc-patches
On Wednesday, 17. January 2007 17:58, Jan Hubicka wrote:
> static_storage_duration_functions are not inlined into the constructors.
> This just makes the programs bigger and I guess it increases the startup
> times that is sometimes limiting factor.
> decl2.c prohibits inlining for reasons that should be long time
> obsolette after switching to unit-at-a-time.
perhaps add a testcase to the suite?
Dirk
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [C++] Make constructions inlined
2007-01-17 16:58 [C++] Make constructions inlined Jan Hubicka
2007-01-18 16:16 ` Dirk Mueller
@ 2007-01-23 3:31 ` Mark Mitchell
1 sibling, 0 replies; 3+ messages in thread
From: Mark Mitchell @ 2007-01-23 3:31 UTC (permalink / raw)
To: Jan Hubicka; +Cc: gcc-patches
Jan Hubicka wrote:
> :ADDPATCH c++:
> Honza
>
> * decl2.c (start_objects, start_static_storage_duration_function):
> Do not make the functions uninlinable.
:REVIEWMAIL: OK
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-01-23 3:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-17 16:58 [C++] Make constructions inlined Jan Hubicka
2007-01-18 16:16 ` Dirk Mueller
2007-01-23 3:31 ` Mark Mitchell
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).