diff options
author | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-20 11:36:14 +0000 |
---|---|---|
committer | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-20 11:36:14 +0000 |
commit | cc69bcd02109a1bd756944f5c7a9b36f37d6672c (patch) | |
tree | eb24152e318078885e58cc808a62c142d2acee21 | |
parent | 495b0fa44b9e32bdd001f1133e1c957791e362d8 (diff) | |
download | gcc-cc69bcd02109a1bd756944f5c7a9b36f37d6672c.tar.gz |
2005-05-20 Andrew Pinski <pinskia@physics.uc.edu>
* optimize.c (calls_setjmp_r): Remove.
(calls_setjmp_p): Remove.
* cp-tree.c (calls_setjmp_p): Remove.
* decl.c (finish_function): Do not call calls_setjmp_p.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82049 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cp/cp-tree.h | 1 | ||||
-rw-r--r-- | gcc/cp/decl.c | 12 | ||||
-rw-r--r-- | gcc/cp/optimize.c | 27 |
4 files changed, 7 insertions, 40 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 89c1922c5a4..e4836fdc650 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2005-05-20 Andrew Pinski <pinskia@physics.uc.edu> + + * optimize.c (calls_setjmp_r): Remove. + (calls_setjmp_p): Remove. + * cp-tree.c (calls_setjmp_p): Remove. + * decl.c (finish_function): Do not call calls_setjmp_p. + 2004-05-18 Zack Weinberg <zack@codesourcery.com> * decl.c (cp_finish_decl): Use mark_decl_referenced. diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 7efe55d8061..9fc83d56bce 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -3851,7 +3851,6 @@ extern tree implicitly_declare_fn (special_function_kind, tree, bool); extern tree skip_artificial_parms_for (tree, tree); /* In optimize.c */ -extern bool calls_setjmp_p (tree); extern bool maybe_clone_body (tree); /* in pt.c */ diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 6407aedf228..fe04827808e 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -10756,18 +10756,6 @@ finish_function (int flags) if (!processing_template_decl) save_function_data (fndecl); - /* If this function calls `setjmp' it cannot be inlined. When - `longjmp' is called it is not guaranteed to restore the value of - local variables that have been modified since the call to - `setjmp'. So, if were to inline this function into some caller - `c', then when we `longjmp', we might not restore all variables - in `c'. (It might seem, at first blush, that there's no way for - this function to modify local variables in `c', but their - addresses may have been stored somewhere accessible to this - function.) */ - if (!processing_template_decl && calls_setjmp_p (fndecl)) - DECL_UNINLINABLE (fndecl) = 1; - /* Complain if there's just no return statement. */ if (warn_return_type && TREE_CODE (TREE_TYPE (fntype)) != VOID_TYPE diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c index 7f45ae9123c..5102f576bbe 100644 --- a/gcc/cp/optimize.c +++ b/gcc/cp/optimize.c @@ -44,35 +44,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA /* Prototypes. */ -static tree calls_setjmp_r (tree *, int *, void *); static void update_cloned_parm (tree, tree); -/* Called from calls_setjmp_p via walk_tree. */ - -static tree -calls_setjmp_r (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED, - void *data ATTRIBUTE_UNUSED) -{ - /* We're only interested in FUNCTION_DECLS. */ - if (TREE_CODE (*tp) != FUNCTION_DECL) - return NULL_TREE; - - return setjmp_call_p (*tp) ? *tp : NULL_TREE; -} - -/* Returns nonzero if FN calls `setjmp' or some other function that - can return more than once. This function is conservative; it may - occasionally return a nonzero value even when FN does not actually - call `setjmp'. */ - -bool -calls_setjmp_p (tree fn) -{ - return walk_tree_without_duplicates (&DECL_SAVED_TREE (fn), - calls_setjmp_r, - NULL) != NULL_TREE; -} - /* CLONED_PARM is a copy of CLONE, generated for a cloned constructor or destructor. Update it to ensure that the source-position for the cloned parameter matches that for the original, and that the |