Commit d60f1706 by Balaji V. Iyer Committed by Balaji V. Iyer

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.

From-SVN: r199825
parent cf28fab6
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.
(find_correct_array_notation_type): Likewise.
2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com> 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-common.c (c_define_builtins): When cilkplus is enabled, the * c-common.c (c_define_builtins): When cilkplus is enabled, the
......
...@@ -541,7 +541,6 @@ extern tree build_modify_expr (location_t, tree, tree, enum tree_code, ...@@ -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, extern tree build_array_notation_expr (location_t, tree, tree, enum tree_code,
location_t, tree, tree); location_t, tree, tree);
extern tree build_array_notation_ref (location_t, tree, tree, tree, 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 tree build_indirect_ref (location_t, tree, ref_operator);
extern int field_decl_cmp (const void *, const void *); 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, ...@@ -1150,7 +1149,19 @@ extern enum stv_conv scalar_to_vector (location_t loc, enum tree_code code,
#define ARRAY_NOTATION_STRIDE(NODE) \ #define ARRAY_NOTATION_STRIDE(NODE) \
TREE_OPERAND (ARRAY_NOTATION_CHECK (NODE), 3) 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 bool is_sec_implicit_index_fn (tree);
extern void array_notation_init_builtins (void); extern void array_notation_init_builtins (void);
extern struct c_expr fix_array_notation_expr (location_t, enum tree_code, extern struct c_expr fix_array_notation_expr (location_t, enum tree_code,
...@@ -1159,4 +1170,13 @@ extern bool contains_array_notation_expr (tree); ...@@ -1159,4 +1170,13 @@ extern bool contains_array_notation_expr (tree);
extern tree expand_array_notation_exprs (tree); extern tree expand_array_notation_exprs (tree);
extern tree fix_conditional_array_notations (tree); extern tree fix_conditional_array_notations (tree);
extern tree find_correct_array_notation_type (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 */ #endif /* ! GCC_C_COMMON_H */
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-05 Balaji V. Iyer <balaji.v.iyer@intel.com> 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-typeck.c (convert_arguments): Moved checking of builtin cilkplus * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
......
...@@ -668,7 +668,4 @@ extern void c_write_global_declarations (void); ...@@ -668,7 +668,4 @@ extern void c_write_global_declarations (void);
extern void pedwarn_c90 (location_t, int opt, const char *, ...) ATTRIBUTE_GCC_DIAG(3,4); extern void pedwarn_c90 (location_t, int opt, const char *, ...) ATTRIBUTE_GCC_DIAG(3,4);
extern void pedwarn_c99 (location_t, int opt, const char *, ...) ATTRIBUTE_GCC_DIAG(3,4); extern void pedwarn_c99 (location_t, int opt, const char *, ...) ATTRIBUTE_GCC_DIAG(3,4);
/* In c-array-notation.c */
enum built_in_function is_cilkplus_reduce_builtin (tree);
#endif /* ! GCC_C_TREE_H */ #endif /* ! GCC_C_TREE_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment