aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorKenneth Zadeck <zadeck@naturalbridge.com>2008-05-07 20:48:07 +0000
committerKenneth Zadeck <zadeck@gcc.gnu.org>2008-05-07 20:48:07 +0000
commitbecfd6e57bd90a45e5ab409db85f2e69e5945213 (patch)
treeb1aaf0884496e7223907dc2c04ecd0cf5ded732f /gcc/cp
parentd320458418faac54c634134195b6afa432dbb50c (diff)
downloadgcc-becfd6e57bd90a45e5ab409db85f2e69e5945213.zip
gcc-becfd6e57bd90a45e5ab409db85f2e69e5945213.tar.gz
gcc-becfd6e57bd90a45e5ab409db85f2e69e5945213.tar.bz2
[multiple changes]
2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com> PATCH rtl/7335 PATCH rtl/33826 * see.c (see_copy_insn): Copy new pure const attributes for new call. * c-decl.c (merge_decls): Ditto. * postreload.c (record_opr_changes): Change CONST_OR_PURE_CALL_P to RTL_CONST_OR_PURE_CALL_P. * tree.c (define_local_buitin): Rename DECL_IS_PURE to DECL_PURE_P. Initialized DECL_LOOPING_CONST_PURE. (process_call_operands): Set tree_side_effects properly. * tree.h (TREE_READONLY_DECL_P): Removed. (DECL_IS_PURE): Renamed to DECL_PURE_P. (DECL_LOOPING_OR_CONST_P): New macro. (struct tree_function_decl): Added looping_const_or_pure_p. (ECF_*) Renumbered. (ECF_LOOPING_OR_CONST_P): New macro, * rtlanal.c (pure_const_p): Removed. * builtins.c (expand_builtin): Rename DECL_IS_PURE to DECL_PURE_P. * reorg.c (delete_prior_computation) Changed CONST_OR_PURE_CALL_P to RTL_CONST_CALL_P. * ipa-pure-const.c (pure_const_state_e): Added looping field. (check_decl, check_tree, check_call, scan_function): Initialize looping. (analyze_function): Rename DECL_IS_PURE to DECL_PURE_P. (static_execute): Set looping true for recursive functions. Undo setting state to IPA_NEITHER for recursive functions. * cse.c (cse_insn): * ifcvt.c (noce_can_store_speculate_p): Changed CONST_OR_PURE_CALL_P and pure_call_p to RTL_CONST_CALL_P or RTL_CONST_OR_PURE_CALL_P. * dse.c (scan_insn): Ditto. * local-alloc.c (validate_equiv_mem, memref_used_between_p): Ditto. * gcse.c (oprs_not_seen_p) Changed CONST_OR_PURE_CALL_P to RTL_CONST_OR_PURE_CALL_P. (store_killed_in_insn): Changed CONST_OR_PURE_CALL_P and pure_call_p to RTL_CONST_CALL_P. * gimplify.c (gimplify_call_expr): Clear side effects for non-looping pure and constant calls. * calls.c (emit_call_1): Set rtl flags from ecf flags. (flags_from_decl_or_type): Set ecf flags from decl flags. (initialize_argument_information): Turn off ECF_LOOPING_CONST_OR_PURE when turning off ECF_CONST. Change const to pure if callee_copies is true rather than just turning off const. (expand_call): Turn off ECF_LOOPING_PURE_CONST_CALL and remove old way of marking pure calls. (emit_library_call_value_1): Turn off ECF_LOOPING_PURE_CONST_CALL. Remove hack that was supposed to fix pr7335 and remove old way of marking pure calls. * emit-rtl.c (emit_copy_of_insn_after): Copy RTL_CONST_CALL_P, RTL_PURE_CALL_P, RTL_LOOPING_CONST_OR_PURE_CALL_P. * cselib.c (cselib_process_insn): Changed CONST_OR_PURE_CALL_P to RTL_CONST_OR_PURE_CALL_P. * tree-ssa-pre.c (can_value_number_call): Fixed spacing. * loop-invariant.c (find_exits, find_invariant_bb): Changed CONST_OR_PURE_CALL_P to RTL_CONST_OR_PURE_CALL_P. * sched-deps.c (schedule_analyze): Ditto. * rtl.h (struct rtx_def): Use call field, unchanging field, and return_val field of calls to represent pure and const function info. (CONST_OR_PURE_CALL_P): Deleted macro. (RTL_CONST_CALL_P, RTL_PURE_CALL_P, RTL_LOOPING_CONST_OR_PURE_CALL_P, RTL_CONST_OR_PURE_P): New macros. * tree-inline.c (copy_body_r): Changed TREE_READONLY_DECL_P to TREE_READONLY. * tree-optimize.c (execute_fixup_cfg): Added test for ECF_LOOPING_CONST_OR_PURE. * c-common.c (handle_pure_attribute): Changed DECL_IS_PURE to DECL_PURE_P. * tree-cfg.c (update_call_expr_flags): Do not clear tree side effects for looping pure or const calls. (verify_gimple_expr): Added verification code. * config/alpha/alpha.c (alpha_legitimize_address, alpha_emit_xfloating_libcall): Changed CONST_OR_PURE_CALL_P to RTL_CONST_CALL_P. * config/s390/s390.c (s390_emit_tls_call_insn): Ditto. * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Ditto. * config/mips/mips.c (mips_call_tls_get_addr): Ditto. * cfgrtl.c (need_fake_edge_p): Changed CONST_OR_PURE_CALL_P to RTL_CONST_OR_PURE_CALL_P. * dce.c (deletable_insn_p): Allow non looping, non sibling, pure and const calls to be deleted. java: 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com> * decl.c (java_init_decl_processing): Change DECL_IS_PURE to DECL_PURE_P. cp: 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com> * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY, DECL_LOOPING_CONST_OR_PURE_P attributes. * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to DECL_PURE_P. gfortran: 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com> * trans-decl.c (gfc_get_extern_function_decl, build_function_decl): Rename DECL_IS_PURE to DECL_PURE_P. From-SVN: r135053
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog8
-rw-r--r--gcc/cp/decl.c6
-rw-r--r--gcc/cp/rtti.c2
3 files changed, 13 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 5bbeda6..473db14 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,11 @@
+2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
+
+ * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
+ DECL_LOOPING_CONST_OR_PURE_P attributes.
+ * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
+ DECL_PURE_P.
+
+
2008-05-02 Simon Baldwin <simonb@google.com>
PR bootstrap/36108
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 221b300..8b9b211 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -1802,11 +1802,13 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
|= DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (olddecl);
DECL_NO_LIMIT_STACK (newdecl) |= DECL_NO_LIMIT_STACK (olddecl);
TREE_THIS_VOLATILE (newdecl) |= TREE_THIS_VOLATILE (olddecl);
- TREE_READONLY (newdecl) |= TREE_READONLY (olddecl);
TREE_NOTHROW (newdecl) |= TREE_NOTHROW (olddecl);
DECL_IS_MALLOC (newdecl) |= DECL_IS_MALLOC (olddecl);
DECL_IS_OPERATOR_NEW (newdecl) |= DECL_IS_OPERATOR_NEW (olddecl);
- DECL_IS_PURE (newdecl) |= DECL_IS_PURE (olddecl);
+ DECL_PURE_P (newdecl) |= DECL_PURE_P (olddecl);
+ TREE_READONLY (newdecl) |= TREE_READONLY (olddecl);
+ DECL_LOOPING_CONST_OR_PURE_P (newdecl)
+ |= DECL_LOOPING_CONST_OR_PURE_P (olddecl);
/* Keep the old RTL. */
COPY_DECL_RTL (olddecl, newdecl);
}
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index 2d2ef5b..1dcd785 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -707,7 +707,7 @@ build_dynamic_cast_1 (tree type, tree expr, tsubst_flags_t complain)
(NULL_TREE, ptrdiff_type_node, void_list_node))));
tmp = build_function_type (ptr_type_node, tmp);
dcast_fn = build_library_fn_ptr (name, tmp);
- DECL_IS_PURE (dcast_fn) = 1;
+ DECL_PURE_P (dcast_fn) = 1;
pop_abi_namespace ();
dynamic_cast_node = dcast_fn;
}