diff options
author | Jakub Jelinek <jakub@redhat.com> | 2001-02-22 12:46:33 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2001-02-22 12:46:33 +0100 |
commit | b3bae5e2bf8b2f06d687adb32740f6258b5e3b36 (patch) | |
tree | ca3614007d0819a932a044965511b4b6c9fbc586 /gcc/cp/cp-tree.h | |
parent | 35723595ab2119465335b36a7fc599a96c91d461 (diff) | |
download | gcc-b3bae5e2bf8b2f06d687adb32740f6258b5e3b36.zip gcc-b3bae5e2bf8b2f06d687adb32740f6258b5e3b36.tar.gz gcc-b3bae5e2bf8b2f06d687adb32740f6258b5e3b36.tar.bz2 |
cp-tree.h (struct lang_decl_inlined_fns): New.
* cp-tree.h (struct lang_decl_inlined_fns): New.
(struct lang_decls): Add inlined_fns.
(DECL_INLINED_FNS): New macro.
* optimize.c (struct inline_data): Add inlined_fns.
(declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
(inlinable_function_p): Likewise, fix typo in comment,
function is not inlinable if it already inlined function currently
being optimized.
(expand_call_inline): Add fn to inlined_fns if neccessary.
(optimize_function): Initialize inlined_fns.
Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
* decl.c (mark_inlined_fns): New function.
(lang_mark_tree): Call it.
* g++.old-deja/g++.other/inline20.C: New test.
From-SVN: r39977
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r-- | gcc/cp/cp-tree.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 240832a..2aca7d1 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -1855,6 +1855,12 @@ struct lang_decl_flags struct unparsed_text; +struct lang_decl_inlined_fns +{ + size_t num_fns; + tree fns[1]; +}; + struct lang_decl { struct lang_decl_flags decl_flags; @@ -1868,6 +1874,9 @@ struct lang_decl /* In a FUNCTION_DECL, this is DECL_CLONED_FUNCTION. */ tree cloned_function; + /* In a FUNCTION_DECL, this is a list of trees inlined into its body. */ + struct lang_decl_inlined_fns *inlined_fns; + union { tree sorted_fields; @@ -1978,6 +1987,10 @@ struct lang_decl #define DECL_CLONED_FUNCTION(NODE) \ (DECL_LANG_SPECIFIC (NODE)->cloned_function) +/* List of FUNCION_DECLs inlined into this function's body. */ +#define DECL_INLINED_FNS(NODE) \ + (DECL_LANG_SPECIFIC (NODE)->inlined_fns) + /* Non-zero if the VTT parm has been added to NODE. */ #define DECL_HAS_VTT_PARM_P(NODE) \ (DECL_LANG_SPECIFIC (NODE)->decl_flags.has_vtt_parm_p) |