summaryrefslogtreecommitdiff
path: root/gcc/c-family/c-common.h
diff options
context:
space:
mode:
authorbviyer <bviyer@138bc75d-0d04-0410-961f-82ee72b054a4>2013-06-07 17:41:52 +0000
committerbviyer <bviyer@138bc75d-0d04-0410-961f-82ee72b054a4>2013-06-07 17:41:52 +0000
commit09970d67f916660e0e17615cf241378450ee0c82 (patch)
tree5060dc228092332f439762b5a2364429d3fc32c7 /gcc/c-family/c-common.h
parent0f8f626c8a8124ad93330ae307c83104a115503a (diff)
downloadgcc-09970d67f916660e0e17615cf241378450ee0c82.tar.gz
Moved array notation helper functions from c/ to c-family/ files.
2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com> * c-array-notation.c (length_mismatch_in_expr_p): Moved this function to c-family/array-notation-common.c. (is_cilkplus_reduce_builtin): Likewise. (find_rank): Likewise. (extract_array_notation_exprs): Likewise. (replace_array_notations): Likewise. (find_inv_trees): Likewise. (replace_inv_trees): Likewise. (contains_array_notation_expr): Likewise. (find_correct_array_notation_type): Likewise. (replace_invariant_exprs): Initialized additional_tcodes to NULL. (struct inv_list): Moved this to c-family/array-notation-common.c. * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype. 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com> * array-notation-common.c (length_mismatch_in_expr_p): Moved this function from c/c-array-notation.c. (is_cilkplus_reduce_builtin): Likewise. (find_rank): Likewise. (extract_array_notation_exprs): Likewise. (replace_array_notations): Likewise. (find_inv_trees): Likewise. (replace_inv_trees): Likewise. (contains_array_notation_expr): Likewise. (find_correct_array_notation_type): Likewise. * c-common.h (struct inv_list): Moved this struct from the file c/c-array-notation.c and added a new field called additional tcodes. (length_mismatch_in_expr_p): New prototype. (is_cilkplus_reduce_builtin): Likewise. (find_rank): Likewise. (extract_array_notation_exprs): Likewise. (replace_array_notation): Likewise. (find_inv_trees): Likewise. (replace_inv_trees): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@199825 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-family/c-common.h')
-rw-r--r--gcc/c-family/c-common.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h
index d89982174bb..8eaf54fe502 100644
--- a/gcc/c-family/c-common.h
+++ b/gcc/c-family/c-common.h
@@ -541,7 +541,6 @@ extern tree build_modify_expr (location_t, tree, tree, enum tree_code,
extern tree build_array_notation_expr (location_t, tree, tree, enum tree_code,
location_t, tree, tree);
extern tree build_array_notation_ref (location_t, tree, tree, tree, tree, tree);
-extern bool find_rank (location_t, tree, tree, bool, size_t *);
extern tree build_indirect_ref (location_t, tree, ref_operator);
extern int field_decl_cmp (const void *, const void *);
@@ -1150,7 +1149,19 @@ extern enum stv_conv scalar_to_vector (location_t loc, enum tree_code code,
#define ARRAY_NOTATION_STRIDE(NODE) \
TREE_OPERAND (ARRAY_NOTATION_CHECK (NODE), 3)
-extern int extract_sec_implicit_index_arg (location_t, tree);
+/* This structure holds all the scalar values and its appropriate variable
+ replacment. It is mainly used by the function that pulls all the invariant
+ parts that should be executed only once, which comes with array notation
+ expressions. */
+struct inv_list
+{
+ vec<tree, va_gc> *list_values;
+ vec<tree, va_gc> *replacement;
+ vec<enum rid, va_gc> *additional_tcodes;
+};
+
+/* In array-notation-common.c. */
+extern HOST_WIDE_INT extract_sec_implicit_index_arg (location_t, tree);
extern bool is_sec_implicit_index_fn (tree);
extern void array_notation_init_builtins (void);
extern struct c_expr fix_array_notation_expr (location_t, enum tree_code,
@@ -1159,4 +1170,13 @@ extern bool contains_array_notation_expr (tree);
extern tree expand_array_notation_exprs (tree);
extern tree fix_conditional_array_notations (tree);
extern tree find_correct_array_notation_type (tree);
+extern bool length_mismatch_in_expr_p (location_t, tree **, size_t, size_t);
+extern enum built_in_function is_cilkplus_reduce_builtin (tree);
+extern bool find_rank (location_t, tree, tree, bool, size_t *);
+extern void extract_array_notation_exprs (tree, bool, vec<tree, va_gc> **);
+extern void replace_array_notations (tree *, bool, vec<tree, va_gc> *,
+ vec<tree, va_gc> *);
+extern tree find_inv_trees (tree *, int *, void *);
+extern tree replace_inv_trees (tree *, int *, void *);
+extern tree find_correct_array_notation_type (tree op);
#endif /* ! GCC_C_COMMON_H */