summaryrefslogtreecommitdiff
path: root/gcc/ipa-reference.h
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2008-09-18 17:28:40 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2008-09-18 17:28:40 +0000
commit86844d6c095dfa67c72e0dd4db3446aa85c5e663 (patch)
treeebbd388fee9c2b29fa34e1972bac913405e30d33 /gcc/ipa-reference.h
parent9abaa85a3de5dd957de49a911fdcaab1122d2d7f (diff)
downloadgcc-86844d6c095dfa67c72e0dd4db3446aa85c5e663.tar.gz
PR middle-end/37448
* ipa-reference.c (ipa_reference_local_vars_info_d, ipa_reference_global_vars_info_d, ipa_reference_local_vars_info_t, ipa_reference_global_vars_info_t, ipa_reference_vars_info_t): Move here from ipa-reference.h (node_duplication_hook_holder, node_removal_hook_holder): New. (get_reference_vars_info_from_cgraph): Rename to ... (get_reference_vars_info): ... this one, use cgraph uids. (get_local_reference_vars_info, get_global_reference_vars_info): Use cgraph instead of decl. (ipa_reference_get_read_local, ipa_reference_get_written_local): Remove. (ipa_reference_get_read_global, ipa_reference_get_not_read_global ipa_reference_get_written_global, ipa_reference_get_not_written_global): Use cgraph argument. (check_call): Simplify avail check. (scan_stmt_for_static_refs): Update. (propagate_bits): Update. (merge_callee_local_info): Remove. (init_function_info): Use cgraph nodes. (clean_function_local_data): Break out from ... (clean_function): ... here. (copy_local_bitmap, copy_global_bitmap): New functions. (duplicate_node_data, remove_node_data): New functions. (generate_summary): Register hooks; use visibility instead of master clones. (propafate): Use cgraph nodes; copy bitmap to each node in cycle. * ipa-reference.h (ipa_reference_local_vars_info_d, ipa_reference_global_vars_info_d, ipa_reference_local_vars_info_t, ipa_reference_global_vars_info_t, ipa_reference_vars_info_t): Move to ipa-reference.c (ipa_reference_get_read_local, ipa_reference_get_written_local): Remove. (ipa_reference_get_read_global, ipa_reference_get_written_global, ipa_reference_get_not_read_global, ipa_reference_get_not_written_global): Update prototype. * ipa-pure-const.c (funct_state_vec): Turn into VECtor. (init_state): Remove. (node_duplication_hook_holder, node_removal_hook_holder): New. (get_function_state, set_function_state): Use VECtor. (analyze_function): Check body availability. (add_new_function): Likewise. (duplicate_node_data, remove_node_data): New. (generate_summary): Register hooks; do not care about clones. (propafate): Do not care about clones; recursive functions are not looping. * ipa-utils.c (searchc, ipa_utils_reduced_inorder): Do not skip clones. * ipa-prop.c (edge_removal_hook_holder, node_removal_hook_holder, * edge_duplication_hook_holder, node_duplication_hook_holder): Make static. * tree-flow.h (function_ann_d): Remove reference_vars_info. * tree-ssa-opreands.c (add_call_clobber_ops, add_call_read_ops): Update call of ipa-reference accesors. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140463 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-reference.h')
-rw-r--r--gcc/ipa-reference.h57
1 files changed, 4 insertions, 53 deletions
diff --git a/gcc/ipa-reference.h b/gcc/ipa-reference.h
index 1800a8ca9b9..7d5b36ed36b 100644
--- a/gcc/ipa-reference.h
+++ b/gcc/ipa-reference.h
@@ -23,60 +23,11 @@ along with GCC; see the file COPYING3. If not see
#include "bitmap.h"
#include "tree.h"
-/* The static variables defined within the compilation unit that are
- loaded or stored directly by function that owns this structure. */
-
-struct ipa_reference_local_vars_info_d
-{
- bitmap statics_read;
- bitmap statics_written;
-
- /* Set when this function calls another function external to the
- compilation unit or if the function has a asm clobber of memory.
- In general, such calls are modeled as reading and writing all
- variables (both bits on) but sometime there are attributes on the
- called function so we can do better. */
- bool calls_read_all;
- bool calls_write_all;
-};
-
-struct ipa_reference_global_vars_info_d
-{
- bitmap statics_read;
- bitmap statics_written;
- bitmap statics_not_read;
- bitmap statics_not_written;
-};
-
-/* Statics that are read and written by some set of functions. The
- local ones are based on the loads and stores local to the function.
- The global ones are based on the local info as well as the
- transitive closure of the functions that are called. The
- structures are separated to allow the global structures to be
- shared between several functions since every function within a
- strongly connected component will have the same information. This
- sharing saves both time and space in the computation of the vectors
- as well as their translation from decl_uid form to ann_uid
- form. */
-
-typedef struct ipa_reference_local_vars_info_d *ipa_reference_local_vars_info_t;
-typedef struct ipa_reference_global_vars_info_d *ipa_reference_global_vars_info_t;
-
-struct ipa_reference_vars_info_d
-{
- ipa_reference_local_vars_info_t local;
- ipa_reference_global_vars_info_t global;
-};
-
-typedef struct ipa_reference_vars_info_d *ipa_reference_vars_info_t;
-
/* In ipa-reference.c */
-bitmap ipa_reference_get_read_local (tree fn);
-bitmap ipa_reference_get_written_local (tree fn);
-bitmap ipa_reference_get_read_global (tree fn);
-bitmap ipa_reference_get_written_global (tree fn);
-bitmap ipa_reference_get_not_read_global (tree fn);
-bitmap ipa_reference_get_not_written_global (tree fn);
+bitmap ipa_reference_get_read_global (struct cgraph_node *fn);
+bitmap ipa_reference_get_written_global (struct cgraph_node *fn);
+bitmap ipa_reference_get_not_read_global (struct cgraph_node *fn);
+bitmap ipa_reference_get_not_written_global (struct cgraph_node *fn);
#endif /* GCC_IPA_REFERENCE_H */