TREE_FLOW_H = tree-flow.h tree-flow-inline.h tree-ssa-operands.h \
$(BITMAP_H) sbitmap.h $(BASIC_BLOCK_H) $(GIMPLE_H) \
$(HASHTAB_H) $(CGRAPH_H) $(IPA_REFERENCE_H) \
- tree-ssa-alias.h
+ tree-ssa-alias.h wide-int.h
+ TREE_SSA_H = tree-ssa.h $(TREE_FLOW_H)
TREE_HASHER_H = tree-hasher.h $(HASH_TABLE_H) $(TREE_FLOW_H)
TREE_SSA_LIVE_H = tree-ssa-live.h $(PARTITION_H)
SSAEXPAND_H = ssaexpand.h $(TREE_SSA_LIVE_H)
all-tree.def $(FLAGS_H) $(FUNCTION_H) $(PARAMS_H) \
toplev.h $(DIAGNOSTIC_CORE_H) $(GGC_H) $(HASHTAB_H) $(TARGET_H) output.h $(TM_P_H) \
langhooks.h gt-tree.h $(TREE_INLINE_H) tree-iterator.h \
- $(BASIC_BLOCK_H) $(TREE_FLOW_H) $(OBSTACK_H) pointer-set.h \
+ $(BASIC_BLOCK_H) $(TREE_SSA_H) $(OBSTACK_H) pointer-set.h \
$(TREE_PASS_H) $(LANGHOOKS_DEF_H) $(DIAGNOSTIC_H) $(CGRAPH_H) \
$(EXCEPT_H) debug.h intl.h tree-diagnostic.h $(TREE_PRETTY_PRINT_H) \
- $(COMMON_TARGET_H)
+ $(COMMON_TARGET_H) wide-int.h
tree-dump.o: tree-dump.c $(CONFIG_H) $(SYSTEM_H) $(TM_H) $(TREE_H) \
- langhooks.h $(TREE_DUMP_H) tree-iterator.h $(TREE_PRETTY_PRINT_H)
+ langhooks.h $(TREE_DUMP_H) tree-iterator.h $(TREE_PRETTY_PRINT_H) \
+ wide-int.h wide-int-print.h
tree-inline.o : tree-inline.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) $(RTL_H) $(FLAGS_H) $(PARAMS_H) $(INPUT_H) insn-config.h \
$(HASHTAB_H) langhooks.h $(TREE_INLINE_H) $(CGRAPH_H) \
$(TREE_PRETTY_PRINT_H)
print-tree.o : print-tree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
$(TM_H) $(TREE_H) $(GGC_H) langhooks.h tree-iterator.h \
- $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(GIMPLE_PRETTY_PRINT_H) $(TREE_DUMP_H) \
- $(DIAGNOSTIC_H) $(TREE_SSA_H) $(GIMPLE_PRETTY_PRINT_H) $(TREE_DUMP_H)
++ $(DIAGNOSTIC_H) $(TREE_SSA_H) $(GIMPLE_PRETTY_PRINT_H) $(TREE_DUMP_H) \
+ wide-int-print.h
stor-layout.o : stor-layout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) $(PARAMS_H) $(FLAGS_H) $(FUNCTION_H) $(EXPR_H) $(RTL_H) \
$(GGC_H) $(TM_P_H) $(TARGET_H) langhooks.h $(REGS_H) gt-stor-layout.h \
gimple-ssa-strength-reduction.o : gimple-ssa-strength-reduction.c $(CONFIG_H) \
$(SYSTEM_H) coretypes.h $(TREE_H) $(GIMPLE_H) $(BASIC_BLOCK_H) \
$(HASH_TABLE_H) $(TREE_PASS_H) $(CFGLOOP_H) $(TREE_PRETTY_PRINT_H) \
- $(GIMPLE_PRETTY_PRINT_H) alloc-pool.h $(TREE_FLOW_H) domwalk.h \
+ $(GIMPLE_PRETTY_PRINT_H) alloc-pool.h $(TREE_SSA_H) domwalk.h \
- pointer-set.h expmed.h
+ pointer-set.h expmed.h wide-int-print.h
tree-vrp.o : tree-vrp.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
- $(TREE_FLOW_H) $(TREE_PASS_H) $(DIAGNOSTIC_CORE_H) $(GGC_H) \
+ $(TREE_SSA_H) $(TREE_PASS_H) $(DIAGNOSTIC_CORE_H) $(GGC_H) \
$(BASIC_BLOCK_H) tree-ssa-propagate.h $(FLAGS_H) $(TREE_DUMP_H) \
$(CFGLOOP_H) $(SCEV_H) intl.h \
$(GIMPLE_PRETTY_PRINT_H) gimple-fold.h $(OPTABS_H) $(EXPR_H)
$(TREE_H) $(TM_P_H) $(GGC_H) $(FLAGS_H) $(TARGET_H) \
$(DIAGNOSTIC_CORE_H) $(FUNCTION_H) $(TM_H) coretypes.h \
$(TREE_DUMP_H) $(EXCEPT_H) $(CFGLOOP_H) $(TREE_PASS_H) \
- $(BASIC_BLOCK_H) \
+ $(BASIC_BLOCK_H) wide-int.h wide-int-print.h \
value-prof.h tree-ssa-propagate.h $(TREE_INLINE_H) $(GIMPLE_PRETTY_PRINT_H)
- tree-cfgcleanup.o : tree-cfgcleanup.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
+ tree-cfgcleanup.o : tree-cfgcleanup.c $(TREE_SSA_H) $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(TM_P_H) $(GGC_H) $(FLAGS_H) \
$(DIAGNOSTIC_CORE_H) $(FUNCTION_H) $(TM_H) coretypes.h \
$(EXCEPT_H) langhooks.h $(CFGLOOP_H) $(TREE_PASS_H) \
$(DIAGNOSTIC_H) $(TM_H) coretypes.h $(DUMPFILE_H) \
$(FLAGS_H) $(TREE_INLINE_H) $(RECOG_H) insn-config.h \
$(EXPR_H) gt-tree-ssa-address.h $(GGC_H) tree-affine.h $(TARGET_H) \
- $(TREE_PRETTY_PRINT_H) expmed.h
+ $(TREE_PRETTY_PRINT_H) expmed.h wide-int-print.h
- tree-ssa-loop-niter.o : tree-ssa-loop-niter.c $(TREE_FLOW_H) $(CONFIG_H) \
+ tree-ssa-loop-niter.o : tree-ssa-loop-niter.c $(TREE_SSA_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) $(PARAMS_H) \
$(TREE_INLINE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(DUMPFILE_H) \
$(DIAGNOSTIC_CORE_H) $(FLAGS_H) $(TREE_DATA_REF_H) \
- $(BASIC_BLOCK_H) $(GGC_H) intl.h $(GIMPLE_PRETTY_PRINT_H) $(TREE_PASS_H)
+ $(BASIC_BLOCK_H) $(GGC_H) intl.h $(GIMPLE_PRETTY_PRINT_H) $(TREE_PASS_H) \
+ wide-int-print.h
- tree-ssa-loop-ivcanon.o : tree-ssa-loop-ivcanon.c $(TREE_FLOW_H) $(CONFIG_H) \
+ tree-ssa-loop-ivcanon.o : tree-ssa-loop-ivcanon.c $(TREE_SSA_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) $(PARAMS_H) \
$(TREE_INLINE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h \
$(FLAGS_H) $(TREE_PASS_H) $(SCEV_H) $(BASIC_BLOCK_H) $(TARGET_H) \
$(DIAGNOSTIC_CORE_H) langhooks.h $(TREE_INLINE_H) $(TREE_DATA_REF_H) \
$(OPTABS_H) $(TREE_PRETTY_PRINT_H)
tree-predcom.o: tree-predcom.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(TM_P_H) \
- $(CFGLOOP_H) $(TREE_FLOW_H) $(GGC_H) $(TREE_DATA_REF_H) \
+ $(CFGLOOP_H) $(TREE_SSA_H) $(GGC_H) $(TREE_DATA_REF_H) \
$(PARAMS_H) $(DIAGNOSTIC_H) $(TREE_PASS_H) $(TM_H) coretypes.h \
- tree-affine.h $(TREE_INLINE_H) $(TREE_PRETTY_PRINT_H)
+ tree-affine.h $(TREE_INLINE_H) $(TREE_PRETTY_PRINT_H) wide-int-print.h
- tree-ssa-loop-ivopts.o : tree-ssa-loop-ivopts.c $(TREE_FLOW_H) $(CONFIG_H) \
+ tree-ssa-loop-ivopts.o : tree-ssa-loop-ivopts.c $(TREE_SSA_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) $(EXPR_H) \
$(DIAGNOSTIC_H) $(TM_H) coretypes.h \
$(TREE_PASS_H) $(GGC_H) $(RECOG_H) insn-config.h $(HASH_TABLE_H) $(SCEV_H) \
tree-affine.o : tree-affine.c tree-affine.h $(CONFIG_H) pointer-set.h \
$(SYSTEM_H) $(TREE_H) $(GIMPLE_H) \
coretypes.h $(DUMPFILE_H) $(FLAGS_H) \
- $(TREE_PRETTY_PRINT_H)
+ $(TREE_PRETTY_PRINT_H) wide-int-print.h wide-int.h
- tree-ssa-loop-manip.o : tree-ssa-loop-manip.c $(TREE_FLOW_H) $(CONFIG_H) \
+ tree-ssa-loop-manip.o : tree-ssa-loop-manip.c $(TREE_SSA_H) $(CONFIG_H) \
$(SYSTEM_H) coretypes.h $(DUMPFILE_H) $(TM_H) $(TREE_H) \
- $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) \
+ $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) $(TREE_SSA_H) \
$(CFGLOOP_H) $(TREE_PASS_H) \
$(SCEV_H) $(PARAMS_H) $(TREE_INLINE_H) langhooks.h
- tree-ssa-loop-im.o : tree-ssa-loop-im.c $(TREE_FLOW_H) $(CONFIG_H) \
+ tree-ssa-loop-im.o : tree-ssa-loop-im.c $(TREE_SSA_H) $(CONFIG_H) \
$(SYSTEM_H) $(HASH_TABLE_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) domwalk.h \
$(PARAMS_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h \
$(TREE_PASS_H) $(FLAGS_H) $(BASIC_BLOCK_H) \
output.h langhooks.h tree-mudflap.h $(TM_H) coretypes.h \
$(GGC_H) gt-tree-mudflap.h $(TREE_PASS_H) $(DIAGNOSTIC_CORE_H)
tree-pretty-print.o : tree-pretty-print.c $(CONFIG_H) $(SYSTEM_H) \
- $(TREE_H) $(DIAGNOSTIC_H) $(HASHTAB_H) $(TREE_FLOW_H) \
+ $(TREE_H) $(DIAGNOSTIC_H) $(HASHTAB_H) $(TREE_SSA_H) \
$(TM_H) coretypes.h $(DUMPFILE_H) tree-iterator.h $(SCEV_H) langhooks.h \
- value-prof.h output.h $(TREE_PRETTY_PRINT_H)
+ value-prof.h output.h $(TREE_PRETTY_PRINT_H) wide-int-print.h
tree-diagnostic.o : tree-diagnostic.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(DUMPFILE_H) \
$(TREE_H) $(DIAGNOSTIC_H) tree-diagnostic.h langhooks.h $(LANGHOOKS_DEF_H) \
$(EXPR_H) $(TM_H) $(RTL_H) $(TM_P_H) $(FUNCTION_H) output.h $(DIAGNOSTIC_CORE_H) \
$(MACHMODE_H) $(TARGET_DEF_H) $(TARGET_H) $(GGC_H) gt-targhooks.h \
$(OPTABS_H) $(RECOG_H) $(REGS_H) reload.h hard-reg-set.h intl.h $(OPTS_H) \
- tree-ssa-alias.h $(TREE_FLOW_H)
+ tree-ssa-alias.h $(TREE_SSA_H)
common/common-targhooks.o : common/common-targhooks.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(INPUT_H) $(TM_H) $(COMMON_TARGET_H) common/common-targhooks.h
+wide-int.o: wide-int.cc $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) wide-int.h
+wide-int-print.o: wide-int-print.cc wide-int-print.h wide-int.h
bversion.h: s-bversion; @true
s-bversion: BASE-VER
$(BASIC_BLOCK_H) $(TREE_PASS_H) langhooks.h $(PARAMS_H) \
tree-ssa-propagate.h value-prof.h $(FLAGS_H) $(TARGET_H) \
$(DIAGNOSTIC_CORE_H) $(HASH_TABLE_H) \
- $(DBGCNT_H) $(GIMPLE_PRETTY_PRINT_H) gimple-fold.h
+ $(DBGCNT_H) $(GIMPLE_PRETTY_PRINT_H) gimple-fold.h wide-int-print.h
tree-ssa-strlen.o : tree-ssa-strlen.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
- $(TREE_FLOW_H) $(TREE_PASS_H) domwalk.h alloc-pool.h tree-ssa-propagate.h \
+ $(TREE_SSA_H) $(TREE_PASS_H) domwalk.h alloc-pool.h tree-ssa-propagate.h \
$(GIMPLE_PRETTY_PRINT_H) $(PARAMS_H) $(EXPR_H) $(HASH_TABLE_H)
tree-sra.o : tree-sra.c $(CONFIG_H) $(SYSTEM_H) coretypes.h alloc-pool.h \
- $(HASH_TABLE_H) $(TM_H) $(TREE_H) $(GIMPLE_H) $(CGRAPH_H) $(TREE_FLOW_H) \
+ $(HASH_TABLE_H) $(TM_H) $(TREE_H) $(GIMPLE_H) $(CGRAPH_H) $(TREE_SSA_H) \
$(IPA_PROP_H) $(DIAGNOSTIC_H) statistics.h \
$(PARAMS_H) $(TARGET_H) $(FLAGS_H) \
- $(DBGCNT_H) $(TREE_INLINE_H) $(GIMPLE_PRETTY_PRINT_H)
+ $(DBGCNT_H) $(TREE_INLINE_H) $(GIMPLE_PRETTY_PRINT_H) ipa-utils.h
tree-switch-conversion.o : tree-switch-conversion.c $(CONFIG_H) $(SYSTEM_H) \
- $(TREE_H) $(TM_P_H) $(TREE_FLOW_H) $(DIAGNOSTIC_H) $(TREE_INLINE_H) \
+ $(TREE_H) $(TM_P_H) $(TREE_SSA_H) $(DIAGNOSTIC_H) $(TREE_INLINE_H) \
$(TM_H) coretypes.h $(GIMPLE_H) $(CFGLOOP_H) \
$(TREE_PASS_H) $(FLAGS_H) $(EXPR_H) $(BASIC_BLOCK_H) \
$(GGC_H) $(OBSTACK_H) $(PARAMS_H) $(CPPLIB_H) $(PARAMS_H) \
$(EXCEPT_H) debug.h xcoffout.h toplev.h $(DIAGNOSTIC_CORE_H) reload.h $(DWARF2OUT_H) \
$(TREE_PASS_H) $(BASIC_BLOCK_H) $(TM_P_H) $(TARGET_H) $(EXPR_H) \
dbxout.h $(CGRAPH_H) $(COVERAGE_H) \
- $(DF_H) $(GGC_H) $(CFGLOOP_H) $(PARAMS_H) $(TREE_FLOW_H) \
+ $(DF_H) $(GGC_H) $(CFGLOOP_H) $(PARAMS_H) $(TREE_SSA_H) \
- $(TARGET_DEF_H) $(TREE_PRETTY_PRINT_H)
+ $(TARGET_DEF_H) $(TREE_PRETTY_PRINT_H) wide-int-print.h
recog.o : recog.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_ERROR_H) \
$(FUNCTION_H) $(BASIC_BLOCK_H) $(REGS_H) $(RECOG_H) $(EXPR_H) \
$(FLAGS_H) insn-config.h $(INSN_ATTR_H) reload.h \
static rtx extract_fixed_bit_field (enum machine_mode, rtx,
unsigned HOST_WIDE_INT,
unsigned HOST_WIDE_INT, rtx, int, bool);
- static rtx lshift_value (enum machine_mode, rtx, int, int);
-static rtx mask_rtx (enum machine_mode, int, int, int);
+ static rtx lshift_value (enum machine_mode, unsigned HOST_WIDE_INT, int);
static rtx extract_split_bit_field (rtx, unsigned HOST_WIDE_INT,
unsigned HOST_WIDE_INT, int);
static void do_cmp_and_jump (rtx, rtx, enum rtx_code, enum machine_mode, rtx);
return expand_shift (RSHIFT_EXPR, mode, op0,
GET_MODE_BITSIZE (mode) - bitsize, target, 0);
}
- /* Return a constant integer rtx with the value VALUE truncated to
- BITSIZE bits and then shifted left BITPOS bits. */
-\f
-/* Return a constant integer (CONST_INT or CONST_DOUBLE) mask value
- of mode MODE with BITSIZE ones followed by BITPOS zeros, or the
- complement of that if COMPLEMENT. The mask is truncated if
- necessary to the width of mode MODE. The mask is zero-extended if
- BITSIZE+BITPOS is too small for MODE. */
-
-static rtx
-mask_rtx (enum machine_mode mode, int bitpos, int bitsize, int complement)
-{
- double_int mask;
-
- mask = double_int::mask (bitsize);
- mask = mask.llshift (bitpos, HOST_BITS_PER_DOUBLE_INT);
-
- if (complement)
- mask = ~mask;
-
- return immed_double_int_const (mask, mode);
-}
+
+ /* Return a constant integer (CONST_INT or CONST_DOUBLE) rtx with the value
+ VALUE << BITPOS. */
static rtx
- lshift_value (enum machine_mode mode, rtx value, int bitpos, int bitsize)
+ lshift_value (enum machine_mode mode, unsigned HOST_WIDE_INT value,
+ int bitpos)
{
- double_int val;
-
- val = double_int::from_uhwi (value);
- val = val.llshift (bitpos, HOST_BITS_PER_DOUBLE_INT);
-
- return immed_double_int_const (val, mode);
+ return
- immed_wide_int_const (wi::lshift (wi::zext (std::make_pair (value, mode),
- bitsize), bitpos), mode);
++ immed_wide_int_const (wi::lshift (max_wide_int (value),
++ bitpos), mode);
}
\f
/* Extract a bit field that is split across two words
&& TREE_CODE (arg1) == INTEGER_CST
&& TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST)
{
- double_int c1, c2, c3, msk;
+ wide_int c1, c2, c3, msk;
int width = TYPE_PRECISION (type), w;
-
- c1 = tree_to_double_int (TREE_OPERAND (arg0, 1));
- c2 = tree_to_double_int (arg1);
+ bool try_simplify = true;
+ c1 = TREE_OPERAND (arg0, 1);
+ c2 = arg1;
/* If (C1&C2) == C1, then (X&C1)|C2 becomes (X,C2). */
if ((c1 & c2) == c1)
&& TREE_CODE (arg0) == MULT_EXPR
&& TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST)
{
++<<<<<<< .working
+ int arg1tz = wi::ctz (TREE_OPERAND (arg0, 1));
+ if (arg1tz > 0)
+ {
+ wide_int arg1mask, masked;
+ arg1mask = wi::mask (arg1tz, true, TYPE_PRECISION (type));
+ masked = arg1mask & arg1;
+ if (masked == 0)
+ return omit_two_operands_loc (loc, type, build_zero_cst (type),
+ arg0, arg1);
+ else if (masked != arg1)
+ return fold_build2_loc (loc, code, type, op0,
+ wide_int_to_tree (type, masked));
+ }
++=======
+ double_int masked
+ = mask_with_tz (type, tree_to_double_int (arg1),
+ tree_to_double_int (TREE_OPERAND (arg0, 1)));
+
+ if (masked.is_zero ())
+ return omit_two_operands_loc (loc, type, build_zero_cst (type),
+ arg0, arg1);
+ else if (masked != tree_to_double_int (arg1))
+ return fold_build2_loc (loc, code, type, op0,
+ double_int_to_tree (type, masked));
++>>>>>>> .merge-right.r202797
}
/* For constants M and N, if M == (1LL << cst) - 1 && (N & M) == M,
static const char *const ifiles[] = {
"config.h", "system.h", "coretypes.h", "tm.h",
"hashtab.h", "splay-tree.h", "obstack.h", "bitmap.h", "input.h",
- "tree.h", "rtl.h", "function.h", "insn-config.h", "expr.h",
+ "tree.h", "rtl.h", "wide-int.h", "function.h", "insn-config.h", "expr.h",
"hard-reg-set.h", "basic-block.h", "cselib.h", "insn-addr.h",
"optabs.h", "libfuncs.h", "debug.h", "ggc.h", "cgraph.h",
- "tree-flow.h", "reload.h", "cpp-id-data.h", "tree-chrec.h",
+ "tree-ssa.h", "reload.h", "cpp-id-data.h", "tree-chrec.h",
"except.h", "output.h", "gimple.h", "cfgloop.h",
"target.h", "ipa-prop.h", "lto-streamer.h", "target-globals.h",
"ipa-inline.h", "dwarf2out.h", NULL
return NULL_TREE;
}
gcc_checking_assert (TREE_CODE (TREE_TYPE (v)) == ARRAY_TYPE);
- size = tree_low_cst (TYPE_SIZE (TREE_TYPE (TREE_TYPE (v))), 1);
+ size = tree_to_uhwi (TYPE_SIZE (TREE_TYPE (TREE_TYPE (v))));
offset += token * size;
fn = fold_ctor_reference (TREE_TYPE (TREE_TYPE (v)), init,
- offset, size, vtable);
+ offset, size, v);
if (!fn || integer_zerop (fn))
return NULL_TREE;
gcc_assert (TREE_CODE (fn) == ADDR_EXPR
*PBASE: T1
*POFFSET: MULT_EXPR (T2, C3)
- *PINDEX: C1 + (C2 * C3) + C4 */
+ *PINDEX: C1 + (C2 * C3) + C4
+
+ When T2 is recorded by a CAND_ADD in the form of (T2' + C5), it
+ will be further restructured to:
+
+ *PBASE: T1
+ *POFFSET: MULT_EXPR (T2', C3)
+ *PINDEX: C1 + (C2 * C3) + C4 + (C5 * C3) */
static bool
-restructure_reference (tree *pbase, tree *poffset, double_int *pindex,
+restructure_reference (tree *pbase, tree *poffset, max_wide_int *pindex,
tree *ptype)
{
tree base = *pbase, offset = *poffset;
- double_int index = *pindex;
- double_int bpu = double_int::from_uhwi (BITS_PER_UNIT);
- tree mult_op0, mult_op1, t1, t2, type;
- double_int c1, c2, c3, c4, c5;
+ max_wide_int index = *pindex;
+ tree mult_op0, t1, t2, type;
- max_wide_int c1, c2, c3, c4;
++ max_wide_int c1, c2, c3, c4, c5;
if (!base
|| !offset
else
{
t2 = mult_op0;
- c2 = double_int_zero;
+ c2 = 0;
}
- c4 = index.udiv (bpu, FLOOR_DIV_EXPR);
+ c4 = wi::udiv_floor (index, BITS_PER_UNIT);
+ c5 = backtrace_base_for_ref (&t2);
*pbase = t1;
- *poffset = fold_build2 (MULT_EXPR, sizetype, t2,
+ *poffset = fold_build2 (MULT_EXPR, sizetype, fold_convert (sizetype, t2),
- double_int_to_tree (sizetype, c3));
+ wide_int_to_tree (sizetype, c3));
- *pindex = c1 + c2 * c3 + c4;
+ *pindex = c1 + c2 * c3 + c4 + c5 * c3;
*ptype = type;
return true;
gcc_assert (!desc->const_iter);
desc->niter_expr =
simplify_gen_binary (UDIV, desc->mode, old_niter,
- GEN_INT (max_unroll + 1));
+ gen_int_mode (max_unroll + 1, desc->mode));
loop->nb_iterations_upper_bound
- = loop->nb_iterations_upper_bound.udiv (double_int::from_uhwi (max_unroll
- + 1),
- TRUNC_DIV_EXPR);
+ = wi::udiv_trunc (loop->nb_iterations_upper_bound, max_unroll + 1);
if (loop->any_estimate)
loop->nb_iterations_estimate
- = loop->nb_iterations_estimate.udiv (double_int::from_uhwi (max_unroll
- + 1),
- TRUNC_DIV_EXPR);
+ = wi::udiv_trunc (loop->nb_iterations_estimate, max_unroll + 1);
if (exit_at_end)
{
desc->niter_expr =
#include "tree-iterator.h"
#include "diagnostic.h"
#include "gimple-pretty-print.h" /* FIXME */
- #include "tree-flow.h"
+ #include "tree-ssa.h"
#include "tree-dump.h"
#include "dumpfile.h"
+#include "wide-int-print.h"
/* Define the hash table of nodes already seen.
Such nodes are not repeated; brief cross-references are used. */
dump_printf_loc (MSG_NOTE, vect_location,
"Symbolic number of iterations is ");
dump_generic_expr (MSG_NOTE, TDF_DETAILS, number_of_iterations);
+ dump_printf (MSG_NOTE, "\n");
}
}
- else if (TREE_INT_CST_LOW (number_of_iterations) == 0)
+ else if (tree_to_hwi (number_of_iterations) == 0)
{
if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
if (dump_enabled_p ())
dump_printf_loc (MSG_NOTE, vect_location,
- "Reduce using scalar code. ");
+ "Reduce using scalar code.\n");
- vec_size_in_bits = tree_low_cst (TYPE_SIZE (vectype), 1);
+ vec_size_in_bits = tree_to_uhwi (TYPE_SIZE (vectype));
FOR_EACH_VEC_ELT (new_phis, i, new_phi)
{
if (gimple_code (new_phi) == GIMPLE_PHI)