Mercurial > hg > CbC > CbC_gcc
comparison gcc/fold-const.h @ 132:d34655255c78
update gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 10:21:07 +0900 |
parents | 84e7813d76e9 |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
130:e108057fa461 | 132:d34655255c78 |
---|---|
1 /* Fold a constant sub-tree into a single node for C-compiler | 1 /* Fold a constant sub-tree into a single node for C-compiler |
2 Copyright (C) 1987-2017 Free Software Foundation, Inc. | 2 Copyright (C) 1987-2018 Free Software Foundation, Inc. |
3 | 3 |
4 This file is part of GCC. | 4 This file is part of GCC. |
5 | 5 |
6 GCC is free software; you can redistribute it and/or modify it under | 6 GCC is free software; you can redistribute it and/or modify it under |
7 the terms of the GNU General Public License as published by the Free | 7 the terms of the GNU General Public License as published by the Free |
94 #define invert_truthvalue(T)\ | 94 #define invert_truthvalue(T)\ |
95 invert_truthvalue_loc (UNKNOWN_LOCATION, T) | 95 invert_truthvalue_loc (UNKNOWN_LOCATION, T) |
96 extern tree invert_truthvalue_loc (location_t, tree); | 96 extern tree invert_truthvalue_loc (location_t, tree); |
97 extern tree fold_unary_to_constant (enum tree_code, tree, tree); | 97 extern tree fold_unary_to_constant (enum tree_code, tree, tree); |
98 extern tree fold_binary_to_constant (enum tree_code, tree, tree, tree); | 98 extern tree fold_binary_to_constant (enum tree_code, tree, tree, tree); |
99 extern tree fold_bit_and_mask (tree, tree, enum tree_code, | |
100 tree, enum tree_code, tree, tree, | |
101 tree, enum tree_code, tree, tree, tree *); | |
99 extern tree fold_read_from_constant_string (tree); | 102 extern tree fold_read_from_constant_string (tree); |
100 extern tree int_const_binop (enum tree_code, const_tree, const_tree); | 103 extern bool wide_int_binop (wide_int &res, enum tree_code, |
104 const wide_int &arg1, const wide_int &arg2, | |
105 signop, wi::overflow_type *); | |
106 extern tree int_const_binop (enum tree_code, const_tree, const_tree, int = 1); | |
101 #define build_fold_addr_expr(T)\ | 107 #define build_fold_addr_expr(T)\ |
102 build_fold_addr_expr_loc (UNKNOWN_LOCATION, (T)) | 108 build_fold_addr_expr_loc (UNKNOWN_LOCATION, (T)) |
103 extern tree build_fold_addr_expr_loc (location_t, tree); | 109 extern tree build_fold_addr_expr_loc (location_t, tree); |
104 #define build_fold_addr_expr_with_type(T,TYPE)\ | 110 #define build_fold_addr_expr_with_type(T,TYPE)\ |
105 build_fold_addr_expr_with_type_loc (UNKNOWN_LOCATION, (T), TYPE) | 111 build_fold_addr_expr_with_type_loc (UNKNOWN_LOCATION, (T), TYPE) |
112 fold_indirect_ref_loc (UNKNOWN_LOCATION, T) | 118 fold_indirect_ref_loc (UNKNOWN_LOCATION, T) |
113 extern tree fold_indirect_ref_loc (location_t, tree); | 119 extern tree fold_indirect_ref_loc (location_t, tree); |
114 extern tree build_simple_mem_ref_loc (location_t, tree); | 120 extern tree build_simple_mem_ref_loc (location_t, tree); |
115 #define build_simple_mem_ref(T)\ | 121 #define build_simple_mem_ref(T)\ |
116 build_simple_mem_ref_loc (UNKNOWN_LOCATION, T) | 122 build_simple_mem_ref_loc (UNKNOWN_LOCATION, T) |
117 extern offset_int mem_ref_offset (const_tree); | 123 extern poly_offset_int mem_ref_offset (const_tree); |
118 extern tree build_invariant_address (tree, tree, HOST_WIDE_INT); | 124 extern tree build_invariant_address (tree, tree, poly_int64); |
119 extern tree constant_boolean_node (bool, tree); | 125 extern tree constant_boolean_node (bool, tree); |
120 extern tree div_if_zero_remainder (const_tree, const_tree); | 126 extern tree div_if_zero_remainder (const_tree, const_tree); |
121 | 127 |
122 extern bool tree_swap_operands_p (const_tree, const_tree); | 128 extern bool tree_swap_operands_p (const_tree, const_tree); |
123 extern enum tree_code swap_tree_comparison (enum tree_code); | 129 extern enum tree_code swap_tree_comparison (enum tree_code); |
124 | 130 |
125 extern bool ptr_difference_const (tree, tree, HOST_WIDE_INT *); | 131 extern bool ptr_difference_const (tree, tree, poly_int64_pod *); |
126 extern enum tree_code invert_tree_comparison (enum tree_code, bool); | 132 extern enum tree_code invert_tree_comparison (enum tree_code, bool); |
133 extern bool inverse_conditions_p (const_tree, const_tree); | |
127 | 134 |
128 extern bool tree_unary_nonzero_warnv_p (enum tree_code, tree, tree, bool *); | 135 extern bool tree_unary_nonzero_warnv_p (enum tree_code, tree, tree, bool *); |
129 extern bool tree_binary_nonzero_warnv_p (enum tree_code, tree, tree, tree op1, | 136 extern bool tree_binary_nonzero_warnv_p (enum tree_code, tree, tree, tree op1, |
130 bool *); | 137 bool *); |
131 extern bool tree_single_nonzero_warnv_p (tree, bool *); | 138 extern bool tree_single_nonzero_warnv_p (tree, bool *); |
150 extern bool may_negate_without_overflow_p (const_tree); | 157 extern bool may_negate_without_overflow_p (const_tree); |
151 #define round_up(T,N) round_up_loc (UNKNOWN_LOCATION, T, N) | 158 #define round_up(T,N) round_up_loc (UNKNOWN_LOCATION, T, N) |
152 extern tree round_up_loc (location_t, tree, unsigned int); | 159 extern tree round_up_loc (location_t, tree, unsigned int); |
153 #define round_down(T,N) round_down_loc (UNKNOWN_LOCATION, T, N) | 160 #define round_down(T,N) round_down_loc (UNKNOWN_LOCATION, T, N) |
154 extern tree round_down_loc (location_t, tree, int); | 161 extern tree round_down_loc (location_t, tree, int); |
155 extern tree size_int_kind (HOST_WIDE_INT, enum size_type_kind); | 162 extern tree size_int_kind (poly_int64, enum size_type_kind); |
156 #define size_binop(CODE,T1,T2)\ | 163 #define size_binop(CODE,T1,T2)\ |
157 size_binop_loc (UNKNOWN_LOCATION, CODE, T1, T2) | 164 size_binop_loc (UNKNOWN_LOCATION, CODE, T1, T2) |
158 extern tree size_binop_loc (location_t, enum tree_code, tree, tree); | 165 extern tree size_binop_loc (location_t, enum tree_code, tree, tree); |
159 #define size_diffop(T1,T2)\ | 166 #define size_diffop(T1,T2)\ |
160 size_diffop_loc (UNKNOWN_LOCATION, T1, T2) | 167 size_diffop_loc (UNKNOWN_LOCATION, T1, T2) |
178 extern tree exact_inverse (tree, tree); | 185 extern tree exact_inverse (tree, tree); |
179 extern bool expr_not_equal_to (tree t, const wide_int &); | 186 extern bool expr_not_equal_to (tree t, const wide_int &); |
180 extern tree const_unop (enum tree_code, tree, tree); | 187 extern tree const_unop (enum tree_code, tree, tree); |
181 extern tree const_binop (enum tree_code, tree, tree, tree); | 188 extern tree const_binop (enum tree_code, tree, tree, tree); |
182 extern bool negate_mathfn_p (combined_fn); | 189 extern bool negate_mathfn_p (combined_fn); |
183 extern const char *c_getstr (tree, unsigned HOST_WIDE_INT *strlen = NULL); | 190 extern const char *c_getstr (tree, unsigned HOST_WIDE_INT * = NULL); |
191 extern wide_int tree_nonzero_bits (const_tree); | |
184 | 192 |
185 /* Return OFF converted to a pointer offset type suitable as offset for | 193 /* Return OFF converted to a pointer offset type suitable as offset for |
186 POINTER_PLUS_EXPR. Use location LOC for this conversion. */ | 194 POINTER_PLUS_EXPR. Use location LOC for this conversion. */ |
187 extern tree convert_to_ptrofftype_loc (location_t loc, tree off); | 195 extern tree convert_to_ptrofftype_loc (location_t loc, tree off); |
188 | 196 |