diff options
author | Jan Hubicka <jh@suse.cz> | 2010-09-24 21:14:51 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2010-09-24 19:14:51 +0000 |
commit | 46a4da10f5b00da1091d9641836f0550ce9a5120 (patch) | |
tree | 3586ff30f00807c4e59b1bf02ac5e21a1cdad147 /gcc/tree.h | |
parent | e1b793e7c10393b112937ce3e7de4db903052618 (diff) | |
download | gcc-46a4da10f5b00da1091d9641836f0550ce9a5120.zip gcc-46a4da10f5b00da1091d9641836f0550ce9a5120.tar.gz gcc-46a4da10f5b00da1091d9641836f0550ce9a5120.tar.bz2 |
extend.texi: (attribute leaf): Document.
* doc/extend.texi: (attribute leaf): Document.
* tree.c (local_define_builtin): Handle ECF_LEAF.
(build_common_builtin_nodes): Set ECF_LEAF where needed.
* tree.h (ECF_LEAF): New.
* ipa-reference.c (propagate_bits): For leaf calls propagate ever overwrittable
and unavailable functions.
(ipa_init): Put all_module_statics into optimization_summary_obstack.
(copy_global_bitmap): Do not copy all_module_statics.
(read_write_all_from_decl): Use cgraph_node argument; handle ECF_LEAF.
(propagate): Handle overwritable and unavailable leaf functions;
initialize global info for overwritable and unavailable leaf functions;
do not free all module statics.
(ipa_reference_get_not_read_global, ipa_reference_get_not_written_global):
leaf calls don't clobber local statics.
* calls.c (flags_from_decl_or_type): Handle leaf.
* tree-cfg.c (stmt_can_make_abnormal_goto): Leaf functions can't do
abnormal gotos.
* c-common.c (handle_leaf_attribute): New function.
(struct attribute_spec c_common_att): Add leaf.
* gcc.dg/tree-ssa/leaf.c: New testcase.
From-SVN: r164606
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -5224,6 +5224,8 @@ extern tree build_duplicate_type (tree); /* Function does not read or write memory (but may have side effects, so it does not necessarily fit ECF_CONST). */ #define ECF_NOVOPS (1 << 9) +/* The function does not lead to calls within current function unit. */ +#define ECF_LEAF (1 << 10) extern int flags_from_decl_or_type (const_tree); extern int call_expr_flags (const_tree); |