This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][3/n] Always 64bit-HWI cleanups (drop HOST_WIDEST_INT)
- From: Richard Biener <rguenther at suse dot de>
- To: Jeff Law <law at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 26 May 2014 12:38:11 +0200 (CEST)
- Subject: Re: [PATCH][3/n] Always 64bit-HWI cleanups (drop HOST_WIDEST_INT)
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LSU dot 2 dot 11 dot 1405231544480 dot 2632 at zhemvz dot fhfr dot qr> <537F8B91 dot 1000905 at redhat dot com>
On Fri, 23 May 2014, Jeff Law wrote:
> On 05/23/14 07:49, Richard Biener wrote:
> >
> > This patch does the exercise of a "grand" rename and drops
> > HOST_WIDEST_INT which is equal to HOST_WIDE_INT now. But
> > we use [u]int64_t and the C99 inttypes.h PRI[dux]64 printf
> > modifiers (which I provide in hwint.h if they are not available).
> >
> > Certainly most of the HOST_WIDEST_INT was to get reliable 64bit
> > counters for debug counting and printing.
> >
> > Bootstrap and regtest ongoing on x86_64-unknown-linux-gnu, ok?
> >
> > Will do a mmix cross-cc1 as well, just to make sure I didn't mess
> > up anything there.
> >
> > Thanks,
> > Richard.
> >
> > 2014-05-23 Richard Biener <rguenther@suse.de>
> >
> > * system.h: Define __STDC_FORMAT_MACROS before
> > including inttypes.h.
> > * hwint.h (HOST_WIDEST_INT, HOST_BITS_PER_WIDEST_INT,
> > HOST_WIDEST_INT_PRINT, HOST_WIDEST_INT_PRINT_DEC,
> > HOST_WIDEST_INT_PRINT_DEC_C, HOST_WIDEST_INT_PRINT_UNSIGNED,
> > HOST_WIDEST_INT_PRINT_HEX, HOST_WIDEST_INT_PRINT_DOUBLE_HEX,
> > HOST_WIDEST_INT_C): Remove.
> > (PRId64, PRIi64, PRIo64, PRIu64, PRIx64, PRIX64): Define
> > if C99 inttypes.h is not available.
> >
> > * coretypes.h (gcov_type, gcov_type_unsigned): Use [u]int64_t.
> > * gcov-io.h (gcov_type, gcov_type_unsigned): Likewise.
> > * cfgloop.h (struct niter_desc): Use uint64_t for niter field.
> > * bitmap.c (struct bitmap_descriptor_d): Use uint64_t for counters.
> > (struct output_info): Likewise.
> > (print_statistics): Adjust.
> > (dump_bitmap_statistics): Likewise.
> > * bt-load.c (migrate_btr_defs): Print with PRId64.
> > * cfg.c (dump_edge_info, dump_bb_info): Likewise.
> > (MAX_SAFE_MULTIPLIER): Adjust.
> > * cfghooks.c (dump_bb_for_graph): Print with PRId64.
> > * cgraph.c (cgraph_redirect_edge_call_stmt_to_callee,
> > dump_cgraph_node): Likewise.
> > * final.c (dump_basic_block_info): Likewise.
> > * gcov-dump.c (tag_counters, tag_summary, dump_working_sets):
> > Likewise.
> > * gcov.c (format_gcov): Likewise.
> > * ipa-cp.c (good_cloning_opportunity_p): Likewise. Use int64_t
> > for calculation.
> > (get_clone_agg_value): Use HOST_WIDE_INT for offset.
> > * ipa-inline.c (compute_max_insns): Use int64_t for calcuation.
> > (inline_small_functions, dump_overall_stats, dump_inline_stats):
> > Use PRId64 for dumping.
> > * ipa-profile.c (dump_histogram, ipa_profile): Likewise.
> > * ira-color.c (struct allocno_hard_regs): Use int64_t for cost.
> > (add_allocno_hard_regs): Adjust.
> > * loop-doloop.c (doloop_modify): Print using PRId64.
> > * loop-iv.c (inverse): Compute in uint64_t.
> > (determine_max_iter, iv_number_of_iterations): Likewise.
> > * loop-unroll.c (decide_peel_completely, decide_peel_simple):
> > Print using PRId64.
> > * lto-streamer-out.c (write_symbol): Use uint64_t.
> > * mcf.c (CAP_INFINITY): Use int64_t maximum.
> > (dump_fixup_edge, create_fixup_graph, cancel_negative_cycle,
> > find_max_flow, adjust_cfg_counts): Use int64_t and dump with PRId64.
> > * modulo-sched.c (const_iteration_count): Use int64_t.
> > (sms_schedule): Dump using PRId64.
> > * predict.c (dump_prediction): Likewise.
> > * pretty-print.h (pp_widest_integer): Remove.
> > * profile.c (get_working_sets, is_edge_inconsistent,
> > is_inconsistent, read_profile_edge_counts): Dump using PRId64.
> > * tree-pretty-print.c (pp_double_int): Remove case handling
> > HOST_BITS_PER_DOUBLE_INT == HOST_BITS_PER_WIDEST_INT.
> > * tree-ssa-math-opts.c (struct symbolic_number): Use uint64_t
> > and adjust users.
> > (pass_optimize_bswap::execute): Remove restriction on hosts.
> > * tree-streamer-in.c (streamer_alloc_tree): Use HOST_WIDE_INT.
> > * tree-streamer-out.c (streamer_write_tree_header): Likewise.
> > * tree.c (widest_int_cst_value): Remove.
> > * tree.h (widest_int_cst_value): Likewise.
> > * value-prof.c (dump_histogram_value): Print using PRId64.
> > * gengtype.c (main): Also inject int64_t.
> > * ggc-page.c (struct max_alignment): Use int64_t.
> > * alloc-pool.c (struct allocation_object_def): Likewise.
> > * ira-conflicts.c (build_conflict_bit_table): Use uint64_t
> > for computation.
> > * doc/tm.texi.in: Remove reference to HOST_WIDEST_INT.
> > * doc/tm.texi: Regenerated.
> > * gengtype-lex.l (IWORD): Handle [u]int64_t.
> > * config/sh/sh.c (expand_cbranchdi4): Use gcov_type.
> > * config/mmix/mmix-protos.h (mmix_intval, mmix_shiftable_wyde_value,
> > mmix_output_register_setting): Use [u]int64_t in prototypes.
> > * config/mmix/mmix.c (mmix_print_operand,
> > mmix_output_register_setting,
> > mmix_shiftable_wyde_value, mmix_output_shiftvalue_op_from_str,
> > mmix_output_octa, mmix_output_shifted_value): Adjust.
> > (mmix_intval): Adjust. Remove unreachable case.
> >
> > lto/
> > * lto.c (lto_parse_hex): Use int64_t.
> > (lto_resolution_read): Likewise.
> Given the highly mechanical nature of this patch, I just spot checked a few
> things. It looks good to me.
Yeah, the following is what I applied after re-testing and fixing
the few minor errors in the patch.
Bootstrapped and tested on x86_64-unknown-linux-gnu.
Richard.
2014-05-23 Richard Biener <rguenther@suse.de>
* system.h: Define __STDC_FORMAT_MACROS before
including inttypes.h.
* hwint.h (HOST_WIDEST_INT, HOST_BITS_PER_WIDEST_INT,
HOST_WIDEST_INT_PRINT, HOST_WIDEST_INT_PRINT_DEC,
HOST_WIDEST_INT_PRINT_DEC_C, HOST_WIDEST_INT_PRINT_UNSIGNED,
HOST_WIDEST_INT_PRINT_HEX, HOST_WIDEST_INT_PRINT_DOUBLE_HEX,
HOST_WIDEST_INT_C): Remove.
(PRId64, PRIi64, PRIo64, PRIu64, PRIx64, PRIX64): Define
if C99 inttypes.h is not available.
* coretypes.h (gcov_type, gcov_type_unsigned): Use [u]int64_t.
* gcov-io.h (gcov_type, gcov_type_unsigned): Likewise.
* gcov-io.c (gcov_histo_index): Drop non-64bit hwi case.
* cfgloop.h (struct niter_desc): Use uint64_t for niter field.
* bitmap.c (struct bitmap_descriptor_d): Use uint64_t for counters.
(struct output_info): Likewise.
(print_statistics): Adjust.
(dump_bitmap_statistics): Likewise.
* bt-load.c (migrate_btr_defs): Print with PRId64.
* cfg.c (dump_edge_info, dump_bb_info): Likewise.
(MAX_SAFE_MULTIPLIER): Adjust.
* cfghooks.c (dump_bb_for_graph): Print with PRId64.
* cgraph.c (cgraph_redirect_edge_call_stmt_to_callee,
dump_cgraph_node): Likewise.
* final.c (dump_basic_block_info): Likewise.
* gcov-dump.c (tag_counters, tag_summary, dump_working_sets): Likewise.
* gcov.c (format_gcov): Likewise.
* ipa-cp.c (good_cloning_opportunity_p): Likewise. Use int64_t
for calculation.
(get_clone_agg_value): Use HOST_WIDE_INT for offset.
* ipa-inline.c (compute_max_insns): Use int64_t for calcuation.
(inline_small_functions, dump_overall_stats, dump_inline_stats):
Use PRId64 for dumping.
* ipa-profile.c (dump_histogram, ipa_profile): Likewise.
* ira-color.c (struct allocno_hard_regs): Use int64_t for cost.
(add_allocno_hard_regs): Adjust.
* loop-doloop.c (doloop_modify): Print using PRId64.
* loop-iv.c (inverse): Compute in uint64_t.
(determine_max_iter, iv_number_of_iterations): Likewise.
* loop-unroll.c (decide_peel_completely, decide_peel_simple):
Print using PRId64.
* lto-streamer-out.c (write_symbol): Use uint64_t.
* mcf.c (CAP_INFINITY): Use int64_t maximum.
(dump_fixup_edge, create_fixup_graph, cancel_negative_cycle,
find_max_flow, adjust_cfg_counts): Use int64_t and dump with PRId64.
* modulo-sched.c (const_iteration_count): Use int64_t.
(sms_schedule): Dump using PRId64.
* predict.c (dump_prediction): Likewise.
* pretty-print.h (pp_widest_integer): Remove.
* profile.c (get_working_sets, is_edge_inconsistent,
is_inconsistent, read_profile_edge_counts): Dump using PRId64.
* tree-pretty-print.c (pp_double_int): Remove case handling
HOST_BITS_PER_DOUBLE_INT == HOST_BITS_PER_WIDEST_INT.
* tree-ssa-math-opts.c (struct symbolic_number): Use uint64_t
and adjust users.
(pass_optimize_bswap::execute): Remove restriction on hosts.
* tree-streamer-in.c (streamer_alloc_tree): Use HOST_WIDE_INT.
* tree-streamer-out.c (streamer_write_tree_header): Likewise.
* tree.c (widest_int_cst_value): Remove.
* tree.h (widest_int_cst_value): Likewise.
* value-prof.c (dump_histogram_value): Print using PRId64.
* gengtype.c (main): Also inject int64_t.
* ggc-page.c (struct max_alignment): Use int64_t.
* alloc-pool.c (struct allocation_object_def): Likewise.
* ira-conflicts.c (build_conflict_bit_table): Use uint64_t
for computation.
* doc/tm.texi.in: Remove reference to HOST_WIDEST_INT.
* doc/tm.texi: Regenerated.
* gengtype-lex.l (IWORD): Handle [u]int64_t.
* config/sh/sh.c (expand_cbranchdi4): Use gcov_type.
* config/mmix/mmix-protos.h (mmix_intval, mmix_shiftable_wyde_value,
mmix_output_register_setting): Use [u]int64_t in prototypes.
* config/mmix/mmix.c (mmix_print_operand, mmix_output_register_setting,
mmix_shiftable_wyde_value, mmix_output_shiftvalue_op_from_str,
mmix_output_octa, mmix_output_shifted_value): Adjust.
(mmix_intval): Adjust. Remove unreachable case.
* config/mmix/mmix.md (*nonlocal_goto_receiver_expanded): Use
int64_t.
lto/
* lto.c (lto_parse_hex): Use int64_t.
(lto_resolution_read): Likewise.
Index: gcc/coretypes.h
===================================================================
*** gcc/coretypes.h.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/coretypes.h 2014-05-26 10:25:29.278438234 +0200
*************** see the files COPYING3 and COPYING.RUNTI
*** 43,50 ****
#ifndef USED_FOR_TARGET
! typedef HOST_WIDEST_INT gcov_type;
! typedef unsigned HOST_WIDEST_INT gcov_type_unsigned;
struct bitmap_head;
typedef struct bitmap_head *bitmap;
--- 43,50 ----
#ifndef USED_FOR_TARGET
! typedef int64_t gcov_type;
! typedef uint64_t gcov_type_unsigned;
struct bitmap_head;
typedef struct bitmap_head *bitmap;
Index: gcc/cfgloop.h
===================================================================
*** gcc/cfgloop.h.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/cfgloop.h 2014-05-26 10:25:29.279438234 +0200
*************** struct GTY(()) niter_desc
*** 400,406 ****
bool const_iter;
/* Number of iterations if constant. */
! unsigned HOST_WIDEST_INT niter;
/* Assumptions under that the rest of the information is valid. */
rtx assumptions;
--- 400,406 ----
bool const_iter;
/* Number of iterations if constant. */
! uint64_t niter;
/* Assumptions under that the rest of the information is valid. */
rtx assumptions;
Index: gcc/bitmap.c
===================================================================
*** gcc/bitmap.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/bitmap.c 2014-05-26 10:25:29.280438234 +0200
*************** struct bitmap_descriptor_d
*** 34,44 ****
const char *file;
int line;
int created;
! unsigned HOST_WIDEST_INT allocated;
! unsigned HOST_WIDEST_INT peak;
! unsigned HOST_WIDEST_INT current;
! unsigned HOST_WIDEST_INT nsearches;
! unsigned HOST_WIDEST_INT search_iter;
};
typedef struct bitmap_descriptor_d *bitmap_descriptor;
--- 34,44 ----
const char *file;
int line;
int created;
! uint64_t allocated;
! uint64_t peak;
! uint64_t current;
! uint64_t nsearches;
! uint64_t search_iter;
};
typedef struct bitmap_descriptor_d *bitmap_descriptor;
*************** bitmap_print (FILE *file, const_bitmap h
*** 2144,2151 ****
/* Used to accumulate statistics about bitmap sizes. */
struct output_info
{
! unsigned HOST_WIDEST_INT size;
! unsigned HOST_WIDEST_INT count;
};
/* Called via hash_table::traverse. Output bitmap descriptor pointed out by
--- 2144,2151 ----
/* Used to accumulate statistics about bitmap sizes. */
struct output_info
{
! uint64_t size;
! uint64_t count;
};
/* Called via hash_table::traverse. Output bitmap descriptor pointed out by
*************** print_statistics (bitmap_descriptor_d **
*** 2165,2174 ****
sprintf (s, "%s:%i (%s)", s1, d->line, d->function);
s[41] = 0;
fprintf (stderr,
! "%-41s %9u"
! " %15"HOST_WIDEST_INT_PRINT"d %15"HOST_WIDEST_INT_PRINT"d"
! " %15"HOST_WIDEST_INT_PRINT"d"
! " %10"HOST_WIDEST_INT_PRINT"d %10"HOST_WIDEST_INT_PRINT"d\n",
s, d->created,
d->allocated, d->peak, d->current,
d->nsearches, d->search_iter);
--- 2165,2172 ----
sprintf (s, "%s:%i (%s)", s1, d->line, d->function);
s[41] = 0;
fprintf (stderr,
! "%-41s %9u %15"PRId64" %15"PRId64" %15"PRId64
! " %10"PRId64" %10"PRId64"\n",
s, d->created,
d->allocated, d->peak, d->current,
d->nsearches, d->search_iter);
*************** dump_bitmap_statistics (void)
*** 2201,2207 ****
bitmap_desc_hash.traverse <output_info *, print_statistics> (&info);
fprintf (stderr, "---------------------------------------------------------------------------------\n");
fprintf (stderr,
! "%-41s %9"HOST_WIDEST_INT_PRINT"d %15"HOST_WIDEST_INT_PRINT"d\n",
"Total", info.count, info.size);
fprintf (stderr, "---------------------------------------------------------------------------------\n");
}
--- 2199,2205 ----
bitmap_desc_hash.traverse <output_info *, print_statistics> (&info);
fprintf (stderr, "---------------------------------------------------------------------------------\n");
fprintf (stderr,
! "%-41s %9"PRId64" %15"PRId64"\n",
"Total", info.count, info.size);
fprintf (stderr, "---------------------------------------------------------------------------------\n");
}
Index: gcc/bt-load.c
===================================================================
*** gcc/bt-load.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/bt-load.c 2014-05-26 10:25:29.281438234 +0200
*************** migrate_btr_defs (enum reg_class btr_cla
*** 1411,1419 ****
{
basic_block bb = BASIC_BLOCK_FOR_FN (cfun, i);
fprintf (dump_file,
! "Basic block %d: count = " HOST_WIDEST_INT_PRINT_DEC
" loop-depth = %d idom = %d\n",
! i, (HOST_WIDEST_INT) bb->count, bb_loop_depth (bb),
get_immediate_dominator (CDI_DOMINATORS, bb)->index);
}
}
--- 1411,1419 ----
{
basic_block bb = BASIC_BLOCK_FOR_FN (cfun, i);
fprintf (dump_file,
! "Basic block %d: count = %" PRId64
" loop-depth = %d idom = %d\n",
! i, (int64_t) bb->count, bb_loop_depth (bb),
get_immediate_dominator (CDI_DOMINATORS, bb)->index);
}
}
Index: gcc/cfg.c
===================================================================
*** gcc/cfg.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/cfg.c 2014-05-26 10:25:29.281438234 +0200
*************** dump_edge_info (FILE *file, edge e, int
*** 486,492 ****
if (e->count && do_details)
{
fputs (" count:", file);
! fprintf (file, HOST_WIDEST_INT_PRINT_DEC, e->count);
}
if (e->flags && do_details)
--- 486,492 ----
if (e->count && do_details)
{
fputs (" count:", file);
! fprintf (file, "%"PRId64, e->count);
}
if (e->flags && do_details)
*************** dump_bb_info (FILE *outf, basic_block bb
*** 734,741 ****
if (flags & TDF_DETAILS)
{
struct function *fun = DECL_STRUCT_FUNCTION (current_function_decl);
! fprintf (outf, ", count " HOST_WIDEST_INT_PRINT_DEC,
! (HOST_WIDEST_INT) bb->count);
fprintf (outf, ", freq %i", bb->frequency);
if (maybe_hot_bb_p (fun, bb))
fputs (", maybe hot", outf);
--- 734,741 ----
if (flags & TDF_DETAILS)
{
struct function *fun = DECL_STRUCT_FUNCTION (current_function_decl);
! fprintf (outf, ", count " "%"PRId64,
! (int64_t) bb->count);
fprintf (outf, ", freq %i", bb->frequency);
if (maybe_hot_bb_p (fun, bb))
fputs (", maybe hot", outf);
*************** scale_bbs_frequencies_int (basic_block *
*** 961,967 ****
/* numbers smaller than this value are safe to multiply without getting
64bit overflow. */
! #define MAX_SAFE_MULTIPLIER (1 << (sizeof (HOST_WIDEST_INT) * 4 - 1))
/* Multiply all frequencies of basic blocks in array BBS of length NBBS
by NUM/DEN, in gcov_type arithmetic. More accurate than previous
--- 961,967 ----
/* numbers smaller than this value are safe to multiply without getting
64bit overflow. */
! #define MAX_SAFE_MULTIPLIER (1 << (sizeof (int64_t) * 4 - 1))
/* Multiply all frequencies of basic blocks in array BBS of length NBBS
by NUM/DEN, in gcov_type arithmetic. More accurate than previous
Index: gcc/cfghooks.c
===================================================================
*** gcc/cfghooks.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/cfghooks.c 2014-05-26 10:25:29.282438234 +0200
*************** dump_bb_for_graph (pretty_printer *pp, b
*** 310,316 ****
internal_error ("%s does not support dump_bb_for_graph",
cfg_hooks->name);
if (bb->count)
! pp_printf (pp, "COUNT:" HOST_WIDEST_INT_PRINT_DEC, bb->count);
pp_printf (pp, " FREQ:%i |", bb->frequency);
pp_write_text_to_stream (pp);
if (!(dump_flags & TDF_SLIM))
--- 310,316 ----
internal_error ("%s does not support dump_bb_for_graph",
cfg_hooks->name);
if (bb->count)
! pp_printf (pp, "COUNT:" "%"PRId64, bb->count);
pp_printf (pp, " FREQ:%i |", bb->frequency);
pp_write_text_to_stream (pp);
if (!(dump_flags & TDF_SLIM))
Index: gcc/cgraph.c
===================================================================
*** gcc/cgraph.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/cgraph.c 2014-05-26 10:25:29.283438234 +0200
*************** cgraph_redirect_edge_call_stmt_to_callee
*** 1377,1388 ****
if (dump_file)
fprintf (dump_file,
"Expanding speculative call of %s/%i -> %s/%i count:"
! HOST_WIDEST_INT_PRINT_DEC"\n",
xstrdup (e->caller->name ()),
e->caller->order,
xstrdup (e->callee->name ()),
e->callee->order,
! (HOST_WIDEST_INT)e->count);
gcc_assert (e2->speculative);
push_cfun (DECL_STRUCT_FUNCTION (e->caller->decl));
new_stmt = gimple_ic (e->call_stmt, cgraph (ref->referred),
--- 1377,1388 ----
if (dump_file)
fprintf (dump_file,
"Expanding speculative call of %s/%i -> %s/%i count:"
! "%"PRId64"\n",
xstrdup (e->caller->name ()),
e->caller->order,
xstrdup (e->callee->name ()),
e->callee->order,
! (int64_t)e->count);
gcc_assert (e2->speculative);
push_cfun (DECL_STRUCT_FUNCTION (e->caller->decl));
new_stmt = gimple_ic (e->call_stmt, cgraph (ref->referred),
*************** dump_cgraph_node (FILE *f, struct cgraph
*** 1975,1982 ****
fprintf (f, " First run: %i\n", node->tp_first_run);
fprintf (f, " Function flags:");
if (node->count)
! fprintf (f, " executed "HOST_WIDEST_INT_PRINT_DEC"x",
! (HOST_WIDEST_INT)node->count);
if (node->origin)
fprintf (f, " nested in: %s", node->origin->asm_name ());
if (gimple_has_body_p (node->decl))
--- 1975,1982 ----
fprintf (f, " First run: %i\n", node->tp_first_run);
fprintf (f, " Function flags:");
if (node->count)
! fprintf (f, " executed %"PRId64"x",
! (int64_t)node->count);
if (node->origin)
fprintf (f, " nested in: %s", node->origin->asm_name ());
if (gimple_has_body_p (node->decl))
*************** dump_cgraph_node (FILE *f, struct cgraph
*** 2027,2034 ****
fprintf (f, "%s/%i ", edge->caller->asm_name (),
edge->caller->order);
if (edge->count)
! fprintf (f, "("HOST_WIDEST_INT_PRINT_DEC"x) ",
! (HOST_WIDEST_INT)edge->count);
if (edge->frequency)
fprintf (f, "(%.2f per call) ",
edge->frequency / (double)CGRAPH_FREQ_BASE);
--- 2027,2034 ----
fprintf (f, "%s/%i ", edge->caller->asm_name (),
edge->caller->order);
if (edge->count)
! fprintf (f, "(%"PRId64"x) ",
! (int64_t)edge->count);
if (edge->frequency)
fprintf (f, "(%.2f per call) ",
edge->frequency / (double)CGRAPH_FREQ_BASE);
*************** dump_cgraph_node (FILE *f, struct cgraph
*** 2054,2061 ****
if (edge->indirect_inlining_edge)
fprintf (f, "(indirect_inlining) ");
if (edge->count)
! fprintf (f, "("HOST_WIDEST_INT_PRINT_DEC"x) ",
! (HOST_WIDEST_INT)edge->count);
if (edge->frequency)
fprintf (f, "(%.2f per call) ",
edge->frequency / (double)CGRAPH_FREQ_BASE);
--- 2054,2061 ----
if (edge->indirect_inlining_edge)
fprintf (f, "(indirect_inlining) ");
if (edge->count)
! fprintf (f, "(%"PRId64"x) ",
! (int64_t)edge->count);
if (edge->frequency)
fprintf (f, "(%.2f per call) ",
edge->frequency / (double)CGRAPH_FREQ_BASE);
Index: gcc/config/mmix/mmix.c
===================================================================
*** gcc/config/mmix/mmix.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/config/mmix/mmix.c 2014-05-26 10:25:29.284438234 +0200
*************** static int mmix_output_destination_regis
*** 117,126 ****
static void mmix_option_override (void);
static void mmix_asm_output_source_filename (FILE *, const char *);
static void mmix_output_shiftvalue_op_from_str
! (FILE *, const char *, HOST_WIDEST_INT);
! static void mmix_output_shifted_value (FILE *, HOST_WIDEST_INT);
static void mmix_output_condition (FILE *, const_rtx, int);
! static void mmix_output_octa (FILE *, HOST_WIDEST_INT, int);
static bool mmix_assemble_integer (rtx, unsigned int, int);
static struct machine_function *mmix_init_machine_status (void);
static void mmix_encode_section_info (tree, rtx, int);
--- 117,126 ----
static void mmix_option_override (void);
static void mmix_asm_output_source_filename (FILE *, const char *);
static void mmix_output_shiftvalue_op_from_str
! (FILE *, const char *, int64_t);
! static void mmix_output_shifted_value (FILE *, int64_t);
static void mmix_output_condition (FILE *, const_rtx, int);
! static void mmix_output_octa (FILE *, int64_t, int);
static bool mmix_assemble_integer (rtx, unsigned int, int);
static struct machine_function *mmix_init_machine_status (void);
static void mmix_encode_section_info (tree, rtx, int);
*************** mmix_print_operand (FILE *stream, rtx x,
*** 1588,1612 ****
output. */
case 'A':
mmix_output_shiftvalue_op_from_str (stream, "ANDN",
! ~(unsigned HOST_WIDEST_INT)
mmix_intval (x));
return;
case 'i':
mmix_output_shiftvalue_op_from_str (stream, "INC",
! (unsigned HOST_WIDEST_INT)
mmix_intval (x));
return;
case 'o':
mmix_output_shiftvalue_op_from_str (stream, "OR",
! (unsigned HOST_WIDEST_INT)
mmix_intval (x));
return;
case 's':
mmix_output_shiftvalue_op_from_str (stream, "SET",
! (unsigned HOST_WIDEST_INT)
mmix_intval (x));
return;
--- 1588,1612 ----
output. */
case 'A':
mmix_output_shiftvalue_op_from_str (stream, "ANDN",
! ~(uint64_t)
mmix_intval (x));
return;
case 'i':
mmix_output_shiftvalue_op_from_str (stream, "INC",
! (uint64_t)
mmix_intval (x));
return;
case 'o':
mmix_output_shiftvalue_op_from_str (stream, "OR",
! (uint64_t)
mmix_intval (x));
return;
case 's':
mmix_output_shiftvalue_op_from_str (stream, "SET",
! (uint64_t)
mmix_intval (x));
return;
*************** mmix_print_operand (FILE *stream, rtx x,
*** 1628,1635 ****
fatal_insn ("MMIX Internal: Bad value for 'm', not a CONST_INT",
x);
}
! fprintf (stream, HOST_WIDEST_INT_PRINT_DEC,
! (HOST_WIDEST_INT) (mmix_intval (x) - 1));
return;
case 'p':
--- 1628,1635 ----
fatal_insn ("MMIX Internal: Bad value for 'm', not a CONST_INT",
x);
}
! fprintf (stream, "%"PRId64,
! (int64_t) (mmix_intval (x) - 1));
return;
case 'p':
*************** mmix_print_operand (FILE *stream, rtx x,
*** 1667,1677 ****
return;
case 'v':
! mmix_output_shifted_value (stream, (HOST_WIDEST_INT) mmix_intval (x));
return;
case 'V':
! mmix_output_shifted_value (stream, (HOST_WIDEST_INT) ~mmix_intval (x));
return;
case 'W':
--- 1667,1677 ----
return;
case 'v':
! mmix_output_shifted_value (stream, (int64_t) mmix_intval (x));
return;
case 'V':
! mmix_output_shifted_value (stream, (int64_t) ~mmix_intval (x));
return;
case 'W':
*************** mmix_expand_epilogue (void)
*** 2294,2330 ****
void
mmix_output_register_setting (FILE *stream,
int regno,
! HOST_WIDEST_INT value,
int do_begin_end)
{
if (do_begin_end)
fprintf (stream, "\t");
if (insn_const_int_ok_for_constraint (value, CONSTRAINT_K))
! fprintf (stream, "NEGU %s,0," HOST_WIDEST_INT_PRINT_DEC, reg_names[regno], -value);
! else if (mmix_shiftable_wyde_value ((unsigned HOST_WIDEST_INT) value))
{
/* First, the one-insn cases. */
mmix_output_shiftvalue_op_from_str (stream, "SET",
! (unsigned HOST_WIDEST_INT)
value);
fprintf (stream, " %s,", reg_names[regno]);
! mmix_output_shifted_value (stream, (unsigned HOST_WIDEST_INT) value);
}
! else if (mmix_shiftable_wyde_value (-(unsigned HOST_WIDEST_INT) value))
{
/* We do this to get a bit more legible assembly code. The next
alternative is mostly redundant with this. */
mmix_output_shiftvalue_op_from_str (stream, "SET",
! -(unsigned HOST_WIDEST_INT)
value);
fprintf (stream, " %s,", reg_names[regno]);
! mmix_output_shifted_value (stream, -(unsigned HOST_WIDEST_INT) value);
fprintf (stream, "\n\tNEGU %s,0,%s", reg_names[regno],
reg_names[regno]);
}
! else if (mmix_shiftable_wyde_value (~(unsigned HOST_WIDEST_INT) value))
{
/* Slightly more expensive, the two-insn cases. */
--- 2294,2330 ----
void
mmix_output_register_setting (FILE *stream,
int regno,
! int64_t value,
int do_begin_end)
{
if (do_begin_end)
fprintf (stream, "\t");
if (insn_const_int_ok_for_constraint (value, CONSTRAINT_K))
! fprintf (stream, "NEGU %s,0,%"PRId64, reg_names[regno], -value);
! else if (mmix_shiftable_wyde_value ((uint64_t) value))
{
/* First, the one-insn cases. */
mmix_output_shiftvalue_op_from_str (stream, "SET",
! (uint64_t)
value);
fprintf (stream, " %s,", reg_names[regno]);
! mmix_output_shifted_value (stream, (uint64_t) value);
}
! else if (mmix_shiftable_wyde_value (-(uint64_t) value))
{
/* We do this to get a bit more legible assembly code. The next
alternative is mostly redundant with this. */
mmix_output_shiftvalue_op_from_str (stream, "SET",
! -(uint64_t)
value);
fprintf (stream, " %s,", reg_names[regno]);
! mmix_output_shifted_value (stream, -(uint64_t) value);
fprintf (stream, "\n\tNEGU %s,0,%s", reg_names[regno],
reg_names[regno]);
}
! else if (mmix_shiftable_wyde_value (~(uint64_t) value))
{
/* Slightly more expensive, the two-insn cases. */
*************** mmix_output_register_setting (FILE *stre
*** 2335,2344 ****
anyone else cares). */
mmix_output_shiftvalue_op_from_str (stream, "SET",
! ~(unsigned HOST_WIDEST_INT)
value);
fprintf (stream, " %s,", reg_names[regno]);
! mmix_output_shifted_value (stream, ~(unsigned HOST_WIDEST_INT) value);
fprintf (stream, "\n\tNOR %s,%s,0", reg_names[regno],
reg_names[regno]);
}
--- 2335,2344 ----
anyone else cares). */
mmix_output_shiftvalue_op_from_str (stream, "SET",
! ~(uint64_t)
value);
fprintf (stream, " %s,", reg_names[regno]);
! mmix_output_shifted_value (stream, ~(uint64_t) value);
fprintf (stream, "\n\tNOR %s,%s,0", reg_names[regno],
reg_names[regno]);
}
*************** mmix_output_register_setting (FILE *stre
*** 2350,2356 ****
const char *line_begin = "";
int insns = 0;
int i;
! HOST_WIDEST_INT tmpvalue = value;
/* Compute the number of insns needed to output this constant. */
for (i = 0; i < 4 && tmpvalue != 0; i++)
--- 2350,2356 ----
const char *line_begin = "";
int insns = 0;
int i;
! int64_t tmpvalue = value;
/* Compute the number of insns needed to output this constant. */
for (i = 0; i < 4 && tmpvalue != 0; i++)
*************** mmix_output_register_setting (FILE *stre
*** 2405,2411 ****
else return 0. */
int
! mmix_shiftable_wyde_value (unsigned HOST_WIDEST_INT value)
{
/* Shift by 16 bits per group, stop when we've found two groups with
nonzero bits. */
--- 2405,2411 ----
else return 0. */
int
! mmix_shiftable_wyde_value (uint64_t value)
{
/* Shift by 16 bits per group, stop when we've found two groups with
nonzero bits. */
*************** mmix_emit_sp_add (HOST_WIDE_INT offset)
*** 2487,2493 ****
static void
mmix_output_shiftvalue_op_from_str (FILE *stream,
const char *mainop,
! HOST_WIDEST_INT value)
{
static const char *const op_part[] = {"L", "ML", "MH", "H"};
int i;
--- 2487,2493 ----
static void
mmix_output_shiftvalue_op_from_str (FILE *stream,
const char *mainop,
! int64_t value)
{
static const char *const op_part[] = {"L", "ML", "MH", "H"};
int i;
*************** mmix_output_shiftvalue_op_from_str (FILE
*** 2495,2501 ****
if (! mmix_shiftable_wyde_value (value))
{
char s[sizeof ("0xffffffffffffffff")];
! sprintf (s, HOST_WIDEST_INT_PRINT_HEX, value);
internal_error ("MMIX Internal: %s is not a shiftable int", s);
}
--- 2495,2501 ----
if (! mmix_shiftable_wyde_value (value))
{
char s[sizeof ("0xffffffffffffffff")];
! sprintf (s, "%#"PRIx64, value);
internal_error ("MMIX Internal: %s is not a shiftable int", s);
}
*************** mmix_output_shiftvalue_op_from_str (FILE
*** 2518,2543 ****
/* Print a 64-bit value, optionally prefixed by assembly pseudo. */
static void
! mmix_output_octa (FILE *stream, HOST_WIDEST_INT value, int do_begin_end)
{
if (do_begin_end)
fprintf (stream, "\tOCTA ");
/* Provide a few alternative output formats depending on the number, to
improve legibility of assembler output. */
! if ((value < (HOST_WIDEST_INT) 0 && value > (HOST_WIDEST_INT) -10000)
! || (value >= (HOST_WIDEST_INT) 0 && value <= (HOST_WIDEST_INT) 16384))
fprintf (stream, "%d", (int) value);
! else if (value > (HOST_WIDEST_INT) 0
! && value < ((HOST_WIDEST_INT) 1 << 31) * 2)
fprintf (stream, "#%x", (unsigned int) value);
! else if (sizeof (HOST_WIDE_INT) == sizeof (HOST_WIDEST_INT))
/* We need to avoid the not-so-universal "0x" prefix; we need the
pure hex-digits together with the mmixal "#" hex prefix. */
fprintf (stream, "#" HOST_WIDE_INT_PRINT_HEX_PURE,
(HOST_WIDE_INT) value);
else /* Need to avoid the hex output; there's no ...WIDEST...HEX_PURE. */
! fprintf (stream, HOST_WIDEST_INT_PRINT_UNSIGNED, value);
if (do_begin_end)
fprintf (stream, "\n");
--- 2518,2543 ----
/* Print a 64-bit value, optionally prefixed by assembly pseudo. */
static void
! mmix_output_octa (FILE *stream, int64_t value, int do_begin_end)
{
if (do_begin_end)
fprintf (stream, "\tOCTA ");
/* Provide a few alternative output formats depending on the number, to
improve legibility of assembler output. */
! if ((value < (int64_t) 0 && value > (int64_t) -10000)
! || (value >= (int64_t) 0 && value <= (int64_t) 16384))
fprintf (stream, "%d", (int) value);
! else if (value > (int64_t) 0
! && value < ((int64_t) 1 << 31) * 2)
fprintf (stream, "#%x", (unsigned int) value);
! else if (sizeof (HOST_WIDE_INT) == sizeof (int64_t))
/* We need to avoid the not-so-universal "0x" prefix; we need the
pure hex-digits together with the mmixal "#" hex prefix. */
fprintf (stream, "#" HOST_WIDE_INT_PRINT_HEX_PURE,
(HOST_WIDE_INT) value);
else /* Need to avoid the hex output; there's no ...WIDEST...HEX_PURE. */
! fprintf (stream, "%"PRIu64, value);
if (do_begin_end)
fprintf (stream, "\n");
*************** mmix_output_octa (FILE *stream, HOST_WID
*** 2547,2560 ****
be output with an operand). */
static void
! mmix_output_shifted_value (FILE *stream, HOST_WIDEST_INT value)
{
int i;
if (! mmix_shiftable_wyde_value (value))
{
char s[16+2+1];
! sprintf (s, HOST_WIDEST_INT_PRINT_HEX, value);
internal_error ("MMIX Internal: %s is not a shiftable int", s);
}
--- 2547,2560 ----
be output with an operand). */
static void
! mmix_output_shifted_value (FILE *stream, int64_t value)
{
int i;
if (! mmix_shiftable_wyde_value (value))
{
char s[16+2+1];
! sprintf (s, "%#"PRIx64, value);
internal_error ("MMIX Internal: %s is not a shiftable int", s);
}
*************** mmix_output_condition (FILE *stream, con
*** 2687,2696 ****
/* Return the bit-value for a const_int or const_double. */
! HOST_WIDEST_INT
mmix_intval (const_rtx x)
{
! unsigned HOST_WIDEST_INT retval;
if (GET_CODE (x) == CONST_INT)
return INTVAL (x);
--- 2687,2696 ----
/* Return the bit-value for a const_int or const_double. */
! int64_t
mmix_intval (const_rtx x)
{
! uint64_t retval;
if (GET_CODE (x) == CONST_INT)
return INTVAL (x);
*************** mmix_intval (const_rtx x)
*** 2699,2720 ****
gcc-2.7.2 is broken. I still want people to be able to use it for
cross-compilation to MMIX. */
if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) == VOIDmode)
! {
! if (sizeof (HOST_WIDE_INT) < sizeof (HOST_WIDEST_INT))
! {
! retval = (unsigned) CONST_DOUBLE_LOW (x) / 2;
! retval *= 2;
! retval |= CONST_DOUBLE_LOW (x) & 1;
!
! retval |=
! (unsigned HOST_WIDEST_INT) CONST_DOUBLE_HIGH (x)
! << (HOST_BITS_PER_LONG)/2 << (HOST_BITS_PER_LONG)/2;
! }
! else
! retval = CONST_DOUBLE_HIGH (x);
!
! return retval;
! }
if (GET_CODE (x) == CONST_DOUBLE)
{
--- 2699,2705 ----
gcc-2.7.2 is broken. I still want people to be able to use it for
cross-compilation to MMIX. */
if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) == VOIDmode)
! return CONST_DOUBLE_HIGH (x);
if (GET_CODE (x) == CONST_DOUBLE)
{
*************** mmix_intval (const_rtx x)
*** 2733,2741 ****
sign-extended to unsigned long long(!) when they're of
different size (usually 32-bit hosts). */
return
! ((unsigned HOST_WIDEST_INT) (unsigned long) bits[0]
! << (unsigned HOST_WIDEST_INT) 32U)
! | (unsigned HOST_WIDEST_INT) (unsigned long) bits[1];
}
else if (GET_MODE (x) == SFmode)
{
--- 2718,2726 ----
sign-extended to unsigned long long(!) when they're of
different size (usually 32-bit hosts). */
return
! ((uint64_t) (unsigned long) bits[0]
! << (uint64_t) 32U)
! | (uint64_t) (unsigned long) bits[1];
}
else if (GET_MODE (x) == SFmode)
{
Index: gcc/final.c
===================================================================
*** gcc/final.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/final.c 2014-05-26 10:25:29.286438234 +0200
*************** dump_basic_block_info (FILE *file, rtx i
*** 1925,1931 ****
if (bb->frequency)
fprintf (file, " freq:%d", bb->frequency);
if (bb->count)
! fprintf (file, " count:" HOST_WIDEST_INT_PRINT_DEC,
bb->count);
fprintf (file, " seq:%d", (*bb_seqn)++);
fprintf (file, "\n%s PRED:", ASM_COMMENT_START);
--- 1925,1931 ----
if (bb->frequency)
fprintf (file, " freq:%d", bb->frequency);
if (bb->count)
! fprintf (file, " count:%"PRId64,
bb->count);
fprintf (file, " seq:%d", (*bb_seqn)++);
fprintf (file, "\n%s PRED:", ASM_COMMENT_START);
Index: gcc/gcov-dump.c
===================================================================
*** gcc/gcov-dump.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/gcov-dump.c 2014-05-26 10:25:29.286438234 +0200
*************** tag_counters (const char *filename ATTRI
*** 444,450 ****
count = gcov_read_counter ();
printf (" ");
! printf (HOST_WIDEST_INT_PRINT_DEC, count);
}
}
}
--- 444,450 ----
count = gcov_read_counter ();
printf (" ");
! printf ("%"PRId64, count);
}
}
}
*************** tag_summary (const char *filename ATTRIB
*** 467,478 ****
printf ("\t\tcounts=%u, runs=%u",
summary.ctrs[ix].num, summary.ctrs[ix].runs);
! printf (", sum_all=" HOST_WIDEST_INT_PRINT_DEC,
! (HOST_WIDEST_INT)summary.ctrs[ix].sum_all);
! printf (", run_max=" HOST_WIDEST_INT_PRINT_DEC,
! (HOST_WIDEST_INT)summary.ctrs[ix].run_max);
! printf (", sum_max=" HOST_WIDEST_INT_PRINT_DEC,
! (HOST_WIDEST_INT)summary.ctrs[ix].sum_max);
if (ix != GCOV_COUNTER_ARCS)
continue;
printf ("\n");
--- 467,478 ----
printf ("\t\tcounts=%u, runs=%u",
summary.ctrs[ix].num, summary.ctrs[ix].runs);
! printf (", sum_all=%"PRId64,
! (int64_t)summary.ctrs[ix].sum_all);
! printf (", run_max=%"PRId64,
! (int64_t)summary.ctrs[ix].run_max);
! printf (", sum_max=%"PRId64,
! (int64_t)summary.ctrs[ix].sum_max);
if (ix != GCOV_COUNTER_ARCS)
continue;
printf ("\n");
*************** tag_summary (const char *filename ATTRIB
*** 486,496 ****
printf ("\n");
print_prefix (filename, 0, 0);
printf ("\t\t%d: num counts=%u, min counter="
! HOST_WIDEST_INT_PRINT_DEC ", cum_counter="
! HOST_WIDEST_INT_PRINT_DEC,
h_ix, histo_bucket->num_counters,
! (HOST_WIDEST_INT)histo_bucket->min_value,
! (HOST_WIDEST_INT)histo_bucket->cum_value);
}
if (flag_dump_working_sets)
dump_working_sets (filename, &summary.ctrs[ix]);
--- 486,496 ----
printf ("\n");
print_prefix (filename, 0, 0);
printf ("\t\t%d: num counts=%u, min counter="
! "%"PRId64 ", cum_counter="
! "%"PRId64,
h_ix, histo_bucket->num_counters,
! (int64_t)histo_bucket->min_value,
! (int64_t)histo_bucket->cum_value);
}
if (flag_dump_working_sets)
dump_working_sets (filename, &summary.ctrs[ix]);
*************** dump_working_sets (const char *filename
*** 522,530 ****
printf ("\n");
print_prefix (filename, 0, 0);
printf ("\t\t%u.%02u%%: num counts=%u, min counter="
! HOST_WIDEST_INT_PRINT_DEC,
pct / 100, pct - (pct / 100 * 100),
ws_info->num_counters,
! (HOST_WIDEST_INT)ws_info->min_counter);
}
}
--- 522,530 ----
printf ("\n");
print_prefix (filename, 0, 0);
printf ("\t\t%u.%02u%%: num counts=%u, min counter="
! "%"PRId64,
pct / 100, pct - (pct / 100 * 100),
ws_info->num_counters,
! (int64_t)ws_info->min_counter);
}
}
Index: gcc/gcov-io.h
===================================================================
*** gcc/gcov-io.h.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/gcov-io.h 2014-05-26 10:25:29.287438234 +0200
*************** typedef unsigned gcov_position_t;
*** 172,179 ****
/* gcov_type is typedef'd elsewhere for the compiler */
#if IN_GCOV
#define GCOV_LINKAGE static
! typedef HOST_WIDEST_INT gcov_type;
! typedef unsigned HOST_WIDEST_INT gcov_type_unsigned;
#if IN_GCOV > 0
#include <sys/types.h>
#endif
--- 172,179 ----
/* gcov_type is typedef'd elsewhere for the compiler */
#if IN_GCOV
#define GCOV_LINKAGE static
! typedef int64_t gcov_type;
! typedef uint64_t gcov_type_unsigned;
#if IN_GCOV > 0
#include <sys/types.h>
#endif
Index: gcc/gcov.c
===================================================================
*** gcc/gcov.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/gcov.c 2014-05-26 10:25:29.288438234 +0200
*************** format_gcov (gcov_type top, gcov_type bo
*** 1846,1852 ****
}
}
else
! sprintf (buffer, HOST_WIDEST_INT_PRINT_DEC, (HOST_WIDEST_INT)top);
return buffer;
}
--- 1846,1852 ----
}
}
else
! sprintf (buffer, "%"PRId64, (int64_t)top);
return buffer;
}
Index: gcc/hwint.h
===================================================================
*** gcc/hwint.h.orig 2014-05-26 10:25:23.082438661 +0200
--- gcc/hwint.h 2014-05-26 12:34:19.703906004 +0200
*************** typedef HOST_WIDE_INT __gcc_host_wide_in
*** 135,151 ****
#define HOST_WIDE_INT_PRINT_HEX "%#" HOST_WIDE_INT_PRINT "x"
#define HOST_WIDE_INT_PRINT_HEX_PURE "%" HOST_WIDE_INT_PRINT "x"
! /* Set HOST_WIDEST_INT. This is a 64-bit type. */
!
! #define HOST_WIDEST_INT HOST_WIDE_INT
! #define HOST_BITS_PER_WIDEST_INT HOST_BITS_PER_WIDE_INT
! #define HOST_WIDEST_INT_PRINT HOST_WIDE_INT_PRINT
! #define HOST_WIDEST_INT_PRINT_DEC HOST_WIDE_INT_PRINT_DEC
! #define HOST_WIDEST_INT_PRINT_DEC_C HOST_WIDE_INT_PRINT_DEC_C
! #define HOST_WIDEST_INT_PRINT_UNSIGNED HOST_WIDE_INT_PRINT_UNSIGNED
! #define HOST_WIDEST_INT_PRINT_HEX HOST_WIDE_INT_PRINT_HEX
! #define HOST_WIDEST_INT_PRINT_DOUBLE_HEX HOST_WIDE_INT_PRINT_DOUBLE_HEX
! #define HOST_WIDEST_INT_C(X) HOST_WIDE_INT (X)
/* Define HOST_WIDEST_FAST_INT to the widest integer type supported
efficiently in hardware. (That is, the widest integer type that fits
--- 135,155 ----
#define HOST_WIDE_INT_PRINT_HEX "%#" HOST_WIDE_INT_PRINT "x"
#define HOST_WIDE_INT_PRINT_HEX_PURE "%" HOST_WIDE_INT_PRINT "x"
! /* Provide C99 <inttypes.h> style format definitions for 64bits. */
! #ifndef HAVE_INTTYPES_H
! #undef PRId64
! #define PRId64 HOST_WIDE_INT_PRINT "d"
! #undef PRIi64
! #define PRIi64 HOST_WIDE_INT_PRINT "i"
! #undef PRIo64
! #define PRIo64 HOST_WIDE_INT_PRINT "o"
! #undef PRIu64
! #define PRIu64 HOST_WIDE_INT_PRINT "u"
! #undef PRIx64
! #define PRIx64 HOST_WIDE_INT_PRINT "x"
! #undef PRIX64
! #define PRIX64 HOST_WIDE_INT_PRINT "X"
! #endif
/* Define HOST_WIDEST_FAST_INT to the widest integer type supported
efficiently in hardware. (That is, the widest integer type that fits
Index: gcc/ipa-cp.c
===================================================================
*** gcc/ipa-cp.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/ipa-cp.c 2014-05-26 10:25:29.288438234 +0200
*************** good_cloning_opportunity_p (struct cgrap
*** 1748,1760 ****
if (max_count)
{
int factor = (count_sum * 1000) / max_count;
! HOST_WIDEST_INT evaluation = (((HOST_WIDEST_INT) time_benefit * factor)
/ size_cost);
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " good_cloning_opportunity_p (time: %i, "
"size: %i, count_sum: " HOST_WIDE_INT_PRINT_DEC
! ") -> evaluation: " HOST_WIDEST_INT_PRINT_DEC
", threshold: %i\n",
time_benefit, size_cost, (HOST_WIDE_INT) count_sum,
evaluation, PARAM_VALUE (PARAM_IPA_CP_EVAL_THRESHOLD));
--- 1748,1760 ----
if (max_count)
{
int factor = (count_sum * 1000) / max_count;
! int64_t evaluation = (((int64_t) time_benefit * factor)
/ size_cost);
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " good_cloning_opportunity_p (time: %i, "
"size: %i, count_sum: " HOST_WIDE_INT_PRINT_DEC
! ") -> evaluation: " "%"PRId64
", threshold: %i\n",
time_benefit, size_cost, (HOST_WIDE_INT) count_sum,
evaluation, PARAM_VALUE (PARAM_IPA_CP_EVAL_THRESHOLD));
*************** good_cloning_opportunity_p (struct cgrap
*** 1763,1775 ****
}
else
{
! HOST_WIDEST_INT evaluation = (((HOST_WIDEST_INT) time_benefit * freq_sum)
/ size_cost);
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " good_cloning_opportunity_p (time: %i, "
"size: %i, freq_sum: %i) -> evaluation: "
! HOST_WIDEST_INT_PRINT_DEC ", threshold: %i\n",
time_benefit, size_cost, freq_sum, evaluation,
PARAM_VALUE (PARAM_IPA_CP_EVAL_THRESHOLD));
--- 1763,1775 ----
}
else
{
! int64_t evaluation = (((int64_t) time_benefit * freq_sum)
/ size_cost);
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " good_cloning_opportunity_p (time: %i, "
"size: %i, freq_sum: %i) -> evaluation: "
! "%"PRId64 ", threshold: %i\n",
time_benefit, size_cost, freq_sum, evaluation,
PARAM_VALUE (PARAM_IPA_CP_EVAL_THRESHOLD));
*************** ipcp_edge_removal_hook (struct cgraph_ed
*** 2459,2465 ****
parameter with the given INDEX. */
static tree
! get_clone_agg_value (struct cgraph_node *node, HOST_WIDEST_INT offset,
int index)
{
struct ipa_agg_replacement_value *aggval;
--- 2459,2465 ----
parameter with the given INDEX. */
static tree
! get_clone_agg_value (struct cgraph_node *node, HOST_WIDE_INT offset,
int index)
{
struct ipa_agg_replacement_value *aggval;
Index: gcc/ipa-inline.c
===================================================================
*** gcc/ipa-inline.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/ipa-inline.c 2014-05-26 10:25:29.289438234 +0200
*************** compute_max_insns (int insns)
*** 1441,1447 ****
if (max_insns < PARAM_VALUE (PARAM_LARGE_UNIT_INSNS))
max_insns = PARAM_VALUE (PARAM_LARGE_UNIT_INSNS);
! return ((HOST_WIDEST_INT) max_insns
* (100 + PARAM_VALUE (PARAM_INLINE_UNIT_GROWTH)) / 100);
}
--- 1441,1447 ----
if (max_insns < PARAM_VALUE (PARAM_LARGE_UNIT_INSNS))
max_insns = PARAM_VALUE (PARAM_LARGE_UNIT_INSNS);
! return ((int64_t) max_insns
* (100 + PARAM_VALUE (PARAM_INLINE_UNIT_GROWTH)) / 100);
}
*************** inline_small_functions (void)
*** 1737,1743 ****
badness,
edge->frequency / (double)CGRAPH_FREQ_BASE);
if (edge->count)
! fprintf (dump_file," Called "HOST_WIDEST_INT_PRINT_DEC"x\n",
edge->count);
if (dump_flags & TDF_DETAILS)
edge_badness (edge, true);
--- 1737,1743 ----
badness,
edge->frequency / (double)CGRAPH_FREQ_BASE);
if (edge->count)
! fprintf (dump_file," Called %"PRId64"x\n",
edge->count);
if (dump_flags & TDF_DETAILS)
edge_badness (edge, true);
*************** inline_to_all_callers (struct cgraph_nod
*** 2011,2017 ****
static void
dump_overall_stats (void)
{
! HOST_WIDEST_INT sum_weighted = 0, sum = 0;
struct cgraph_node *node;
FOR_EACH_DEFINED_FUNCTION (node)
--- 2011,2017 ----
static void
dump_overall_stats (void)
{
! int64_t sum_weighted = 0, sum = 0;
struct cgraph_node *node;
FOR_EACH_DEFINED_FUNCTION (node)
*************** dump_overall_stats (void)
*** 2023,2030 ****
sum_weighted += time * node->count;
}
fprintf (dump_file, "Overall time estimate: "
! HOST_WIDEST_INT_PRINT_DEC" weighted by profile: "
! HOST_WIDEST_INT_PRINT_DEC"\n", sum, sum_weighted);
}
/* Output some useful stats about inlining. */
--- 2023,2030 ----
sum_weighted += time * node->count;
}
fprintf (dump_file, "Overall time estimate: "
! "%"PRId64" weighted by profile: "
! "%"PRId64"\n", sum, sum_weighted);
}
/* Output some useful stats about inlining. */
*************** dump_overall_stats (void)
*** 2032,2044 ****
static void
dump_inline_stats (void)
{
! HOST_WIDEST_INT inlined_cnt = 0, inlined_indir_cnt = 0;
! HOST_WIDEST_INT inlined_virt_cnt = 0, inlined_virt_indir_cnt = 0;
! HOST_WIDEST_INT noninlined_cnt = 0, noninlined_indir_cnt = 0;
! HOST_WIDEST_INT noninlined_virt_cnt = 0, noninlined_virt_indir_cnt = 0;
! HOST_WIDEST_INT inlined_speculative = 0, inlined_speculative_ply = 0;
! HOST_WIDEST_INT indirect_poly_cnt = 0, indirect_cnt = 0;
! HOST_WIDEST_INT reason[CIF_N_REASONS][3];
int i;
struct cgraph_node *node;
--- 2032,2044 ----
static void
dump_inline_stats (void)
{
! int64_t inlined_cnt = 0, inlined_indir_cnt = 0;
! int64_t inlined_virt_cnt = 0, inlined_virt_indir_cnt = 0;
! int64_t noninlined_cnt = 0, noninlined_indir_cnt = 0;
! int64_t noninlined_virt_cnt = 0, noninlined_virt_indir_cnt = 0;
! int64_t inlined_speculative = 0, inlined_speculative_ply = 0;
! int64_t indirect_poly_cnt = 0, indirect_cnt = 0;
! int64_t reason[CIF_N_REASONS][3];
int i;
struct cgraph_node *node;
*************** dump_inline_stats (void)
*** 2102,2132 ****
if (max_count)
{
fprintf (dump_file,
! "Inlined " HOST_WIDEST_INT_PRINT_DEC " + speculative "
! HOST_WIDEST_INT_PRINT_DEC " + speculative polymorphic "
! HOST_WIDEST_INT_PRINT_DEC " + previously indirect "
! HOST_WIDEST_INT_PRINT_DEC " + virtual "
! HOST_WIDEST_INT_PRINT_DEC " + virtual and previously indirect "
! HOST_WIDEST_INT_PRINT_DEC "\n" "Not inlined "
! HOST_WIDEST_INT_PRINT_DEC " + previously indirect "
! HOST_WIDEST_INT_PRINT_DEC " + virtual "
! HOST_WIDEST_INT_PRINT_DEC " + virtual and previously indirect "
! HOST_WIDEST_INT_PRINT_DEC " + stil indirect "
! HOST_WIDEST_INT_PRINT_DEC " + still indirect polymorphic "
! HOST_WIDEST_INT_PRINT_DEC "\n", inlined_cnt,
inlined_speculative, inlined_speculative_ply,
inlined_indir_cnt, inlined_virt_cnt, inlined_virt_indir_cnt,
noninlined_cnt, noninlined_indir_cnt, noninlined_virt_cnt,
noninlined_virt_indir_cnt, indirect_cnt, indirect_poly_cnt);
fprintf (dump_file,
! "Removed speculations " HOST_WIDEST_INT_PRINT_DEC "\n",
spec_rem);
}
dump_overall_stats ();
fprintf (dump_file, "\nWhy inlining failed?\n");
for (i = 0; i < CIF_N_REASONS; i++)
if (reason[i][2])
! fprintf (dump_file, "%-50s: %8i calls, %8i freq, "HOST_WIDEST_INT_PRINT_DEC" count\n",
cgraph_inline_failed_string ((cgraph_inline_failed_t) i),
(int) reason[i][2], (int) reason[i][1], reason[i][0]);
}
--- 2102,2132 ----
if (max_count)
{
fprintf (dump_file,
! "Inlined %"PRId64 " + speculative "
! "%"PRId64 " + speculative polymorphic "
! "%"PRId64 " + previously indirect "
! "%"PRId64 " + virtual "
! "%"PRId64 " + virtual and previously indirect "
! "%"PRId64 "\n" "Not inlined "
! "%"PRId64 " + previously indirect "
! "%"PRId64 " + virtual "
! "%"PRId64 " + virtual and previously indirect "
! "%"PRId64 " + stil indirect "
! "%"PRId64 " + still indirect polymorphic "
! "%"PRId64 "\n", inlined_cnt,
inlined_speculative, inlined_speculative_ply,
inlined_indir_cnt, inlined_virt_cnt, inlined_virt_indir_cnt,
noninlined_cnt, noninlined_indir_cnt, noninlined_virt_cnt,
noninlined_virt_indir_cnt, indirect_cnt, indirect_poly_cnt);
fprintf (dump_file,
! "Removed speculations %"PRId64 "\n",
spec_rem);
}
dump_overall_stats ();
fprintf (dump_file, "\nWhy inlining failed?\n");
for (i = 0; i < CIF_N_REASONS; i++)
if (reason[i][2])
! fprintf (dump_file, "%-50s: %8i calls, %8i freq, %"PRId64" count\n",
cgraph_inline_failed_string ((cgraph_inline_failed_t) i),
(int) reason[i][2], (int) reason[i][1], reason[i][0]);
}
Index: gcc/ipa-profile.c
===================================================================
*** gcc/ipa-profile.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/ipa-profile.c 2014-05-26 10:25:29.289438234 +0200
*************** dump_histogram (FILE *file, vec<histogra
*** 163,170 ****
{
cumulated_time += histogram[i]->count * histogram[i]->time;
cumulated_size += histogram[i]->size;
! fprintf (file, " "HOST_WIDEST_INT_PRINT_DEC": time:%i (%2.2f) size:%i (%2.2f)\n",
! (HOST_WIDEST_INT) histogram[i]->count,
histogram[i]->time,
cumulated_time * 100.0 / overall_time,
histogram[i]->size,
--- 163,170 ----
{
cumulated_time += histogram[i]->count * histogram[i]->time;
cumulated_size += histogram[i]->size;
! fprintf (file, " %"PRId64": time:%i (%2.2f) size:%i (%2.2f)\n",
! (int64_t) histogram[i]->count,
histogram[i]->time,
cumulated_time * 100.0 / overall_time,
histogram[i]->size,
*************** ipa_profile (void)
*** 516,523 ****
{
gcov_type min, cumulated_time = 0, cumulated_size = 0;
! fprintf (dump_file, "Overall time: "HOST_WIDEST_INT_PRINT_DEC"\n",
! (HOST_WIDEST_INT)overall_time);
min = get_hot_bb_threshold ();
for (i = 0; i < (int)histogram.length () && histogram[i]->count >= min;
i++)
--- 516,523 ----
{
gcov_type min, cumulated_time = 0, cumulated_size = 0;
! fprintf (dump_file, "Overall time: %"PRId64"\n",
! (int64_t)overall_time);
min = get_hot_bb_threshold ();
for (i = 0; i < (int)histogram.length () && histogram[i]->count >= min;
i++)
*************** ipa_profile (void)
*** 525,533 ****
cumulated_time += histogram[i]->count * histogram[i]->time;
cumulated_size += histogram[i]->size;
}
! fprintf (dump_file, "GCOV min count: "HOST_WIDEST_INT_PRINT_DEC
" Time:%3.2f%% Size:%3.2f%%\n",
! (HOST_WIDEST_INT)min,
cumulated_time * 100.0 / overall_time,
cumulated_size * 100.0 / overall_size);
}
--- 525,533 ----
cumulated_time += histogram[i]->count * histogram[i]->time;
cumulated_size += histogram[i]->size;
}
! fprintf (dump_file, "GCOV min count: %"PRId64
" Time:%3.2f%% Size:%3.2f%%\n",
! (int64_t)min,
cumulated_time * 100.0 / overall_time,
cumulated_size * 100.0 / overall_size);
}
*************** ipa_profile (void)
*** 551,559 ****
cumulated_time += histogram[i]->count * histogram[i]->time;
cumulated_size += histogram[i]->size;
}
! fprintf (dump_file, "Determined min count: "HOST_WIDEST_INT_PRINT_DEC
" Time:%3.2f%% Size:%3.2f%%\n",
! (HOST_WIDEST_INT)threshold,
cumulated_time * 100.0 / overall_time,
cumulated_size * 100.0 / overall_size);
}
--- 551,559 ----
cumulated_time += histogram[i]->count * histogram[i]->time;
cumulated_size += histogram[i]->size;
}
! fprintf (dump_file, "Determined min count: %"PRId64
" Time:%3.2f%% Size:%3.2f%%\n",
! (int64_t)threshold,
cumulated_time * 100.0 / overall_time,
cumulated_size * 100.0 / overall_size);
}
Index: gcc/ira-color.c
===================================================================
*** gcc/ira-color.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/ira-color.c 2014-05-26 10:25:29.290438234 +0200
*************** struct allocno_hard_regs
*** 53,59 ****
HARD_REG_SET set;
/* Overall (spilling) cost of all allocnos with given register
set. */
! HOST_WIDEST_INT cost;
};
typedef struct allocno_hard_regs_node *allocno_hard_regs_node_t;
--- 53,59 ----
HARD_REG_SET set;
/* Overall (spilling) cost of all allocnos with given register
set. */
! int64_t cost;
};
typedef struct allocno_hard_regs_node *allocno_hard_regs_node_t;
*************** init_allocno_hard_regs (void)
*** 254,260 ****
/* Add (or update info about) allocno hard registers with SET and
COST. */
static allocno_hard_regs_t
! add_allocno_hard_regs (HARD_REG_SET set, HOST_WIDEST_INT cost)
{
struct allocno_hard_regs temp;
allocno_hard_regs_t hv;
--- 254,260 ----
/* Add (or update info about) allocno hard registers with SET and
COST. */
static allocno_hard_regs_t
! add_allocno_hard_regs (HARD_REG_SET set, int64_t cost)
{
struct allocno_hard_regs temp;
allocno_hard_regs_t hv;
*************** print_hard_regs_subforest (FILE *f, allo
*** 519,525 ****
fprintf (f, " ");
fprintf (f, "%d:(", node->preorder_num);
print_hard_reg_set (f, node->hard_regs->set, false);
! fprintf (f, ")@" HOST_WIDEST_INT_PRINT_DEC "\n", node->hard_regs->cost);
print_hard_regs_subforest (f, node->first, level + 1);
}
}
--- 519,525 ----
fprintf (f, " ");
fprintf (f, "%d:(", node->preorder_num);
print_hard_reg_set (f, node->hard_regs->set, false);
! fprintf (f, ")@%"PRId64"\n", node->hard_regs->cost);
print_hard_regs_subforest (f, node->first, level + 1);
}
}
Index: gcc/loop-doloop.c
===================================================================
*** gcc/loop-doloop.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/loop-doloop.c 2014-05-26 10:25:29.290438234 +0200
*************** doloop_modify (struct loop *loop, struct
*** 417,423 ****
{
fprintf (dump_file, "Doloop: Inserting doloop pattern (");
if (desc->const_iter)
! fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC, desc->niter);
else
fputs ("runtime", dump_file);
fputs (" iterations).\n", dump_file);
--- 417,423 ----
{
fprintf (dump_file, "Doloop: Inserting doloop pattern (");
if (desc->const_iter)
! fprintf (dump_file, "%"PRId64, desc->niter);
else
fputs ("runtime", dump_file);
fputs (" iterations).\n", dump_file);
Index: gcc/loop-iv.c
===================================================================
*** gcc/loop-iv.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/loop-iv.c 2014-05-26 10:25:29.291438233 +0200
*************** iv_analysis_done (void)
*** 1308,1319 ****
/* Computes inverse to X modulo (1 << MOD). */
! static unsigned HOST_WIDEST_INT
! inverse (unsigned HOST_WIDEST_INT x, int mod)
{
! unsigned HOST_WIDEST_INT mask =
! ((unsigned HOST_WIDEST_INT) 1 << (mod - 1) << 1) - 1;
! unsigned HOST_WIDEST_INT rslt = 1;
int i;
for (i = 0; i < mod - 1; i++)
--- 1308,1319 ----
/* Computes inverse to X modulo (1 << MOD). */
! static uint64_t
! inverse (uint64_t x, int mod)
{
! uint64_t mask =
! ((uint64_t) 1 << (mod - 1) << 1) - 1;
! uint64_t rslt = 1;
int i;
for (i = 0; i < mod - 1; i++)
*************** canonicalize_iv_subregs (struct rtx_iv *
*** 2263,2275 ****
a number of fields in DESC already filled in. OLD_NITER is the original
expression for the number of iterations, before we tried to simplify it. */
! static unsigned HOST_WIDEST_INT
determine_max_iter (struct loop *loop, struct niter_desc *desc, rtx old_niter)
{
rtx niter = desc->niter_expr;
rtx mmin, mmax, cmp;
! unsigned HOST_WIDEST_INT nmax, inc;
! unsigned HOST_WIDEST_INT andmax = 0;
/* We used to look for constant operand 0 of AND,
but canonicalization should always make this impossible. */
--- 2263,2275 ----
a number of fields in DESC already filled in. OLD_NITER is the original
expression for the number of iterations, before we tried to simplify it. */
! static uint64_t
determine_max_iter (struct loop *loop, struct niter_desc *desc, rtx old_niter)
{
rtx niter = desc->niter_expr;
rtx mmin, mmax, cmp;
! uint64_t nmax, inc;
! uint64_t andmax = 0;
/* We used to look for constant operand 0 of AND,
but canonicalization should always make this impossible. */
*************** determine_max_iter (struct loop *loop, s
*** 2312,2318 ****
if (andmax)
nmax = MIN (nmax, andmax);
if (dump_file)
! fprintf (dump_file, ";; Determined upper bound "HOST_WIDEST_INT_PRINT_DEC".\n",
nmax);
return nmax;
}
--- 2312,2318 ----
if (andmax)
nmax = MIN (nmax, andmax);
if (dump_file)
! fprintf (dump_file, ";; Determined upper bound %"PRId64".\n",
nmax);
return nmax;
}
*************** iv_number_of_iterations (struct loop *lo
*** 2331,2338 ****
enum rtx_code cond;
enum machine_mode mode, comp_mode;
rtx mmin, mmax, mode_mmin, mode_mmax;
! unsigned HOST_WIDEST_INT s, size, d, inv, max;
! HOST_WIDEST_INT up, down, inc, step_val;
int was_sharp = false;
rtx old_niter;
bool step_is_pow2;
--- 2331,2338 ----
enum rtx_code cond;
enum machine_mode mode, comp_mode;
rtx mmin, mmax, mode_mmin, mode_mmax;
! uint64_t s, size, d, inv, max;
! int64_t up, down, inc, step_val;
int was_sharp = false;
rtx old_niter;
bool step_is_pow2;
*************** iv_number_of_iterations (struct loop *lo
*** 2679,2685 ****
d *= 2;
size--;
}
! bound = GEN_INT (((unsigned HOST_WIDEST_INT) 1 << (size - 1 ) << 1) - 1);
tmp1 = lowpart_subreg (mode, iv1.base, comp_mode);
tmp = simplify_gen_binary (UMOD, mode, tmp1, gen_int_mode (d, mode));
--- 2679,2685 ----
d *= 2;
size--;
}
! bound = GEN_INT (((uint64_t) 1 << (size - 1 ) << 1) - 1);
tmp1 = lowpart_subreg (mode, iv1.base, comp_mode);
tmp = simplify_gen_binary (UMOD, mode, tmp1, gen_int_mode (d, mode));
*************** iv_number_of_iterations (struct loop *lo
*** 2833,2839 ****
if (CONST_INT_P (desc->niter_expr))
{
! unsigned HOST_WIDEST_INT val = INTVAL (desc->niter_expr);
desc->const_iter = true;
desc->niter = val & GET_MODE_MASK (desc->mode);
--- 2833,2839 ----
if (CONST_INT_P (desc->niter_expr))
{
! uint64_t val = INTVAL (desc->niter_expr);
desc->const_iter = true;
desc->niter = val & GET_MODE_MASK (desc->mode);
Index: gcc/loop-unroll.c
===================================================================
*** gcc/loop-unroll.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/loop-unroll.c 2014-05-26 10:25:29.291438233 +0200
*************** decide_peel_completely (struct loop *loo
*** 548,554 ****
{
fprintf (dump_file,
";; Not peeling loop completely, rolls too much (");
! fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC, desc->niter);
fprintf (dump_file, " iterations > %d [maximum peelings])\n", npeel);
}
return;
--- 548,554 ----
{
fprintf (dump_file,
";; Not peeling loop completely, rolls too much (");
! fprintf (dump_file, "%"PRId64, desc->niter);
fprintf (dump_file, " iterations > %d [maximum peelings])\n", npeel);
}
return;
*************** decide_peel_simple (struct loop *loop, i
*** 1429,1436 ****
if (dump_file)
{
fprintf (dump_file, ";; Not peeling loop, rolls too much (");
! fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
! (HOST_WIDEST_INT) (iterations.to_shwi () + 1));
fprintf (dump_file, " iterations > %d [maximum peelings])\n",
npeel);
}
--- 1429,1436 ----
if (dump_file)
{
fprintf (dump_file, ";; Not peeling loop, rolls too much (");
! fprintf (dump_file, "%"PRId64,
! (int64_t) (iterations.to_shwi () + 1));
fprintf (dump_file, " iterations > %d [maximum peelings])\n",
npeel);
}
Index: gcc/lto-streamer-out.c
===================================================================
*** gcc/lto-streamer-out.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/lto-streamer-out.c 2014-05-26 10:25:29.291438233 +0200
*************** write_symbol (struct streamer_tree_cache
*** 2242,2248 ****
enum gcc_plugin_symbol_kind kind;
enum gcc_plugin_symbol_visibility visibility;
unsigned slot_num;
! unsigned HOST_WIDEST_INT size;
const char *comdat;
unsigned char c;
--- 2242,2248 ----
enum gcc_plugin_symbol_kind kind;
enum gcc_plugin_symbol_visibility visibility;
unsigned slot_num;
! uint64_t size;
const char *comdat;
unsigned char c;
Index: gcc/mcf.c
===================================================================
*** gcc/mcf.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/mcf.c 2014-05-26 10:25:29.292438233 +0200
*************** along with GCC; see the file COPYING3.
*** 51,57 ****
#include "dumpfile.h"
/* CAP_INFINITY: Constant to represent infinite capacity. */
! #define CAP_INFINITY INTTYPE_MAXIMUM (HOST_WIDEST_INT)
/* COST FUNCTION. */
#define K_POS(b) ((b))
--- 51,57 ----
#include "dumpfile.h"
/* CAP_INFINITY: Constant to represent infinite capacity. */
! #define CAP_INFINITY INTTYPE_MAXIMUM (int64_t)
/* COST FUNCTION. */
#define K_POS(b) ((b))
*************** dump_fixup_edge (FILE *file, fixup_graph
*** 203,214 ****
if (fedge->type)
{
! fprintf (file, "flow/capacity=" HOST_WIDEST_INT_PRINT_DEC "/",
fedge->flow);
if (fedge->max_capacity == CAP_INFINITY)
fputs ("+oo,", file);
else
! fprintf (file, "" HOST_WIDEST_INT_PRINT_DEC ",", fedge->max_capacity);
}
if (fedge->is_rflow_valid)
--- 203,214 ----
if (fedge->type)
{
! fprintf (file, "flow/capacity=%"PRId64 "/",
fedge->flow);
if (fedge->max_capacity == CAP_INFINITY)
fputs ("+oo,", file);
else
! fprintf (file, "%"PRId64 ",", fedge->max_capacity);
}
if (fedge->is_rflow_valid)
*************** dump_fixup_edge (FILE *file, fixup_graph
*** 216,225 ****
if (fedge->rflow == CAP_INFINITY)
fputs (" rflow=+oo.", file);
else
! fprintf (file, " rflow=" HOST_WIDEST_INT_PRINT_DEC ",", fedge->rflow);
}
! fprintf (file, " cost=" HOST_WIDEST_INT_PRINT_DEC ".", fedge->cost);
fprintf (file, "\t(%d->%d)", fedge->src, fedge->dest);
--- 216,225 ----
if (fedge->rflow == CAP_INFINITY)
fputs (" rflow=+oo.", file);
else
! fprintf (file, " rflow=%"PRId64 ",", fedge->rflow);
}
! fprintf (file, " cost=%"PRId64 ".", fedge->cost);
fprintf (file, "\t(%d->%d)", fedge->src, fedge->dest);
*************** create_fixup_graph (fixup_graph_type *fi
*** 626,634 ****
if (dump_file)
{
fprintf (dump_file, "\nAdjust supply and demand:\n");
! fprintf (dump_file, "supply_value=" HOST_WIDEST_INT_PRINT_DEC "\n",
supply_value);
! fprintf (dump_file, "demand_value=" HOST_WIDEST_INT_PRINT_DEC "\n",
demand_value);
}
--- 626,634 ----
if (dump_file)
{
fprintf (dump_file, "\nAdjust supply and demand:\n");
! fprintf (dump_file, "supply_value=%"PRId64 "\n",
supply_value);
! fprintf (dump_file, "demand_value=%"PRId64 "\n",
demand_value);
}
*************** cancel_negative_cycle (fixup_graph_type
*** 898,907 ****
{
fprintf (dump_file, "%d", cycle[k]);
fprintf (dump_file,
! ": (" HOST_WIDEST_INT_PRINT_DEC ", " HOST_WIDEST_INT_PRINT_DEC
")\n", sum_cost, cycle_flow);
fprintf (dump_file,
! "Augment cycle with " HOST_WIDEST_INT_PRINT_DEC "\n",
cycle_flow);
}
--- 898,907 ----
{
fprintf (dump_file, "%d", cycle[k]);
fprintf (dump_file,
! ": (%"PRId64 ", %"PRId64
")\n", sum_cost, cycle_flow);
fprintf (dump_file,
! "Augment cycle with %"PRId64 "\n",
cycle_flow);
}
*************** find_max_flow (fixup_graph_type *fixup_g
*** 1093,1102 ****
fprintf (dump_file, "<-");
}
fprintf (dump_file,
! "ENTRY (path_capacity=" HOST_WIDEST_INT_PRINT_DEC ")\n",
increment);
fprintf (dump_file,
! "Network flow is " HOST_WIDEST_INT_PRINT_DEC ".\n",
max_flow);
}
}
--- 1093,1102 ----
fprintf (dump_file, "<-");
}
fprintf (dump_file,
! "ENTRY (path_capacity=%"PRId64 ")\n",
increment);
fprintf (dump_file,
! "Network flow is %"PRId64 ".\n",
max_flow);
}
}
*************** adjust_cfg_counts (fixup_graph_type *fix
*** 1133,1139 ****
/* Fixup BB. */
if (dump_file)
fprintf (dump_file,
! "BB%d: " HOST_WIDEST_INT_PRINT_DEC "", bb->index, bb->count);
pfedge = find_fixup_edge (fixup_graph, i, i + 1);
if (pfedge->flow)
--- 1133,1139 ----
/* Fixup BB. */
if (dump_file)
fprintf (dump_file,
! "BB%d: %"PRId64 "", bb->index, bb->count);
pfedge = find_fixup_edge (fixup_graph, i, i + 1);
if (pfedge->flow)
*************** adjust_cfg_counts (fixup_graph_type *fix
*** 1141,1147 ****
bb->count += pfedge->flow;
if (dump_file)
{
! fprintf (dump_file, " + " HOST_WIDEST_INT_PRINT_DEC "(",
pfedge->flow);
print_edge (dump_file, fixup_graph, i, i + 1);
fprintf (dump_file, ")");
--- 1141,1147 ----
bb->count += pfedge->flow;
if (dump_file)
{
! fprintf (dump_file, " + %"PRId64 "(",
pfedge->flow);
print_edge (dump_file, fixup_graph, i, i + 1);
fprintf (dump_file, ")");
*************** adjust_cfg_counts (fixup_graph_type *fix
*** 1156,1162 ****
bb->count -= pfedge_n->flow;
if (dump_file)
{
! fprintf (dump_file, " - " HOST_WIDEST_INT_PRINT_DEC "(",
pfedge_n->flow);
print_edge (dump_file, fixup_graph, i + 1,
pfedge->norm_vertex_index);
--- 1156,1162 ----
bb->count -= pfedge_n->flow;
if (dump_file)
{
! fprintf (dump_file, " - %"PRId64 "(",
pfedge_n->flow);
print_edge (dump_file, fixup_graph, i + 1,
pfedge->norm_vertex_index);
*************** adjust_cfg_counts (fixup_graph_type *fix
*** 1164,1170 ****
}
}
if (dump_file)
! fprintf (dump_file, " = " HOST_WIDEST_INT_PRINT_DEC "\n", bb->count);
/* Fixup edge. */
FOR_EACH_EDGE (e, ei, bb->succs)
--- 1164,1170 ----
}
}
if (dump_file)
! fprintf (dump_file, " = %"PRId64 "\n", bb->count);
/* Fixup edge. */
FOR_EACH_EDGE (e, ei, bb->succs)
*************** adjust_cfg_counts (fixup_graph_type *fix
*** 1175,1181 ****
j = 2 * e->dest->index;
if (dump_file)
! fprintf (dump_file, "%d->%d: " HOST_WIDEST_INT_PRINT_DEC "",
bb->index, e->dest->index, e->count);
pfedge = find_fixup_edge (fixup_graph, i + 1, j);
--- 1175,1181 ----
j = 2 * e->dest->index;
if (dump_file)
! fprintf (dump_file, "%d->%d: %"PRId64 "",
bb->index, e->dest->index, e->count);
pfedge = find_fixup_edge (fixup_graph, i + 1, j);
*************** adjust_cfg_counts (fixup_graph_type *fix
*** 1188,1194 ****
e->count += pfedge->flow;
if (dump_file)
{
! fprintf (dump_file, " + " HOST_WIDEST_INT_PRINT_DEC "(",
pfedge->flow);
print_edge (dump_file, fixup_graph, i + 1, j);
fprintf (dump_file, ")");
--- 1188,1194 ----
e->count += pfedge->flow;
if (dump_file)
{
! fprintf (dump_file, " + %"PRId64 "(",
pfedge->flow);
print_edge (dump_file, fixup_graph, i + 1, j);
fprintf (dump_file, ")");
*************** adjust_cfg_counts (fixup_graph_type *fix
*** 1203,1209 ****
e->count -= pfedge_n->flow;
if (dump_file)
{
! fprintf (dump_file, " - " HOST_WIDEST_INT_PRINT_DEC "(",
pfedge_n->flow);
print_edge (dump_file, fixup_graph, j,
pfedge->norm_vertex_index);
--- 1203,1209 ----
e->count -= pfedge_n->flow;
if (dump_file)
{
! fprintf (dump_file, " - %"PRId64 "(",
pfedge_n->flow);
print_edge (dump_file, fixup_graph, j,
pfedge->norm_vertex_index);
*************** adjust_cfg_counts (fixup_graph_type *fix
*** 1223,1229 ****
if (dump_file)
{
fprintf (dump_file, "(self edge)");
! fprintf (dump_file, " + " HOST_WIDEST_INT_PRINT_DEC "(",
pfedge_n->flow);
print_edge (dump_file, fixup_graph, i + 1,
pfedge->norm_vertex_index);
--- 1223,1229 ----
if (dump_file)
{
fprintf (dump_file, "(self edge)");
! fprintf (dump_file, " + %"PRId64 "(",
pfedge_n->flow);
print_edge (dump_file, fixup_graph, i + 1,
pfedge->norm_vertex_index);
*************** adjust_cfg_counts (fixup_graph_type *fix
*** 1234,1240 ****
if (bb->count)
e->probability = REG_BR_PROB_BASE * e->count / bb->count;
if (dump_file)
! fprintf (dump_file, " = " HOST_WIDEST_INT_PRINT_DEC "\t(%.1f%%)\n",
e->count, e->probability * 100.0 / REG_BR_PROB_BASE);
}
}
--- 1234,1240 ----
if (bb->count)
e->probability = REG_BR_PROB_BASE * e->count / bb->count;
if (dump_file)
! fprintf (dump_file, " = %"PRId64 "\t(%.1f%%)\n",
e->count, e->probability * 100.0 / REG_BR_PROB_BASE);
}
}
*************** adjust_cfg_counts (fixup_graph_type *fix
*** 1287,1300 ****
|| (bb->count != sum_edge_counts (bb->succs)))
{
fprintf (dump_file,
! "BB%d(" HOST_WIDEST_INT_PRINT_DEC ") **INVALID**: ",
bb->index, bb->count);
fprintf (stderr,
! "******** BB%d(" HOST_WIDEST_INT_PRINT_DEC
") **INVALID**: \n", bb->index, bb->count);
! fprintf (dump_file, "in_edges=" HOST_WIDEST_INT_PRINT_DEC " ",
sum_edge_counts (bb->preds));
! fprintf (dump_file, "out_edges=" HOST_WIDEST_INT_PRINT_DEC "\n",
sum_edge_counts (bb->succs));
}
}
--- 1287,1300 ----
|| (bb->count != sum_edge_counts (bb->succs)))
{
fprintf (dump_file,
! "BB%d(%"PRId64 ") **INVALID**: ",
bb->index, bb->count);
fprintf (stderr,
! "******** BB%d(%"PRId64
") **INVALID**: \n", bb->index, bb->count);
! fprintf (dump_file, "in_edges=%"PRId64 " ",
sum_edge_counts (bb->preds));
! fprintf (dump_file, "out_edges=%"PRId64 "\n",
sum_edge_counts (bb->succs));
}
}
Index: gcc/modulo-sched.c
===================================================================
*** gcc/modulo-sched.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/modulo-sched.c 2014-05-26 10:25:29.292438233 +0200
*************** doloop_register_get (rtx head ATTRIBUTE_
*** 396,402 ****
this constant. Otherwise return 0. */
static rtx
const_iteration_count (rtx count_reg, basic_block pre_header,
! HOST_WIDEST_INT * count)
{
rtx insn;
rtx head, tail;
--- 396,402 ----
this constant. Otherwise return 0. */
static rtx
const_iteration_count (rtx count_reg, basic_block pre_header,
! int64_t * count)
{
rtx insn;
rtx head, tail;
*************** sms_schedule (void)
*** 1450,1465 ****
if (profile_info && flag_branch_probabilities)
{
fprintf (dump_file, "SMS loop-count ");
! fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
! (HOST_WIDEST_INT) bb->count);
fprintf (dump_file, "\n");
fprintf (dump_file, "SMS trip-count ");
! fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
! (HOST_WIDEST_INT) trip_count);
fprintf (dump_file, "\n");
fprintf (dump_file, "SMS profile-sum-max ");
! fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
! (HOST_WIDEST_INT) profile_info->sum_max);
fprintf (dump_file, "\n");
}
}
--- 1450,1465 ----
if (profile_info && flag_branch_probabilities)
{
fprintf (dump_file, "SMS loop-count ");
! fprintf (dump_file, "%"PRId64,
! (int64_t) bb->count);
fprintf (dump_file, "\n");
fprintf (dump_file, "SMS trip-count ");
! fprintf (dump_file, "%"PRId64,
! (int64_t) trip_count);
fprintf (dump_file, "\n");
fprintf (dump_file, "SMS profile-sum-max ");
! fprintf (dump_file, "%"PRId64,
! (int64_t) profile_info->sum_max);
fprintf (dump_file, "\n");
}
}
*************** sms_schedule (void)
*** 1540,1546 ****
rtx head, tail;
rtx count_reg, count_init;
int mii, rec_mii, stage_count, min_cycle;
! HOST_WIDEST_INT loop_count = 0;
bool opt_sc_p;
if (! (g = g_arr[loop->num]))
--- 1540,1546 ----
rtx head, tail;
rtx count_reg, count_init;
int mii, rec_mii, stage_count, min_cycle;
! int64_t loop_count = 0;
bool opt_sc_p;
if (! (g = g_arr[loop->num]))
*************** sms_schedule (void)
*** 1571,1582 ****
if (profile_info && flag_branch_probabilities)
{
fprintf (dump_file, "SMS loop-count ");
! fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
! (HOST_WIDEST_INT) bb->count);
fprintf (dump_file, "\n");
fprintf (dump_file, "SMS profile-sum-max ");
! fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
! (HOST_WIDEST_INT) profile_info->sum_max);
fprintf (dump_file, "\n");
}
fprintf (dump_file, "SMS doloop\n");
--- 1571,1582 ----
if (profile_info && flag_branch_probabilities)
{
fprintf (dump_file, "SMS loop-count ");
! fprintf (dump_file, "%"PRId64,
! (int64_t) bb->count);
fprintf (dump_file, "\n");
fprintf (dump_file, "SMS profile-sum-max ");
! fprintf (dump_file, "%"PRId64,
! (int64_t) profile_info->sum_max);
fprintf (dump_file, "\n");
}
fprintf (dump_file, "SMS doloop\n");
*************** sms_schedule (void)
*** 1602,1608 ****
if (dump_file && count_init)
{
fprintf (dump_file, "SMS const-doloop ");
! fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
loop_count);
fprintf (dump_file, "\n");
}
--- 1602,1608 ----
if (dump_file && count_init)
{
fprintf (dump_file, "SMS const-doloop ");
! fprintf (dump_file, "%"PRId64,
loop_count);
fprintf (dump_file, "\n");
}
*************** sms_schedule (void)
*** 1663,1671 ****
fprintf (dump_file, "SMS failed... \n");
fprintf (dump_file, "SMS sched-failed (stage-count=%d,"
" loop-count=", stage_count);
! fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC, loop_count);
fprintf (dump_file, ", trip-count=");
! fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC, trip_count);
fprintf (dump_file, ")\n");
}
break;
--- 1663,1671 ----
fprintf (dump_file, "SMS failed... \n");
fprintf (dump_file, "SMS sched-failed (stage-count=%d,"
" loop-count=", stage_count);
! fprintf (dump_file, "%"PRId64, loop_count);
fprintf (dump_file, ", trip-count=");
! fprintf (dump_file, "%"PRId64, trip_count);
fprintf (dump_file, ")\n");
}
break;
Index: gcc/predict.c
===================================================================
*** gcc/predict.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/predict.c 2014-05-26 10:25:29.293438233 +0200
*************** dump_prediction (FILE *file, enum br_pre
*** 739,750 ****
if (bb->count)
{
! fprintf (file, " exec ");
! fprintf (file, HOST_WIDEST_INT_PRINT_DEC, bb->count);
if (e)
{
! fprintf (file, " hit ");
! fprintf (file, HOST_WIDEST_INT_PRINT_DEC, e->count);
fprintf (file, " (%.1f%%)", e->count * 100.0 / bb->count);
}
}
--- 739,748 ----
if (bb->count)
{
! fprintf (file, " exec %"PRId64, bb->count);
if (e)
{
! fprintf (file, " hit %"PRId64, e->count);
fprintf (file, " (%.1f%%)", e->count * 100.0 / bb->count);
}
}
Index: gcc/pretty-print.h
===================================================================
*** gcc/pretty-print.h.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/pretty-print.h 2014-05-26 10:25:29.293438233 +0200
*************** pp_get_prefix (const pretty_printer *pp)
*** 271,278 ****
while (0)
#define pp_wide_integer(PP, I) \
pp_scalar (PP, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT) I)
- #define pp_widest_integer(PP, I) \
- pp_scalar (PP, HOST_WIDEST_INT_PRINT_DEC, (HOST_WIDEST_INT) I)
#define pp_pointer(PP, P) pp_scalar (PP, "%p", P)
#define pp_identifier(PP, ID) pp_string (PP, (pp_translate_identifiers (PP) \
--- 271,276 ----
Index: gcc/profile.c
===================================================================
*** gcc/profile.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/profile.c 2014-05-26 10:25:29.293438233 +0200
*************** get_working_sets (void)
*** 237,246 ****
ws_info = &gcov_working_sets[ws_ix];
/* Print out the percentage using int arithmatic to avoid float. */
fprintf (dump_file, "\t\t%u.%02u%%: num counts=%u, min counter="
! HOST_WIDEST_INT_PRINT_DEC "\n",
pct / 100, pct - (pct / 100 * 100),
ws_info->num_counters,
! (HOST_WIDEST_INT)ws_info->min_counter);
}
}
}
--- 237,246 ----
ws_info = &gcov_working_sets[ws_ix];
/* Print out the percentage using int arithmatic to avoid float. */
fprintf (dump_file, "\t\t%u.%02u%%: num counts=%u, min counter="
! "%"PRId64 "\n",
pct / 100, pct - (pct / 100 * 100),
ws_info->num_counters,
! (int64_t)ws_info->min_counter);
}
}
}
*************** is_edge_inconsistent (vec<edge, va_gc> *
*** 318,324 ****
if (dump_file)
{
fprintf (dump_file,
! "Edge %i->%i is inconsistent, count"HOST_WIDEST_INT_PRINT_DEC,
e->src->index, e->dest->index, e->count);
dump_bb (dump_file, e->src, 0, TDF_DETAILS);
dump_bb (dump_file, e->dest, 0, TDF_DETAILS);
--- 318,324 ----
if (dump_file)
{
fprintf (dump_file,
! "Edge %i->%i is inconsistent, count%"PRId64,
e->src->index, e->dest->index, e->count);
dump_bb (dump_file, e->src, 0, TDF_DETAILS);
dump_bb (dump_file, e->dest, 0, TDF_DETAILS);
*************** is_inconsistent (void)
*** 367,373 ****
if (dump_file)
{
fprintf (dump_file, "BB %i count is negative "
! HOST_WIDEST_INT_PRINT_DEC,
bb->index,
bb->count);
dump_bb (dump_file, bb, 0, TDF_DETAILS);
--- 367,373 ----
if (dump_file)
{
fprintf (dump_file, "BB %i count is negative "
! "%"PRId64,
bb->index,
bb->count);
dump_bb (dump_file, bb, 0, TDF_DETAILS);
*************** is_inconsistent (void)
*** 379,385 ****
if (dump_file)
{
fprintf (dump_file, "BB %i count does not match sum of incoming edges "
! HOST_WIDEST_INT_PRINT_DEC" should be " HOST_WIDEST_INT_PRINT_DEC,
bb->index,
bb->count,
sum_edge_counts (bb->preds));
--- 379,385 ----
if (dump_file)
{
fprintf (dump_file, "BB %i count does not match sum of incoming edges "
! "%"PRId64" should be %"PRId64,
bb->index,
bb->count,
sum_edge_counts (bb->preds));
*************** is_inconsistent (void)
*** 394,400 ****
if (dump_file)
{
fprintf (dump_file, "BB %i count does not match sum of outgoing edges "
! HOST_WIDEST_INT_PRINT_DEC" should be " HOST_WIDEST_INT_PRINT_DEC,
bb->index,
bb->count,
sum_edge_counts (bb->succs));
--- 394,400 ----
if (dump_file)
{
fprintf (dump_file, "BB %i count does not match sum of outgoing edges "
! "%"PRId64" should be %"PRId64,
bb->index,
bb->count,
sum_edge_counts (bb->succs));
*************** read_profile_edge_counts (gcov_type *exe
*** 471,478 ****
{
fprintf (dump_file, "\nRead edge from %i to %i, count:",
bb->index, e->dest->index);
! fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
! (HOST_WIDEST_INT) e->count);
}
}
}
--- 471,478 ----
{
fprintf (dump_file, "\nRead edge from %i to %i, count:",
bb->index, e->dest->index);
! fprintf (dump_file, "%"PRId64,
! (int64_t) e->count);
}
}
}
Index: gcc/system.h
===================================================================
*** gcc/system.h.orig 2014-05-26 10:25:23.082438661 +0200
--- gcc/system.h 2014-05-26 10:25:29.294438233 +0200
*************** extern void *realloc (void *, size_t);
*** 491,496 ****
--- 491,497 ----
#endif
#ifdef HAVE_INTTYPES_H
+ #define __STDC_FORMAT_MACROS
#include <inttypes.h>
#endif
*************** helper_const_non_const_cast (const char
*** 1070,1076 ****
#define DEBUG_VARIABLE
#endif
! /* Get definitions of HOST_WIDE_INT and HOST_WIDEST_INT. */
#include "hwint.h"
#endif /* ! GCC_SYSTEM_H */
--- 1071,1077 ----
#define DEBUG_VARIABLE
#endif
! /* Get definitions of HOST_WIDE_INT. */
#include "hwint.h"
#endif /* ! GCC_SYSTEM_H */
Index: gcc/tree-pretty-print.c
===================================================================
*** gcc/tree-pretty-print.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/tree-pretty-print.c 2014-05-26 10:25:29.294438233 +0200
*************** pp_double_int (pretty_printer *pp, doubl
*** 3489,3500 ****
pp_wide_integer (pp, d.low);
else if (d.fits_uhwi ())
pp_unsigned_wide_integer (pp, d.low);
- else if (HOST_BITS_PER_DOUBLE_INT == HOST_BITS_PER_WIDEST_INT)
- pp_scalar (pp,
- uns
- ? HOST_WIDEST_INT_PRINT_UNSIGNED : HOST_WIDEST_INT_PRINT_DEC,
- (HOST_WIDEST_INT) ((((unsigned HOST_WIDEST_INT) d.high << 1)
- << (HOST_BITS_PER_WIDE_INT - 1)) | d.low));
else
{
unsigned HOST_WIDE_INT low = d.low;
--- 3489,3494 ----
Index: gcc/tree-ssa-math-opts.c
===================================================================
*** gcc/tree-ssa-math-opts.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/tree-ssa-math-opts.c 2014-05-26 10:25:29.295438233 +0200
*************** make_pass_cse_sincos (gcc::context *ctxt
*** 1620,1626 ****
still have a size of 2 but this time a range of 1. */
struct symbolic_number {
! unsigned HOST_WIDEST_INT n;
int size;
tree base_addr;
tree offset;
--- 1620,1626 ----
still have a size of 2 but this time a range of 1. */
struct symbolic_number {
! uint64_t n;
int size;
tree base_addr;
tree offset;
*************** struct symbolic_number {
*** 1633,1646 ****
/* The number which the find_bswap_or_nop_1 result should match in
order to have a nop. The number is masked according to the size of
the symbolic number before using it. */
! #define CMPNOP (sizeof (HOST_WIDEST_INT) < 8 ? 0 : \
! (unsigned HOST_WIDEST_INT)0x08070605 << 32 | 0x04030201)
/* The number which the find_bswap_or_nop_1 result should match in
order to have a byte swap. The number is masked according to the
size of the symbolic number before using it. */
! #define CMPXCHG (sizeof (HOST_WIDEST_INT) < 8 ? 0 : \
! (unsigned HOST_WIDEST_INT)0x01020304 << 32 | 0x05060708)
/* Perform a SHIFT or ROTATE operation by COUNT bits on symbolic
number N. Return false if the requested operation is not permitted
--- 1633,1646 ----
/* The number which the find_bswap_or_nop_1 result should match in
order to have a nop. The number is masked according to the size of
the symbolic number before using it. */
! #define CMPNOP (sizeof (int64_t) < 8 ? 0 : \
! (uint64_t)0x08070605 << 32 | 0x04030201)
/* The number which the find_bswap_or_nop_1 result should match in
order to have a byte swap. The number is masked according to the
size of the symbolic number before using it. */
! #define CMPXCHG (sizeof (int64_t) < 8 ? 0 : \
! (uint64_t)0x01020304 << 32 | 0x05060708)
/* Perform a SHIFT or ROTATE operation by COUNT bits on symbolic
number N. Return false if the requested operation is not permitted
*************** do_shift_rotate (enum tree_code code,
*** 1656,1663 ****
/* Zero out the extra bits of N in order to avoid them being shifted
into the significant bits. */
! if (n->size < (int)sizeof (HOST_WIDEST_INT))
! n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
switch (code)
{
--- 1656,1663 ----
/* Zero out the extra bits of N in order to avoid them being shifted
into the significant bits. */
! if (n->size < (int)sizeof (int64_t))
! n->n &= ((uint64_t)1 << (n->size * BITS_PER_UNIT)) - 1;
switch (code)
{
*************** do_shift_rotate (enum tree_code code,
*** 1677,1684 ****
return false;
}
/* Zero unused bits for size. */
! if (n->size < (int)sizeof (HOST_WIDEST_INT))
! n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
return true;
}
--- 1677,1684 ----
return false;
}
/* Zero unused bits for size. */
! if (n->size < (int)sizeof (int64_t))
! n->n &= ((uint64_t)1 << (n->size * BITS_PER_UNIT)) - 1;
return true;
}
*************** find_bswap_or_nop_1 (gimple stmt, struct
*** 1829,1836 ****
n->range = n->size;
n->n = CMPNOP;
! if (n->size < (int)sizeof (HOST_WIDEST_INT))
! n->n &= ((unsigned HOST_WIDEST_INT)1 <<
(n->size * BITS_PER_UNIT)) - 1;
if (!source_expr1)
--- 1829,1836 ----
n->range = n->size;
n->n = CMPNOP;
! if (n->size < (int)sizeof (int64_t))
! n->n &= ((uint64_t)1 <<
(n->size * BITS_PER_UNIT)) - 1;
if (!source_expr1)
*************** find_bswap_or_nop_1 (gimple stmt, struct
*** 1845,1852 ****
case BIT_AND_EXPR:
{
int i;
! unsigned HOST_WIDEST_INT val = widest_int_cst_value (rhs2);
! unsigned HOST_WIDEST_INT tmp = val;
/* Only constants masking full bytes are allowed. */
for (i = 0; i < n->size; i++, tmp >>= BITS_PER_UNIT)
--- 1845,1852 ----
case BIT_AND_EXPR:
{
int i;
! uint64_t val = int_cst_value (rhs2);
! uint64_t tmp = val;
/* Only constants masking full bytes are allowed. */
for (i = 0; i < n->size; i++, tmp >>= BITS_PER_UNIT)
*************** find_bswap_or_nop_1 (gimple stmt, struct
*** 1871,1881 ****
if (type_size % BITS_PER_UNIT != 0)
return NULL_TREE;
! if (type_size / BITS_PER_UNIT < (int)(sizeof (HOST_WIDEST_INT)))
{
/* If STMT casts to a smaller type mask out the bits not
belonging to the target type. */
! n->n &= ((unsigned HOST_WIDEST_INT)1 << type_size) - 1;
}
n->size = type_size / BITS_PER_UNIT;
if (!n->base_addr)
--- 1871,1881 ----
if (type_size % BITS_PER_UNIT != 0)
return NULL_TREE;
! if (type_size / BITS_PER_UNIT < (int)(sizeof (int64_t)))
{
/* If STMT casts to a smaller type mask out the bits not
belonging to the target type. */
! n->n &= ((uint64_t)1 << type_size) - 1;
}
n->size = type_size / BITS_PER_UNIT;
if (!n->base_addr)
*************** find_bswap_or_nop_1 (gimple stmt, struct
*** 1894,1900 ****
{
int i;
struct symbolic_number n1, n2;
! unsigned HOST_WIDEST_INT mask;
tree source_expr2;
if (code != BIT_IOR_EXPR)
--- 1894,1900 ----
{
int i;
struct symbolic_number n1, n2;
! uint64_t mask;
tree source_expr2;
if (code != BIT_IOR_EXPR)
*************** find_bswap_or_nop_1 (gimple stmt, struct
*** 1924,1930 ****
if (source_expr1 != source_expr2)
{
! HOST_WIDEST_INT inc, mask;
unsigned i;
HOST_WIDE_INT off_sub;
struct symbolic_number *n_ptr;
--- 1924,1930 ----
if (source_expr1 != source_expr2)
{
! int64_t inc, mask;
unsigned i;
HOST_WIDE_INT off_sub;
struct symbolic_number *n_ptr;
*************** find_bswap_or_nop_1 (gimple stmt, struct
*** 1950,1956 ****
off_sub = n2.bytepos - n1.bytepos;
/* Check that the range of memory covered < biggest int size. */
! if (off_sub + n2.range > (int) sizeof (HOST_WIDEST_INT))
return NULL_TREE;
n->range = n2.range + off_sub;
--- 1950,1956 ----
off_sub = n2.bytepos - n1.bytepos;
/* Check that the range of memory covered < biggest int size. */
! if (off_sub + n2.range > (int) sizeof (int64_t))
return NULL_TREE;
n->range = n2.range + off_sub;
*************** find_bswap_or_nop_1 (gimple stmt, struct
*** 1962,1968 ****
n_ptr = &n1;
else
n_ptr = &n2;
! for (i = 0; i < sizeof (HOST_WIDEST_INT); i++, inc <<= 8,
mask <<= 8)
{
if (n_ptr->n & mask)
--- 1962,1968 ----
n_ptr = &n1;
else
n_ptr = &n2;
! for (i = 0; i < sizeof (int64_t); i++, inc <<= 8,
mask <<= 8)
{
if (n_ptr->n & mask)
*************** find_bswap_or_nop_1 (gimple stmt, struct
*** 1984,1990 ****
n->size = n1.size;
for (i = 0, mask = 0xff; i < n->size; i++, mask <<= BITS_PER_UNIT)
{
! unsigned HOST_WIDEST_INT masked1, masked2;
masked1 = n1.n & mask;
masked2 = n2.n & mask;
--- 1984,1990 ----
n->size = n1.size;
for (i = 0, mask = 0xff; i < n->size; i++, mask <<= BITS_PER_UNIT)
{
! uint64_t masked1, masked2;
masked1 = n1.n & mask;
masked2 = n2.n & mask;
*************** find_bswap_or_nop (gimple stmt, struct s
*** 2018,2025 ****
/* The number which the find_bswap_or_nop_1 result should match in order
to have a full byte swap. The number is shifted to the right
according to the size of the symbolic number before using it. */
! unsigned HOST_WIDEST_INT cmpxchg = CMPXCHG;
! unsigned HOST_WIDEST_INT cmpnop = CMPNOP;
tree source_expr;
int limit;
--- 2018,2025 ----
/* The number which the find_bswap_or_nop_1 result should match in order
to have a full byte swap. The number is shifted to the right
according to the size of the symbolic number before using it. */
! uint64_t cmpxchg = CMPXCHG;
! uint64_t cmpnop = CMPNOP;
tree source_expr;
int limit;
*************** find_bswap_or_nop (gimple stmt, struct s
*** 2040,2058 ****
if (n->base_addr)
{
int rsize;
! unsigned HOST_WIDEST_INT tmpn;
for (tmpn = n->n, rsize = 0; tmpn; tmpn >>= BITS_PER_UNIT, rsize++);
n->range = rsize;
}
/* Zero out the extra bits of N and CMP*. */
! if (n->range < (int)sizeof (HOST_WIDEST_INT))
{
! unsigned HOST_WIDEST_INT mask;
! mask = ((unsigned HOST_WIDEST_INT)1 << (n->range * BITS_PER_UNIT)) - 1;
! cmpxchg >>= (sizeof (HOST_WIDEST_INT) - n->range) * BITS_PER_UNIT;
cmpnop &= mask;
}
--- 2040,2058 ----
if (n->base_addr)
{
int rsize;
! uint64_t tmpn;
for (tmpn = n->n, rsize = 0; tmpn; tmpn >>= BITS_PER_UNIT, rsize++);
n->range = rsize;
}
/* Zero out the extra bits of N and CMP*. */
! if (n->range < (int)sizeof (int64_t))
{
! uint64_t mask;
! mask = ((uint64_t)1 << (n->range * BITS_PER_UNIT)) - 1;
! cmpxchg >>= (sizeof (int64_t) - n->range) * BITS_PER_UNIT;
cmpnop &= mask;
}
*************** pass_optimize_bswap::execute (function *
*** 2268,2276 ****
if (BITS_PER_UNIT != 8)
return 0;
- if (sizeof (HOST_WIDEST_INT) < 8)
- return 0;
-
bswap16_p = (builtin_decl_explicit_p (BUILT_IN_BSWAP16)
&& optab_handler (bswap_optab, HImode) != CODE_FOR_nothing);
bswap32_p = (builtin_decl_explicit_p (BUILT_IN_BSWAP32)
--- 2268,2273 ----
Index: gcc/tree-streamer-in.c
===================================================================
*** gcc/tree-streamer-in.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/tree-streamer-in.c 2014-05-26 10:25:29.295438233 +0200
*************** streamer_alloc_tree (struct lto_input_bl
*** 568,574 ****
enum tree_code code;
tree result;
#ifdef LTO_STREAMER_DEBUG
! HOST_WIDEST_INT orig_address_in_writer;
#endif
result = NULL_TREE;
--- 568,574 ----
enum tree_code code;
tree result;
#ifdef LTO_STREAMER_DEBUG
! HOST_WIDE_INT orig_address_in_writer;
#endif
result = NULL_TREE;
Index: gcc/tree-streamer-out.c
===================================================================
*** gcc/tree-streamer-out.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/tree-streamer-out.c 2014-05-26 10:25:29.295438233 +0200
*************** streamer_write_tree_header (struct outpu
*** 990,997 ****
and the writer do not agree on a streamed node, the pointer
value for EXPR can be used to track down the differences in
the debugger. */
! gcc_assert ((HOST_WIDEST_INT) (intptr_t) expr == (intptr_t) expr);
! streamer_write_hwi (ob, (HOST_WIDEST_INT) (intptr_t) expr);
#endif
/* The text in strings and identifiers are completely emitted in
--- 990,997 ----
and the writer do not agree on a streamed node, the pointer
value for EXPR can be used to track down the differences in
the debugger. */
! gcc_assert ((HOST_WIDE_INT) (intptr_t) expr == (intptr_t) expr);
! streamer_write_hwi (ob, (HOST_WIDE_INT) (intptr_t) expr);
#endif
/* The text in strings and identifiers are completely emitted in
Index: gcc/tree.c
===================================================================
*** gcc/tree.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/tree.c 2014-05-26 10:25:29.297438233 +0200
*************** int_cst_value (const_tree x)
*** 10481,10520 ****
return val;
}
- /* Return value of a constant X and sign-extend it. */
-
- HOST_WIDEST_INT
- widest_int_cst_value (const_tree x)
- {
- unsigned bits = TYPE_PRECISION (TREE_TYPE (x));
- unsigned HOST_WIDEST_INT val = TREE_INT_CST_LOW (x);
-
- #if HOST_BITS_PER_WIDEST_INT > HOST_BITS_PER_WIDE_INT
- gcc_assert (HOST_BITS_PER_WIDEST_INT >= HOST_BITS_PER_DOUBLE_INT);
- gcc_assert (TREE_INT_CST_NUNITS (x) == 2);
-
- if (TREE_INT_CST_NUNITS (x) == 1)
- val = HOST_WIDE_INT (val);
- else
- val |= (((unsigned HOST_WIDEST_INT) TREE_INT_CST_ELT (x, 1))
- << HOST_BITS_PER_WIDE_INT);
- #else
- /* Make sure the sign-extended value will fit in a HOST_WIDE_INT. */
- gcc_assert (TREE_INT_CST_NUNITS (x) == 1);
- #endif
-
- if (bits < HOST_BITS_PER_WIDEST_INT)
- {
- bool negative = ((val >> (bits - 1)) & 1) != 0;
- if (negative)
- val |= (~(unsigned HOST_WIDEST_INT) 0) << (bits - 1) << 1;
- else
- val &= ~((~(unsigned HOST_WIDEST_INT) 0) << (bits - 1) << 1);
- }
-
- return val;
- }
-
/* If TYPE is an integral or pointer type, return an integer type with
the same precision which is unsigned iff UNSIGNEDP is true, or itself
if TYPE is already an integer type of signedness UNSIGNEDP. */
--- 10481,10486 ----
Index: gcc/tree.h
===================================================================
*** gcc/tree.h.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/tree.h 2014-05-26 10:25:29.297438233 +0200
*************** extern tree build_range_type (tree, tree
*** 4270,4276 ****
extern tree build_nonshared_range_type (tree, tree, tree);
extern bool subrange_type_for_debug_p (const_tree, tree *, tree *);
extern HOST_WIDE_INT int_cst_value (const_tree);
- extern HOST_WIDEST_INT widest_int_cst_value (const_tree);
extern tree tree_block (tree);
extern void tree_set_block (tree, tree);
extern location_t *block_nonartificial_location (tree);
--- 4270,4275 ----
Index: gcc/value-prof.c
===================================================================
*** gcc/value-prof.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/value-prof.c 2014-05-26 10:25:29.298438233 +0200
*************** dump_histogram_value (FILE *dump_file, h
*** 266,276 ****
unsigned int i;
fprintf (dump_file, " [");
for (i = 0; i < hist->hdata.intvl.steps; i++)
! fprintf (dump_file, " %d:"HOST_WIDEST_INT_PRINT_DEC,
hist->hdata.intvl.int_start + i,
! (HOST_WIDEST_INT) hist->hvalue.counters[i]);
! fprintf (dump_file, " ] outside range:"HOST_WIDEST_INT_PRINT_DEC,
! (HOST_WIDEST_INT) hist->hvalue.counters[i]);
}
fprintf (dump_file, ".\n");
break;
--- 266,276 ----
unsigned int i;
fprintf (dump_file, " [");
for (i = 0; i < hist->hdata.intvl.steps; i++)
! fprintf (dump_file, " %d:%"PRId64,
hist->hdata.intvl.int_start + i,
! (int64_t) hist->hvalue.counters[i]);
! fprintf (dump_file, " ] outside range:%"PRId64,
! (int64_t) hist->hvalue.counters[i]);
}
fprintf (dump_file, ".\n");
break;
*************** dump_histogram_value (FILE *dump_file, h
*** 279,288 ****
fprintf (dump_file, "Pow2 counter ");
if (hist->hvalue.counters)
{
! fprintf (dump_file, "pow2:"HOST_WIDEST_INT_PRINT_DEC
! " nonpow2:"HOST_WIDEST_INT_PRINT_DEC,
! (HOST_WIDEST_INT) hist->hvalue.counters[0],
! (HOST_WIDEST_INT) hist->hvalue.counters[1]);
}
fprintf (dump_file, ".\n");
break;
--- 279,288 ----
fprintf (dump_file, "Pow2 counter ");
if (hist->hvalue.counters)
{
! fprintf (dump_file, "pow2:%"PRId64
! " nonpow2:%"PRId64,
! (int64_t) hist->hvalue.counters[0],
! (int64_t) hist->hvalue.counters[1]);
}
fprintf (dump_file, ".\n");
break;
*************** dump_histogram_value (FILE *dump_file, h
*** 291,302 ****
fprintf (dump_file, "Single value ");
if (hist->hvalue.counters)
{
! fprintf (dump_file, "value:"HOST_WIDEST_INT_PRINT_DEC
! " match:"HOST_WIDEST_INT_PRINT_DEC
! " wrong:"HOST_WIDEST_INT_PRINT_DEC,
! (HOST_WIDEST_INT) hist->hvalue.counters[0],
! (HOST_WIDEST_INT) hist->hvalue.counters[1],
! (HOST_WIDEST_INT) hist->hvalue.counters[2]);
}
fprintf (dump_file, ".\n");
break;
--- 291,302 ----
fprintf (dump_file, "Single value ");
if (hist->hvalue.counters)
{
! fprintf (dump_file, "value:%"PRId64
! " match:%"PRId64
! " wrong:%"PRId64,
! (int64_t) hist->hvalue.counters[0],
! (int64_t) hist->hvalue.counters[1],
! (int64_t) hist->hvalue.counters[2]);
}
fprintf (dump_file, ".\n");
break;
*************** dump_histogram_value (FILE *dump_file, h
*** 305,314 ****
fprintf (dump_file, "Average value ");
if (hist->hvalue.counters)
{
! fprintf (dump_file, "sum:"HOST_WIDEST_INT_PRINT_DEC
! " times:"HOST_WIDEST_INT_PRINT_DEC,
! (HOST_WIDEST_INT) hist->hvalue.counters[0],
! (HOST_WIDEST_INT) hist->hvalue.counters[1]);
}
fprintf (dump_file, ".\n");
break;
--- 305,314 ----
fprintf (dump_file, "Average value ");
if (hist->hvalue.counters)
{
! fprintf (dump_file, "sum:%"PRId64
! " times:%"PRId64,
! (int64_t) hist->hvalue.counters[0],
! (int64_t) hist->hvalue.counters[1]);
}
fprintf (dump_file, ".\n");
break;
*************** dump_histogram_value (FILE *dump_file, h
*** 317,324 ****
fprintf (dump_file, "IOR value ");
if (hist->hvalue.counters)
{
! fprintf (dump_file, "ior:"HOST_WIDEST_INT_PRINT_DEC,
! (HOST_WIDEST_INT) hist->hvalue.counters[0]);
}
fprintf (dump_file, ".\n");
break;
--- 317,324 ----
fprintf (dump_file, "IOR value ");
if (hist->hvalue.counters)
{
! fprintf (dump_file, "ior:%"PRId64,
! (int64_t) hist->hvalue.counters[0]);
}
fprintf (dump_file, ".\n");
break;
*************** dump_histogram_value (FILE *dump_file, h
*** 327,338 ****
fprintf (dump_file, "Constant delta ");
if (hist->hvalue.counters)
{
! fprintf (dump_file, "value:"HOST_WIDEST_INT_PRINT_DEC
! " match:"HOST_WIDEST_INT_PRINT_DEC
! " wrong:"HOST_WIDEST_INT_PRINT_DEC,
! (HOST_WIDEST_INT) hist->hvalue.counters[0],
! (HOST_WIDEST_INT) hist->hvalue.counters[1],
! (HOST_WIDEST_INT) hist->hvalue.counters[2]);
}
fprintf (dump_file, ".\n");
break;
--- 327,338 ----
fprintf (dump_file, "Constant delta ");
if (hist->hvalue.counters)
{
! fprintf (dump_file, "value:%"PRId64
! " match:%"PRId64
! " wrong:%"PRId64,
! (int64_t) hist->hvalue.counters[0],
! (int64_t) hist->hvalue.counters[1],
! (int64_t) hist->hvalue.counters[2]);
}
fprintf (dump_file, ".\n");
break;
*************** dump_histogram_value (FILE *dump_file, h
*** 340,351 ****
fprintf (dump_file, "Indirect call ");
if (hist->hvalue.counters)
{
! fprintf (dump_file, "value:"HOST_WIDEST_INT_PRINT_DEC
! " match:"HOST_WIDEST_INT_PRINT_DEC
! " all:"HOST_WIDEST_INT_PRINT_DEC,
! (HOST_WIDEST_INT) hist->hvalue.counters[0],
! (HOST_WIDEST_INT) hist->hvalue.counters[1],
! (HOST_WIDEST_INT) hist->hvalue.counters[2]);
}
fprintf (dump_file, ".\n");
break;
--- 340,351 ----
fprintf (dump_file, "Indirect call ");
if (hist->hvalue.counters)
{
! fprintf (dump_file, "value:%"PRId64
! " match:%"PRId64
! " all:%"PRId64,
! (int64_t) hist->hvalue.counters[0],
! (int64_t) hist->hvalue.counters[1],
! (int64_t) hist->hvalue.counters[2]);
}
fprintf (dump_file, ".\n");
break;
*************** dump_histogram_value (FILE *dump_file, h
*** 353,360 ****
fprintf (dump_file, "Time profile ");
if (hist->hvalue.counters)
{
! fprintf (dump_file, "time:"HOST_WIDEST_INT_PRINT_DEC,
! (HOST_WIDEST_INT) hist->hvalue.counters[0]);
}
fprintf (dump_file, ".\n");
break;
--- 353,360 ----
fprintf (dump_file, "Time profile ");
if (hist->hvalue.counters)
{
! fprintf (dump_file, "time:%"PRId64,
! (int64_t) hist->hvalue.counters[0]);
}
fprintf (dump_file, ".\n");
break;
*************** gimple_ic_transform (gimple_stmt_iterato
*** 1541,1548 ****
print_generic_expr (dump_file, direct_call->decl, TDF_SLIM);
fprintf (dump_file, " transformation on insn postponned to ipa-profile");
print_gimple_stmt (dump_file, stmt, 0, TDF_SLIM);
! fprintf (dump_file, "hist->count "HOST_WIDEST_INT_PRINT_DEC
! " hist->all "HOST_WIDEST_INT_PRINT_DEC"\n", count, all);
}
return true;
--- 1541,1548 ----
print_generic_expr (dump_file, direct_call->decl, TDF_SLIM);
fprintf (dump_file, " transformation on insn postponned to ipa-profile");
print_gimple_stmt (dump_file, stmt, 0, TDF_SLIM);
! fprintf (dump_file, "hist->count %"PRId64
! " hist->all %"PRId64"\n", count, all);
}
return true;
Index: gcc/gengtype.c
===================================================================
*** gcc/gengtype.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/gengtype.c 2014-05-26 10:25:29.299438233 +0200
*************** main (int argc, char **argv)
*** 5582,5587 ****
--- 5582,5588 ----
POS_HERE (do_scalar_typedef ("double_int", &pos));
POS_HERE (do_scalar_typedef ("offset_int", &pos));
POS_HERE (do_scalar_typedef ("widest_int", &pos));
+ POS_HERE (do_scalar_typedef ("int64_t", &pos));
POS_HERE (do_scalar_typedef ("uint64_t", &pos));
POS_HERE (do_scalar_typedef ("uint8", &pos));
POS_HERE (do_scalar_typedef ("uintptr_t", &pos));
Index: gcc/ggc-page.c
===================================================================
*** gcc/ggc-page.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/ggc-page.c 2014-05-26 10:25:29.299438233 +0200
*************** along with GCC; see the file COPYING3.
*** 156,162 ****
struct max_alignment {
char c;
union {
! HOST_WIDEST_INT i;
void *p;
} u;
};
--- 156,162 ----
struct max_alignment {
char c;
union {
! int64_t i;
void *p;
} u;
};
Index: gcc/alloc-pool.c
===================================================================
*** gcc/alloc-pool.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/alloc-pool.c 2014-05-26 10:25:29.299438233 +0200
*************** typedef struct allocation_object_def
*** 43,49 ****
the allocated object may be even smaller than this structure.
We do not care about alignment for floating-point types. */
char *align_p;
! HOST_WIDEST_INT align_i;
} u;
} allocation_object;
--- 43,49 ----
the allocated object may be even smaller than this structure.
We do not care about alignment for floating-point types. */
char *align_p;
! int64_t align_i;
} u;
} allocation_object;
Index: gcc/config/mmix/mmix-protos.h
===================================================================
*** gcc/config/mmix/mmix-protos.h.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/config/mmix/mmix-protos.h 2014-05-26 10:25:29.299438233 +0200
*************** extern void mmix_asm_output_reg_push (FI
*** 39,47 ****
extern void mmix_asm_output_reg_pop (FILE *, int);
extern void mmix_asm_output_skip (FILE *, int);
extern void mmix_asm_output_align (FILE *, int);
! extern HOST_WIDEST_INT mmix_intval (const_rtx);
! extern int mmix_shiftable_wyde_value (unsigned HOST_WIDEST_INT);
! extern void mmix_output_register_setting (FILE *, int, HOST_WIDEST_INT, int);
extern int mmix_opposite_regno (int, int);
extern int mmix_local_regno (int);
extern unsigned mmix_dbx_register_number (unsigned);
--- 39,47 ----
extern void mmix_asm_output_reg_pop (FILE *, int);
extern void mmix_asm_output_skip (FILE *, int);
extern void mmix_asm_output_align (FILE *, int);
! extern int64_t mmix_intval (const_rtx);
! extern int mmix_shiftable_wyde_value (uint64_t);
! extern void mmix_output_register_setting (FILE *, int, int64_t, int);
extern int mmix_opposite_regno (int, int);
extern int mmix_local_regno (int);
extern unsigned mmix_dbx_register_number (unsigned);
Index: gcc/config/sh/sh.c
===================================================================
*** gcc/config/sh/sh.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/config/sh/sh.c 2014-05-26 10:25:29.301438233 +0200
*************** expand_cbranchdi4 (rtx *operands, enum r
*** 2088,2099 ****
lsw_taken_prob = prob ? REG_BR_PROB_BASE : 0;
else
{
- gcc_assert (HOST_BITS_PER_WIDEST_INT >= 64);
lsw_taken_prob
= (prob
? (REG_BR_PROB_BASE
! - ((HOST_WIDEST_INT) REG_BR_PROB_BASE * rev_prob
! / ((HOST_WIDEST_INT) prob << 32)))
: 0);
}
}
--- 2088,2098 ----
lsw_taken_prob = prob ? REG_BR_PROB_BASE : 0;
else
{
lsw_taken_prob
= (prob
? (REG_BR_PROB_BASE
! - ((gcov_type) REG_BR_PROB_BASE * rev_prob
! / ((gcov_type) prob << 32)))
: 0);
}
}
Index: gcc/doc/tm.texi
===================================================================
*** gcc/doc/tm.texi.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/doc/tm.texi 2014-05-26 10:25:29.303438233 +0200
*************** the default value is @code{BIGGEST_ALIGN
*** 1057,1063 ****
On systems that use ELF, the default (in @file{config/elfos.h}) is
the largest supported 32-bit ELF section alignment representable on
! a 32-bit host e.g. @samp{(((unsigned HOST_WIDEST_INT) 1 << 28) * 8)}.
On 32-bit ELF the largest supported section alignment in bits is
@samp{(0x80000000 * 8)}, but this is not representable on 32-bit hosts.
@end defmac
--- 1057,1063 ----
On systems that use ELF, the default (in @file{config/elfos.h}) is
the largest supported 32-bit ELF section alignment representable on
! a 32-bit host e.g. @samp{(((uint64_t) 1 << 28) * 8)}.
On 32-bit ELF the largest supported section alignment in bits is
@samp{(0x80000000 * 8)}, but this is not representable on 32-bit hosts.
@end defmac
Index: gcc/gengtype-lex.l
===================================================================
*** gcc/gengtype-lex.l.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/gengtype-lex.l 2014-05-26 10:25:29.303438233 +0200
*************** update_lineno (const char *l, size_t len
*** 52,58 ****
CID [[:alpha:]_][[:alnum:]_]*
WS [[:space:]]+
HWS [ \t\r\v\f]*
! IWORD short|long|(un)?signed|char|int|HOST_WIDE_INT|HOST_WIDEST_INT|bool|size_t|BOOL_BITFIELD|CPPCHAR_SIGNED_T|ino_t|dev_t|HARD_REG_SET
ITYPE {IWORD}({WS}{IWORD})*
/* Include '::' in identifiers to capture C++ scope qualifiers. */
ID {CID}({HWS}::{HWS}{CID})*
--- 52,58 ----
CID [[:alpha:]_][[:alnum:]_]*
WS [[:space:]]+
HWS [ \t\r\v\f]*
! IWORD short|long|(un)?signed|char|int|HOST_WIDE_INT|uint64_t|int64_t|bool|size_t|BOOL_BITFIELD|CPPCHAR_SIGNED_T|ino_t|dev_t|HARD_REG_SET
ITYPE {IWORD}({WS}{IWORD})*
/* Include '::' in identifiers to capture C++ scope qualifiers. */
ID {CID}({HWS}::{HWS}{CID})*
Index: gcc/ira-conflicts.c
===================================================================
*** gcc/ira-conflicts.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/ira-conflicts.c 2014-05-26 10:25:29.303438233 +0200
*************** build_conflict_bit_table (void)
*** 115,122 ****
= ((OBJECT_MAX (obj) - OBJECT_MIN (obj) + IRA_INT_BITS)
/ IRA_INT_BITS);
allocated_words_num += conflict_bit_vec_words_num;
! if ((unsigned HOST_WIDEST_INT) allocated_words_num * sizeof (IRA_INT_TYPE)
! > (unsigned HOST_WIDEST_INT) IRA_MAX_CONFLICT_TABLE_SIZE * 1024 * 1024)
{
if (internal_flag_ira_verbose > 0 && ira_dump_file != NULL)
fprintf
--- 115,122 ----
= ((OBJECT_MAX (obj) - OBJECT_MIN (obj) + IRA_INT_BITS)
/ IRA_INT_BITS);
allocated_words_num += conflict_bit_vec_words_num;
! if ((uint64_t) allocated_words_num * sizeof (IRA_INT_TYPE)
! > (uint64_t) IRA_MAX_CONFLICT_TABLE_SIZE * 1024 * 1024)
{
if (internal_flag_ira_verbose > 0 && ira_dump_file != NULL)
fprintf
Index: gcc/lto/lto.c
===================================================================
*** gcc/lto/lto.c.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/lto/lto.c 2014-05-26 10:25:29.304438233 +0200
*************** lto_read_decls (struct lto_file_decl_dat
*** 2003,2012 ****
/* Custom version of strtoll, which is not portable. */
! static HOST_WIDEST_INT
lto_parse_hex (const char *p)
{
! HOST_WIDEST_INT ret = 0;
for (; *p != '\0'; ++p)
{
--- 2003,2012 ----
/* Custom version of strtoll, which is not portable. */
! static int64_t
lto_parse_hex (const char *p)
{
! int64_t ret = 0;
for (; *p != '\0'; ++p)
{
*************** lto_resolution_read (splay_tree file_ids
*** 2058,2064 ****
{
int t;
char offset_p[17];
! HOST_WIDEST_INT offset;
t = fscanf (resolution, "@0x%16s", offset_p);
if (t != 1)
internal_error ("could not parse file offset");
--- 2058,2064 ----
{
int t;
char offset_p[17];
! int64_t offset;
t = fscanf (resolution, "@0x%16s", offset_p);
if (t != 1)
internal_error ("could not parse file offset");
Index: gcc/doc/tm.texi.in
===================================================================
*** gcc/doc/tm.texi.in.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/doc/tm.texi.in 2014-05-26 10:25:29.305438232 +0200
*************** the default value is @code{BIGGEST_ALIGN
*** 1011,1017 ****
On systems that use ELF, the default (in @file{config/elfos.h}) is
the largest supported 32-bit ELF section alignment representable on
! a 32-bit host e.g. @samp{(((unsigned HOST_WIDEST_INT) 1 << 28) * 8)}.
On 32-bit ELF the largest supported section alignment in bits is
@samp{(0x80000000 * 8)}, but this is not representable on 32-bit hosts.
@end defmac
--- 1011,1017 ----
On systems that use ELF, the default (in @file{config/elfos.h}) is
the largest supported 32-bit ELF section alignment representable on
! a 32-bit host e.g. @samp{(((uint64_t) 1 << 28) * 8)}.
On 32-bit ELF the largest supported section alignment in bits is
@samp{(0x80000000 * 8)}, but this is not representable on 32-bit hosts.
@end defmac
Index: gcc/config/mmix/mmix.md
===================================================================
*** gcc/config/mmix/mmix.md.orig 2014-05-26 10:20:59.741456792 +0200
--- gcc/config/mmix/mmix.md 2014-05-26 10:25:29.305438232 +0200
*************** DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\
*** 1168,1174 ****
}
else
{
! HOST_WIDEST_INT offs = INTVAL (XEXP (operands[1], 1));
offs += MMIX_fp_rO_OFFSET;
if (insn_const_int_ok_for_constraint (offs, CONSTRAINT_I))
--- 1168,1174 ----
}
else
{
! int64_t offs = INTVAL (XEXP (operands[1], 1));
offs += MMIX_fp_rO_OFFSET;
if (insn_const_int_ok_for_constraint (offs, CONSTRAINT_I))
Index: gcc/gcov-io.c
===================================================================
*** gcc/gcov-io.c.orig 2014-05-26 12:35:22.701901667 +0200
--- gcc/gcov-io.c 2014-05-26 12:35:31.661901050 +0200
*************** gcov_histo_index (gcov_type value)
*** 718,737 ****
r = sizeof (long long) * __CHAR_BIT__ - 1 - __builtin_clzll (v);
#else
/* We use floor_log2 from hwint.c, which takes a HOST_WIDE_INT
! that is either 32 or 64 bits, and gcov_type_unsigned may be 64 bits.
! Need to check for the case where gcov_type_unsigned is 64 bits
! and HOST_WIDE_INT is 32 bits and handle it specially. */
! #if HOST_BITS_PER_WIDEST_INT == HOST_BITS_PER_WIDE_INT
r = floor_log2 (v);
- #elif HOST_BITS_PER_WIDEST_INT == 2 * HOST_BITS_PER_WIDE_INT
- HOST_WIDE_INT hwi_v = v >> HOST_BITS_PER_WIDE_INT;
- if (hwi_v)
- r = floor_log2 (hwi_v) + HOST_BITS_PER_WIDE_INT;
- else
- r = floor_log2 ((HOST_WIDE_INT)v);
- #else
- gcc_unreachable ();
- #endif
#endif
}
--- 718,725 ----
r = sizeof (long long) * __CHAR_BIT__ - 1 - __builtin_clzll (v);
#else
/* We use floor_log2 from hwint.c, which takes a HOST_WIDE_INT
! that is 64 bits and gcov_type_unsigned is 64 bits. */
r = floor_log2 (v);
#endif
}