This commit was generated by cvs2svn to compensate for changes in r171825,
which included commits to RCS files with non-trunk default branches.
This commit is contained in:
commit
997921685c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=171826
@ -1 +1 @@
|
||||
4.2.0
|
||||
4.2.1
|
||||
|
@ -1,3 +1,441 @@
|
||||
2007-07-19 Release Manager
|
||||
|
||||
* GCC 4.2.1 released.
|
||||
|
||||
2007-07-18 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
Revert:
|
||||
|
||||
2007-07-09 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
PR middle-end/32004
|
||||
* function.c (rest_of_match_asm_constraints): Pass PROP_REG_INFO.
|
||||
|
||||
2007-07-06 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
PR middle-end/32004
|
||||
* function.c (match_asm_constraints_1, rest_of_match_asm_constraints,
|
||||
pass_match_asm_constraints): New.
|
||||
* passes.c (init_optimization_passes): Add new pass.
|
||||
* stmt.c (expand_asm_operands): Set cfun->has_asm_statement.
|
||||
* function.h (struct function): Add has_asm_statement bit.
|
||||
(current_function_has_asm_statement): New.
|
||||
* tree-pass.h (pass_match_asm_constraints): New.
|
||||
|
||||
2007-07-16 Paul Brook <paul@codesourcery.com>
|
||||
|
||||
PR target/32753
|
||||
gcc/
|
||||
* config/arm/cirrus.md (cirrus_arm_movsi_insn): Remove dead insn.
|
||||
|
||||
2007-07-10 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
|
||||
|
||||
PR target/32538
|
||||
* config/mips/iris6.h (LIBGCC_SPEC): Add libm.
|
||||
|
||||
2007-07-09 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
PR middle-end/32004
|
||||
* function.c (rest_of_match_asm_constraints): Pass PROP_REG_INFO.
|
||||
|
||||
2007-07-09 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
PR tree-optimization/32681
|
||||
* tree-if-conv.c (find_phi_replacement_condition): Use the condition
|
||||
saved in second_edge->aux when first_bb is a loop header.
|
||||
|
||||
2007-07-07 Anatoly Sokolov <aesok@post.ru>
|
||||
|
||||
PR target/31331
|
||||
* config/avr/avr.c (avr_naked_function_p): Handle receiving a type
|
||||
rather than a decl.
|
||||
(avr_attribute_table): Make "naked" attribute apply to function types
|
||||
rather than to decls.
|
||||
(avr_handle_fntype_attribute): New function.
|
||||
|
||||
2007-07-06 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
PR middle-end/32004
|
||||
* function.c (match_asm_constraints_1, rest_of_match_asm_constraints,
|
||||
pass_match_asm_constraints): New.
|
||||
* passes.c (init_optimization_passes): Add new pass.
|
||||
* stmt.c (expand_asm_operands): Set cfun->has_asm_statement.
|
||||
* function.h (struct function): Add has_asm_statement bit.
|
||||
(current_function_has_asm_statement): New.
|
||||
* tree-pass.h (pass_match_asm_constraints): New.
|
||||
|
||||
2007-07-06 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
PR rtl-optimization/32450
|
||||
* function.c (thread_prologue_and_epilogue_insns): Emit blockage insn
|
||||
to ensure that instructions are not moved into the prologue when
|
||||
profiling is on.
|
||||
|
||||
2007-07-04 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/32500
|
||||
* tree-ssa-loop-niter.c (infer_loop_bounds_from_undefined):
|
||||
Only use basic blocks that are always executed to infer loop bounds.
|
||||
|
||||
2007-07-04 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
PR tree-optimization/31966
|
||||
PR tree-optimization/32533
|
||||
* tree-if-conv.c (add_to_dst_predicate_list): Use "edge", not
|
||||
"basic_block" description as its third argument. Update function
|
||||
calls to get destination bb from "edge" argument. Save "cond" into
|
||||
aux field of the edge. Update prototype for changed arguments.
|
||||
(if_convertible_loop_p): Clear aux field of incoming edges if bb
|
||||
contains phi node.
|
||||
(find_phi_replacement_condition): Operate on incoming edges, not
|
||||
on predecessor blocks. If there is a condition saved in the
|
||||
incoming edge aux field, AND it with incoming bb predicate.
|
||||
Return source bb of the first edge.
|
||||
(clean_predicate_lists): Clean aux field of outgoing node edges.
|
||||
(tree_if_conversion): Do not initialize cond variable. Move
|
||||
variable declaration into the loop.
|
||||
(replace_phi_with_cond_gimple_modify_stmt): Remove unneded
|
||||
initializations of new_stmt, arg0 and arg1 variables.
|
||||
|
||||
2007-07-04 Kaz Kojima <kkojima@gcc.gnu.org>
|
||||
|
||||
PR target/32506
|
||||
Backport from mainline.
|
||||
* config/sh/sh.md (udivsi3_i1_media): Use target_reg_operand
|
||||
predicate instead of target_operand.
|
||||
(divsi3_i1_media, divsi3_media_2): Likewise.
|
||||
|
||||
2007-07-03 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
Backport from mainline:
|
||||
2006-12-11 Zdenek Dvorak <dvorakz@suse.cz>
|
||||
|
||||
PR rtl-optimization/30113
|
||||
* loop-iv.c (implies_p): Require the mode of the operands to be
|
||||
scalar.
|
||||
|
||||
2007-07-03 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
|
||||
|
||||
PR target/28307
|
||||
* gthr-posix.h [SUPPORTS_WEAK && GTHREAD_USE_WEAK]
|
||||
(__gthrw_pragma): Provide default definition.
|
||||
(__gthrw2): Use it.
|
||||
* gthr-posix.c (__gthrw_pragma): Define.
|
||||
|
||||
2007-07-02 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR libgomp/32468
|
||||
* omp-low.c (check_combined_parallel): New function.
|
||||
(lower_omp_parallel): Call it via walk_stmts, set
|
||||
OMP_PARALLEL_COMBINED if appropriate.
|
||||
(determine_parallel_type): If OMP_FOR resp. OMP_SECTIONS
|
||||
isn't the only statement in WS_ENTRY_BB or OMP_RETURN
|
||||
the only one in PAR_EXIT_BB and not OMP_PARALLEL_COMBINED,
|
||||
don't consider it as combined parallel.
|
||||
|
||||
2007-06-30 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
* dwarf2out.c (dwarf2out_finish): Accept namespaces as context of
|
||||
limbo die nodes.
|
||||
|
||||
2007-06-28 Seongbae Park <seongbae.park@gmail.com>
|
||||
|
||||
* config/arm/arm.c (arm_get_frame_offsets): Set
|
||||
offsets->locals_base to avoid negative stack size.
|
||||
(thumb_expand_prologue): Assert on negative stack size.
|
||||
|
||||
2007-06-28 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Ensure
|
||||
decl is non-external for AIX ABI.
|
||||
|
||||
2007-06-28 David Edelsohn <edelsohn@gnu.org>
|
||||
|
||||
* config/rs6000/predicates.md (current_file_function_operand):
|
||||
Ensure the symbol is non-external for AIX ABI.
|
||||
|
||||
2007-06-21 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* config/i386/i386.c (ix86_builtins): Add IX86_BUILTIN_VEC_EXT_V16QI.
|
||||
(ix86_init_mmx_sse_builtins): Add __builtin_ia32_vec_ext_v16qi.
|
||||
(ix86_expand_builtin): Handle IX86_BUILTIN_VEC_EXT_V16QI.
|
||||
|
||||
2007-06-21 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/32362
|
||||
* omp-low.c (lookup_decl_in_outer_ctx): Don't ICE if t is NULL,
|
||||
but decl is a global var, instead return decl.
|
||||
* gimplify.c (gimplify_adjust_omp_clauses_1): Add shared clauses
|
||||
even for is_global_var decls, if they are private in some outer
|
||||
context.
|
||||
|
||||
2007-06-21 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
PR target/32389
|
||||
* config/i386/i386.h (enum ix86_stack_slot): Add SLOT_VIRTUAL.
|
||||
* config/i386/i386.c (assign_386_stack_local): Assert that
|
||||
SLOT_VIRTUAL is valid only before virtual regs are instantiated.
|
||||
(ix86_expand_builtin) [IX86_BUILTIN_LDMXCSR, IX86_BUILTIN_STMXCSR]:
|
||||
Use SLOT_VIRTUAL stack slot instead of SLOT_TEMP.
|
||||
* config/i386/i386.md (truncdfsf2, truncxfsf2, truncxfdf2): Ditto.
|
||||
|
||||
2007-06-20 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR inline-asm/32109
|
||||
* gimplify.c (gimplify_asm_expr): Issue error if type is addressable
|
||||
and !allows_mem.
|
||||
|
||||
PR middle-end/32285
|
||||
* calls.c (precompute_arguments): Also precompute CALL_EXPR arguments
|
||||
if ACCUMULATE_OUTGOING_ARGS.
|
||||
|
||||
2007-06-20 Kaz Kojima <kkojima@gcc.gnu.org>
|
||||
|
||||
PR rtl-optimization/28011
|
||||
Backport from mainline.
|
||||
* reload.c (push_reload): Set dont_share if IN appears in OUT
|
||||
also when IN is a PLUS rtx.
|
||||
(reg_overlap_mentioned_for_reload_p): Return true if X and IN
|
||||
are same PLUS rtx.
|
||||
|
||||
2007-06-19 Richard Guenther <rguenther@suse.de>
|
||||
Michael Matz <matz@suse.de>
|
||||
|
||||
PR tree-optimization/30252
|
||||
* tree-ssa-structalias.c (solution_set_add): Make sure to
|
||||
preserve all relevant vars.
|
||||
(handle_ptr_arith): Make sure to only handle positive
|
||||
offsets.
|
||||
(push_fields_onto_fieldstack): Create fields for empty
|
||||
bases.
|
||||
|
||||
2007-06-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/32353
|
||||
* tree-ssa-structalias.c (set_uids_in_ptset): Also handle RESULT_DECL.
|
||||
|
||||
2007-06-17 Eric Botcazou <ebotcazou@libertysurf.fr>
|
||||
|
||||
* config/sparc/sparc.c (sparc_vis_init_builtins): Retrieve the
|
||||
return mode from the builtin itself.
|
||||
(sparc_fold_builtin): Fix cast of zero constant.
|
||||
|
||||
2007-06-15 Diego Novillo <dnovillo@google.com>
|
||||
|
||||
PR 32327
|
||||
* tree-ssa-operands.c (build_ssa_operands): Initially assume
|
||||
that the statement does not take any addresses.
|
||||
|
||||
2007-06-13 Eric Botcazou <ebotcazou@libertysurf.fr>
|
||||
|
||||
* config/sparc/sparc.c (sparc_override_options): Initialize
|
||||
fpu mask correctly.
|
||||
|
||||
2007-06-09 Ian Lance Taylor <iant@google.com>
|
||||
|
||||
PR tree-optimization/32169
|
||||
* tree-vrp.c (extract_range_from_unary_expr): For NOP_EXPR and
|
||||
CONVERT_EXPR, check whether min and max both converted to an
|
||||
overflow infinity representation.
|
||||
|
||||
2007-06-08 Kaz Kojima <kkojima@gcc.gnu.org>
|
||||
|
||||
PR target/32163
|
||||
Backport from mainline.
|
||||
* config/sh/sh.md (symGOT_load): Don't schedule insns when
|
||||
the symbol is generated with the stack protector.
|
||||
|
||||
2007-06-06 Ian Lance Taylor <iant@google.com>
|
||||
|
||||
* fold-const.c (merge_ranges): If range_successor or
|
||||
range_predecessor fail, just return 0.
|
||||
|
||||
2007-06-05 Ian Lance Taylor <iant@google.com>
|
||||
|
||||
* tree-vrp.c (compare_values_warnv): Check TREE_NO_WARNING on a
|
||||
PLUS_EXPR or MINUS_EXPR node before setting *strict_overflow_p.
|
||||
(extract_range_from_assert): Set TREE_NO_WARNING when creating an
|
||||
expression.
|
||||
(test_for_singularity): Likewise.
|
||||
|
||||
2007-06-04 Ian Lance Taylor <iant@google.com>
|
||||
|
||||
* tree-vrp.c (adjust_range_with_scev): When loop is not expected
|
||||
to overflow, reduce overflow infinity to regular infinity.
|
||||
(vrp_var_may_overflow): New static function.
|
||||
(vrp_visit_phi_node): Check vrp_var_may_overflow.
|
||||
|
||||
2007-05-31 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
Backport from mainline:
|
||||
2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* config/i386/i386.c (__builtin_ia32_vec_ext_v2df): Mark it
|
||||
with MASK_SSE2.
|
||||
(__builtin_ia32_vec_ext_v2di): Likewise.
|
||||
(__builtin_ia32_vec_ext_v4si): Likewise.
|
||||
(__builtin_ia32_vec_ext_v8hi): Likewise.
|
||||
(__builtin_ia32_vec_set_v8hi): Likewise.
|
||||
|
||||
2007-05-31 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
|
||||
|
||||
Backport from mainline:
|
||||
2007-05-05 Aurelien Jarno <aurelien@aurel32.net>
|
||||
|
||||
* config/pa/pa.md: Split tgd_load, tld_load and tie_load
|
||||
into pic and non-pic versions. Mark r19 as used for
|
||||
tgd_load_pic, tld_load_pic and tie_load_pic. Mark r27 as used
|
||||
for tgd_load, tld_load and tie_load .
|
||||
* config/pa/pa.c (legitimize_tls_address): Emit pic or non-pic
|
||||
version of tgd_load, tld_load and tie_load depending on the
|
||||
value of flag_pic.
|
||||
|
||||
2007-05-27 Daniel Berlin <dberlin@dberlin.org>
|
||||
|
||||
Fix PR/30052
|
||||
Backport PTA solver from mainline
|
||||
|
||||
* pointer-set.c: Copy from mainline
|
||||
* pointer-set.h: Ditto.
|
||||
* tree-ssa-structalias.c: Copy solver portions from mainline.
|
||||
* Makefile.in (tree-ssa-structalias.o): Update dependencies
|
||||
|
||||
2007-05-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* tree-vrp.c (compare_names): Initialize sop.
|
||||
|
||||
2007-05-30 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/31769
|
||||
* except.c (duplicate_eh_regions): Clear prev_try if
|
||||
ERT_MUST_NOT_THROW region is inside of ERT_TRY region.
|
||||
|
||||
2007-05-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
|
||||
|
||||
PR tree-opt/32100
|
||||
* fold-const.c (tree_expr_nonnegative_warnv_p): Don't
|
||||
return true when truth_value_p is true and the type
|
||||
is of signed:1.
|
||||
|
||||
2007-05-27 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
Backport from mainline:
|
||||
2007-05-25 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* config/i386/sse.md (*vec_extractv2di_1_sse2): Do not calculate
|
||||
"memory" attribute for "sseishft" type insn without operands[2].
|
||||
|
||||
2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* config/i386/sse.md (*vec_extractv2di_1_sse2): Correct shift.
|
||||
|
||||
2007-05-22 Ian Lance Taylor <iant@google.com>
|
||||
|
||||
* tree-vrp.c (avoid_overflow_infinity): New static function,
|
||||
broken out of set_value_range_to_value.
|
||||
(set_value_range_to_value): Call avoid_overflow_infinity.
|
||||
(extract_range_from_assert): Likewise.
|
||||
|
||||
2007-05-23 Chen Liqin <liqin@sunnorth.com.cn>
|
||||
|
||||
PR target/30987
|
||||
* config/score/misc.md (bitclr_c, bitset_c, bittgl_c): remove.
|
||||
* config/score/predicate.md (const_pow2, const_npow2): remove.
|
||||
* config/score/score.h (ASM_OUTPUT_EXTERNAL): add ASM_OUTPUT_EXTERNAL undef.
|
||||
PR target/30474
|
||||
* config/score/score.c (score_print_operand): makes sure that only lower
|
||||
bits are used.
|
||||
|
||||
2007-05-21 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
PR target/31167
|
||||
Backport from mainline.
|
||||
* config/i386/i386.md (*addti3_1, *addti3_1 splitter): Use
|
||||
x86_64_general_operand as operand[2] predicate. Remove "iF"
|
||||
from operand constraints and use "e" constraint instead.
|
||||
(*subti3_1, *subti3_1 splitter): Ditto.
|
||||
(*negti2_1, *negti2_1 splitter): Use nonimmediate_operand as
|
||||
operand[1] predicate.
|
||||
|
||||
2007-05-21 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
PR target/30041
|
||||
Backport from mainline.
|
||||
* config/i386/sse.md ("*sse3_movddup"): Use operands[0] and
|
||||
operands[1] in insn constraint. Correct type attribute to sselog1.
|
||||
|
||||
2007-05-20 Kaz Kojima <kkojima@gcc.gnu.org>
|
||||
|
||||
PR target/31701
|
||||
Backport from mainline.
|
||||
* config/sh/sh.c (output_stack_adjust): Avoid using the frame
|
||||
register itself to hold the offset constant. Tell flow the use
|
||||
of r4 and r5 when they are used.
|
||||
|
||||
2007-05-20 Kaz Kojima <kkojima@gcc.gnu.org>
|
||||
|
||||
PR target/31480
|
||||
Backport from mainline.
|
||||
* config/sh/sh.md (length): Check if prev_nonnote_insn (insn)
|
||||
is null.
|
||||
|
||||
2007-05-20 Kaz Kojima <kkojima@gcc.gnu.org>
|
||||
|
||||
PR target/31022
|
||||
Backport from mainline.
|
||||
* config/sh/sh.c (sh_adjust_cost): Use the result of single_set
|
||||
instead of PATTERN.
|
||||
|
||||
2007-05-20 Kaz Kojima <kkojima@gcc.gnu.org>
|
||||
|
||||
PR target/27405
|
||||
Backport from mainline.
|
||||
* config/sh/sh.md (cmp{eq,gt,gtu}{si,di}_media): Remove.
|
||||
(cmpsi{eq,gt,gtu}{si,di}_media): Rename to
|
||||
cmp{eq,gt,gtu}{si,di}_media.
|
||||
(*cmpne0si_media): Remove.
|
||||
(*movsicc_umin): Adjust gen_cmp*_media call.
|
||||
(unordered): Change the mode of unordered and operands[1] to
|
||||
SImode.
|
||||
(seq): Adjust gen_cmp*_media calls. Make the mode of
|
||||
a temporary result of compare SImode if needed. If the mode
|
||||
of operands[0] is DImode, extend the temporary result to DImode.
|
||||
(slt, sle, sgt, sge, sgtu, sltu, sleu, sgue, sne): Likewise.
|
||||
(sunorderd): Change the mode of match_operand and unorderd to
|
||||
SImode.
|
||||
(cmpeq{sf,df}_media): Remove.
|
||||
(cmpsieq{sf,df}_media): Rename to cmpeq{sf,df}_media.
|
||||
(cmp{gt,ge,un}{sf,df}_media): Change the mode of match_operand
|
||||
and compare operation to SImode.
|
||||
|
||||
2007-05-18 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* config/soft-fp/double.h, config/soft-fp/extended.h,
|
||||
config/soft-fp/floatundidf.c, config/soft-fp/floatundisf.c,
|
||||
config/soft-fp/floatunsidf.c, config/soft-fp/floatunsisf.c,
|
||||
config/soft-fp/op-2.h, config/soft-fp/op-4.h,
|
||||
config/soft-fp/op-common.h, config/soft-fp/quad.h: Update from
|
||||
glibc CVS.
|
||||
|
||||
2007-05-17 Ian Lance Taylor <iant@google.com>
|
||||
|
||||
PR tree-optimization/31953
|
||||
* tree-vrp.c (set_value_range_to_value): Add equiv parameter.
|
||||
Change all callers.
|
||||
(set_value_range_to_null): Call set_value_range_to_value.
|
||||
(extract_range_from_comparison): Likewise.
|
||||
|
||||
2007-05-17 Eric Botcazou <ebotcazou@libertysurf.fr>
|
||||
|
||||
PR rtl-optimization/31691
|
||||
* combine.c (simplify_set): Build a new src pattern instead of
|
||||
substituting its operands in the COMPARE case.
|
||||
|
||||
2007-05-14 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* BASE-VER: Set to 4.2.1.
|
||||
* DEV-PHASE: Set to prerelease.
|
||||
|
||||
2007-05-13 Release Manager
|
||||
|
||||
* GCC 4.2.0 released.
|
||||
@ -307,7 +745,8 @@
|
||||
2007-04-03 Stuart Hastings <stuart@apple.com>
|
||||
|
||||
PR 31281
|
||||
* objc/objc-act.c (next_sjlj_build_catch_list): Delete volatile from rethrow decl.
|
||||
* objc/objc-act.c (next_sjlj_build_catch_list): Delete volatile
|
||||
from rethrow decl.
|
||||
* cse.c (record_jump_equiv): Bail out on CCmode comparisons.
|
||||
|
||||
2007-04-03 Jakub Jelinek <jakub@redhat.com>
|
||||
|
@ -1 +1 @@
|
||||
20070514
|
||||
20070719
|
||||
|
@ -1238,13 +1238,25 @@ precompute_arguments (int flags, int num_actuals, struct arg_data *args)
|
||||
|
||||
/* If this is a libcall, then precompute all arguments so that we do not
|
||||
get extraneous instructions emitted as part of the libcall sequence. */
|
||||
if ((flags & ECF_LIBCALL_BLOCK) == 0)
|
||||
|
||||
/* If we preallocated the stack space, and some arguments must be passed
|
||||
on the stack, then we must precompute any parameter which contains a
|
||||
function call which will store arguments on the stack.
|
||||
Otherwise, evaluating the parameter may clobber previous parameters
|
||||
which have already been stored into the stack. (we have code to avoid
|
||||
such case by saving the outgoing stack arguments, but it results in
|
||||
worse code) */
|
||||
if ((flags & ECF_LIBCALL_BLOCK) == 0 && !ACCUMULATE_OUTGOING_ARGS)
|
||||
return;
|
||||
|
||||
for (i = 0; i < num_actuals; i++)
|
||||
{
|
||||
enum machine_mode mode;
|
||||
|
||||
if ((flags & ECF_LIBCALL_BLOCK) == 0
|
||||
&& TREE_CODE (args[i].tree_value) != CALL_EXPR)
|
||||
continue;
|
||||
|
||||
/* If this is an addressable type, we cannot pre-evaluate it. */
|
||||
gcc_assert (!TREE_ADDRESSABLE (TREE_TYPE (args[i].tree_value)));
|
||||
|
||||
|
@ -5341,14 +5341,14 @@ simplify_set (rtx x)
|
||||
}
|
||||
else if (GET_MODE (op0) == compare_mode && op1 == const0_rtx)
|
||||
{
|
||||
SUBST(SET_SRC (x), op0);
|
||||
SUBST (SET_SRC (x), op0);
|
||||
src = SET_SRC (x);
|
||||
}
|
||||
else
|
||||
/* Otherwise, update the COMPARE if needed. */
|
||||
else if (XEXP (src, 0) != op0 || XEXP (src, 1) != op1)
|
||||
{
|
||||
/* Otherwise, update the COMPARE if needed. */
|
||||
SUBST (XEXP (src, 0), op0);
|
||||
SUBST (XEXP (src, 1), op1);
|
||||
SUBST (SET_SRC (x), gen_rtx_COMPARE (compare_mode, op0, op1));
|
||||
src = SET_SRC (x);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -10555,6 +10555,7 @@ arm_get_frame_offsets (void)
|
||||
if (leaf && frame_size == 0)
|
||||
{
|
||||
offsets->outgoing_args = offsets->soft_frame;
|
||||
offsets->locals_base = offsets->soft_frame;
|
||||
return offsets;
|
||||
}
|
||||
|
||||
@ -13874,6 +13875,7 @@ thumb_expand_epilogue (void)
|
||||
amount = offsets->locals_base - offsets->saved_regs;
|
||||
}
|
||||
|
||||
gcc_assert (amount >= 0);
|
||||
if (amount)
|
||||
{
|
||||
if (amount < 512)
|
||||
|
@ -404,28 +404,6 @@
|
||||
;; Cirrus SI values have been outlawed. Look in arm.h for the comment
|
||||
;; on HARD_REGNO_MODE_OK.
|
||||
|
||||
(define_insn "*cirrus_arm_movsi_insn"
|
||||
[(set (match_operand:SI 0 "general_operand" "=r,r,r,m,*v,r,*v,T,*v")
|
||||
(match_operand:SI 1 "general_operand" "rI,K,mi,r,r,*v,T,*v,*v"))]
|
||||
"TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0
|
||||
&& (register_operand (operands[0], SImode)
|
||||
|| register_operand (operands[1], SImode))"
|
||||
"@
|
||||
mov%?\\t%0, %1
|
||||
mvn%?\\t%0, #%B1
|
||||
ldr%?\\t%0, %1
|
||||
str%?\\t%1, %0
|
||||
cfmv64lr%?\\t%Z0, %1
|
||||
cfmvr64l%?\\t%0, %Z1
|
||||
cfldr32%?\\t%V0, %1
|
||||
cfstr32%?\\t%V1, %0
|
||||
cfsh32%?\\t%V0, %V1, #0"
|
||||
[(set_attr "type" "*, *, load1,store1, *, *, load1,store1, *")
|
||||
(set_attr "pool_range" "*, *, 4096, *, *, *, 1024, *, *")
|
||||
(set_attr "neg_pool_range" "*, *, 4084, *, *, *, 1012, *, *")
|
||||
(set_attr "cirrus" "not,not, not, not,move,normal,normal,normal,normal")]
|
||||
)
|
||||
|
||||
(define_insn "*cirrus_movsf_hard_insn"
|
||||
[(set (match_operand:SF 0 "nonimmediate_operand" "=v,v,v,r,m,r,r,m")
|
||||
(match_operand:SF 1 "general_operand" "v,mE,r,v,v,r,mE,r"))]
|
||||
|
@ -2055,11 +2055,11 @@
|
||||
(match_dup 1))
|
||||
(parallel [(const_int 0)
|
||||
(const_int 2)])))]
|
||||
"TARGET_SSE3 && !(MEM_P (operands[1]) && MEM_P (operands[2]))"
|
||||
"TARGET_SSE3 && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
|
||||
"@
|
||||
movddup\t{%1, %0|%0, %1}
|
||||
#"
|
||||
[(set_attr "type" "sselog,ssemov")
|
||||
[(set_attr "type" "sselog1,ssemov")
|
||||
(set_attr "mode" "V2DF")])
|
||||
|
||||
(define_split
|
||||
@ -3494,9 +3494,10 @@
|
||||
"TARGET_SSE2 && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
|
||||
"@
|
||||
movhps\t{%1, %0|%0, %1}
|
||||
psrldq\t{$4, %0|%0, 4}
|
||||
psrldq\t{$8, %0|%0, 8}
|
||||
movq\t{%H1, %0|%0, %H1}"
|
||||
[(set_attr "type" "ssemov,sseishft,ssemov")
|
||||
(set_attr "memory" "*,none,*")
|
||||
(set_attr "mode" "V2SF,TI,TI")])
|
||||
|
||||
;; Not sure this is ever used, but it doesn't hurt to have it. -aoliva
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* Definitions of target machine for GNU compiler. IRIX version 6.
|
||||
Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004,
|
||||
2005, 2006
|
||||
2005, 2006, 2007
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
@ -96,10 +96,11 @@ Boston, MA 02110-1301, USA. */
|
||||
" %{pthread:-lpthread} %{p:libprof1.a%s}%{pg:libprof1.a%s} -lc " \
|
||||
SUBTARGET_WARN_UNUSED_SPEC "}"
|
||||
|
||||
/* Avoid getting two warnings for libgcc.a everytime we link. */
|
||||
/* Avoid getting two warnings for libgcc.a everytime we link. libgcc.a
|
||||
contains references to copysignl, so link with libm to resolve them. */
|
||||
#undef LIBGCC_SPEC
|
||||
#define LIBGCC_SPEC \
|
||||
SUBTARGET_DONT_WARN_UNUSED_SPEC " -lgcc " SUBTARGET_WARN_UNUSED_SPEC
|
||||
SUBTARGET_DONT_WARN_UNUSED_SPEC " -lgcc -lm " SUBTARGET_WARN_UNUSED_SPEC
|
||||
|
||||
#undef ENDFILE_SPEC
|
||||
#define ENDFILE_SPEC \
|
||||
|
@ -694,7 +694,9 @@
|
||||
(define_predicate "current_file_function_operand"
|
||||
(and (match_code "symbol_ref")
|
||||
(match_test "(DEFAULT_ABI != ABI_AIX || SYMBOL_REF_FUNCTION_P (op))
|
||||
&& (SYMBOL_REF_LOCAL_P (op)
|
||||
&& ((SYMBOL_REF_LOCAL_P (op)
|
||||
&& (DEFAULT_ABI != ABI_AIX
|
||||
|| !SYMBOL_REF_EXTERNAL_P (op)))
|
||||
|| (op == XEXP (DECL_RTL (current_function_decl),
|
||||
0)))")))
|
||||
|
||||
|
@ -13515,7 +13515,8 @@ rs6000_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED)
|
||||
}
|
||||
}
|
||||
if (DEFAULT_ABI == ABI_DARWIN
|
||||
|| (*targetm.binds_local_p) (decl))
|
||||
|| ((*targetm.binds_local_p) (decl)
|
||||
&& (DEFAULT_ABI != ABI_AIX || !DECL_EXTERNAL (decl))))
|
||||
{
|
||||
tree attr_list = TYPE_ATTRIBUTES (TREE_TYPE (decl));
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* Software floating-point emulation.
|
||||
Definitions for IEEE Double Precision
|
||||
Copyright (C) 1997,1998,1999,2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Richard Henderson (rth@cygnus.com),
|
||||
Jakub Jelinek (jj@ultra.linux.cz),
|
||||
@ -168,13 +168,13 @@ union _FP_UNION_D
|
||||
DFtype flt;
|
||||
struct {
|
||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
||||
unsigned sign : 1;
|
||||
unsigned exp : _FP_EXPBITS_D;
|
||||
unsigned long frac : _FP_FRACBITS_D - (_FP_IMPLBIT_D != 0);
|
||||
unsigned sign : 1;
|
||||
unsigned exp : _FP_EXPBITS_D;
|
||||
_FP_W_TYPE frac : _FP_FRACBITS_D - (_FP_IMPLBIT_D != 0);
|
||||
#else
|
||||
unsigned long frac : _FP_FRACBITS_D - (_FP_IMPLBIT_D != 0);
|
||||
unsigned exp : _FP_EXPBITS_D;
|
||||
unsigned sign : 1;
|
||||
_FP_W_TYPE frac : _FP_FRACBITS_D - (_FP_IMPLBIT_D != 0);
|
||||
unsigned exp : _FP_EXPBITS_D;
|
||||
unsigned sign : 1;
|
||||
#endif
|
||||
} bits __attribute__((packed));
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* Software floating-point emulation.
|
||||
Definitions for IEEE Extended Precision.
|
||||
Copyright (C) 1999,2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999,2006,2007 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Jakub Jelinek (jj@ultra.linux.cz).
|
||||
|
||||
@ -94,12 +94,6 @@ union _FP_UNION_E
|
||||
X##_f[1] = _flo.bits.frac1; \
|
||||
X##_e = _flo.bits.exp; \
|
||||
X##_s = _flo.bits.sign; \
|
||||
if (!X##_e && (X##_f[1] || X##_f[0]) \
|
||||
&& !(X##_f[1] & _FP_IMPLBIT_E)) \
|
||||
{ \
|
||||
X##_e++; \
|
||||
FP_SET_EXCEPTION(FP_EX_DENORM); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define FP_UNPACK_RAW_EP(X, val) \
|
||||
@ -112,12 +106,6 @@ union _FP_UNION_E
|
||||
X##_f[1] = _flo->bits.frac1; \
|
||||
X##_e = _flo->bits.exp; \
|
||||
X##_s = _flo->bits.sign; \
|
||||
if (!X##_e && (X##_f[1] || X##_f[0]) \
|
||||
&& !(X##_f[1] & _FP_IMPLBIT_E)) \
|
||||
{ \
|
||||
X##_e++; \
|
||||
FP_SET_EXCEPTION(FP_EX_DENORM); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define FP_PACK_RAW_E(val, X) \
|
||||
@ -164,13 +152,13 @@ union _FP_UNION_E
|
||||
|
||||
#define FP_UNPACK_SEMIRAW_E(X,val) \
|
||||
do { \
|
||||
_FP_UNPACK_RAW_E(X,val); \
|
||||
FP_UNPACK_RAW_E(X,val); \
|
||||
_FP_UNPACK_SEMIRAW(E,4,X); \
|
||||
} while (0)
|
||||
|
||||
#define FP_UNPACK_SEMIRAW_EP(X,val) \
|
||||
do { \
|
||||
_FP_UNPACK_RAW_EP(X,val); \
|
||||
FP_UNPACK_RAW_EP(X,val); \
|
||||
_FP_UNPACK_SEMIRAW(E,4,X); \
|
||||
} while (0)
|
||||
|
||||
@ -189,13 +177,13 @@ union _FP_UNION_E
|
||||
#define FP_PACK_SEMIRAW_E(val,X) \
|
||||
do { \
|
||||
_FP_PACK_SEMIRAW(E,4,X); \
|
||||
_FP_PACK_RAW_E(val,X); \
|
||||
FP_PACK_RAW_E(val,X); \
|
||||
} while (0)
|
||||
|
||||
#define FP_PACK_SEMIRAW_EP(val,X) \
|
||||
do { \
|
||||
_FP_PACK_SEMIRAW(E,4,X); \
|
||||
_FP_PACK_RAW_EP(val,X); \
|
||||
FP_PACK_RAW_EP(val,X); \
|
||||
} while (0)
|
||||
|
||||
#define FP_ISSIGNAN_E(X) _FP_ISSIGNAN(E,4,X)
|
||||
@ -277,14 +265,14 @@ union _FP_UNION_E
|
||||
XFtype flt;
|
||||
struct {
|
||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
||||
unsigned long pad : (_FP_W_TYPE_SIZE - 1 - _FP_EXPBITS_E);
|
||||
unsigned sign : 1;
|
||||
unsigned exp : _FP_EXPBITS_E;
|
||||
unsigned long frac : _FP_W_TYPE_SIZE;
|
||||
_FP_W_TYPE pad : (_FP_W_TYPE_SIZE - 1 - _FP_EXPBITS_E);
|
||||
unsigned sign : 1;
|
||||
unsigned exp : _FP_EXPBITS_E;
|
||||
_FP_W_TYPE frac : _FP_W_TYPE_SIZE;
|
||||
#else
|
||||
unsigned long frac : _FP_W_TYPE_SIZE;
|
||||
unsigned exp : _FP_EXPBITS_E;
|
||||
unsigned sign : 1;
|
||||
_FP_W_TYPE frac : _FP_W_TYPE_SIZE;
|
||||
unsigned exp : _FP_EXPBITS_E;
|
||||
unsigned sign : 1;
|
||||
#endif
|
||||
} bits;
|
||||
};
|
||||
@ -299,11 +287,6 @@ union _FP_UNION_E
|
||||
X##_f1 = 0; \
|
||||
X##_e = _flo.bits.exp; \
|
||||
X##_s = _flo.bits.sign; \
|
||||
if (!X##_e && X##_f0 && !(X##_f0 & _FP_IMPLBIT_E)) \
|
||||
{ \
|
||||
X##_e++; \
|
||||
FP_SET_EXCEPTION(FP_EX_DENORM); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define FP_UNPACK_RAW_EP(X, val) \
|
||||
@ -315,11 +298,6 @@ union _FP_UNION_E
|
||||
X##_f1 = 0; \
|
||||
X##_e = _flo->bits.exp; \
|
||||
X##_s = _flo->bits.sign; \
|
||||
if (!X##_e && X##_f0 && !(X##_f0 & _FP_IMPLBIT_E)) \
|
||||
{ \
|
||||
X##_e++; \
|
||||
FP_SET_EXCEPTION(FP_EX_DENORM); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define FP_PACK_RAW_E(val, X) \
|
||||
@ -365,13 +343,13 @@ union _FP_UNION_E
|
||||
|
||||
#define FP_UNPACK_SEMIRAW_E(X,val) \
|
||||
do { \
|
||||
_FP_UNPACK_RAW_E(X,val); \
|
||||
FP_UNPACK_RAW_E(X,val); \
|
||||
_FP_UNPACK_SEMIRAW(E,2,X); \
|
||||
} while (0)
|
||||
|
||||
#define FP_UNPACK_SEMIRAW_EP(X,val) \
|
||||
do { \
|
||||
_FP_UNPACK_RAW_EP(X,val); \
|
||||
FP_UNPACK_RAW_EP(X,val); \
|
||||
_FP_UNPACK_SEMIRAW(E,2,X); \
|
||||
} while (0)
|
||||
|
||||
@ -390,13 +368,13 @@ union _FP_UNION_E
|
||||
#define FP_PACK_SEMIRAW_E(val,X) \
|
||||
do { \
|
||||
_FP_PACK_SEMIRAW(E,2,X); \
|
||||
_FP_PACK_RAW_E(val,X); \
|
||||
FP_PACK_RAW_E(val,X); \
|
||||
} while (0)
|
||||
|
||||
#define FP_PACK_SEMIRAW_EP(val,X) \
|
||||
do { \
|
||||
_FP_PACK_SEMIRAW(E,2,X); \
|
||||
_FP_PACK_RAW_EP(val,X); \
|
||||
FP_PACK_RAW_EP(val,X); \
|
||||
} while (0)
|
||||
|
||||
#define FP_ISSIGNAN_E(X) _FP_ISSIGNAN(E,2,X)
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* Software floating-point emulation.
|
||||
Convert a 64bit unsigned integer to IEEE double
|
||||
Copyright (C) 1997,1999, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997, 1999, 2006, 2007 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Richard Henderson (rth@cygnus.com) and
|
||||
Jakub Jelinek (jj@ultra.linux.cz).
|
||||
@ -32,8 +32,7 @@
|
||||
#include "soft-fp.h"
|
||||
#include "double.h"
|
||||
|
||||
double
|
||||
__floatundidf(UDItype i)
|
||||
DFtype __floatundidf(UDItype i)
|
||||
{
|
||||
FP_DECL_EX;
|
||||
FP_DECL_D(A);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* Software floating-point emulation.
|
||||
Convert a 64bit unsigned integer to IEEE single
|
||||
Copyright (C) 1997,1999, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997, 1999, 2006, 2007 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Richard Henderson (rth@cygnus.com) and
|
||||
Jakub Jelinek (jj@ultra.linux.cz).
|
||||
@ -32,8 +32,7 @@
|
||||
#include "soft-fp.h"
|
||||
#include "single.h"
|
||||
|
||||
float
|
||||
__floatundisf(UDItype i)
|
||||
SFtype __floatundisf(UDItype i)
|
||||
{
|
||||
FP_DECL_EX;
|
||||
FP_DECL_S(A);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* Software floating-point emulation.
|
||||
Convert a 32bit unsigned integer to IEEE double
|
||||
Copyright (C) 1997,1999, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997, 1999, 2006, 2007 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Richard Henderson (rth@cygnus.com) and
|
||||
Jakub Jelinek (jj@ultra.linux.cz).
|
||||
@ -32,8 +32,7 @@
|
||||
#include "soft-fp.h"
|
||||
#include "double.h"
|
||||
|
||||
double
|
||||
__floatunsidf(USItype i)
|
||||
DFtype __floatunsidf(USItype i)
|
||||
{
|
||||
FP_DECL_EX;
|
||||
FP_DECL_D(A);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* Software floating-point emulation.
|
||||
Convert a 32bit unsigned integer to IEEE single
|
||||
Copyright (C) 1997,1999, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997, 1999, 2006, 2007 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Richard Henderson (rth@cygnus.com) and
|
||||
Jakub Jelinek (jj@ultra.linux.cz).
|
||||
@ -32,8 +32,7 @@
|
||||
#include "soft-fp.h"
|
||||
#include "single.h"
|
||||
|
||||
float
|
||||
__floatunsisf(USItype i)
|
||||
SFtype __floatunsisf(USItype i)
|
||||
{
|
||||
FP_DECL_EX;
|
||||
FP_DECL_S(A);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* Software floating-point emulation.
|
||||
Basic two-word fraction declaration and manipulation.
|
||||
Copyright (C) 1997,1998,1999,2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Richard Henderson (rth@cygnus.com),
|
||||
Jakub Jelinek (jj@ultra.linux.cz),
|
||||
@ -613,3 +613,5 @@
|
||||
#define _FP_FRAC_COPY_1_2(D, S) (D##_f = S##_f0)
|
||||
|
||||
#define _FP_FRAC_COPY_2_1(D, S) ((D##_f0 = S##_f), (D##_f1 = 0))
|
||||
|
||||
#define _FP_FRAC_COPY_2_2(D,S) _FP_FRAC_COPY_2(D,S)
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* Software floating-point emulation.
|
||||
Basic four-word fraction declaration and manipulation.
|
||||
Copyright (C) 1997,1998,1999,2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Richard Henderson (rth@cygnus.com),
|
||||
Jakub Jelinek (jj@ultra.linux.cz),
|
||||
@ -684,3 +684,5 @@ do { \
|
||||
D##_f[1] = S##_f1; \
|
||||
D##_f[2] = D##_f[3] = 0; \
|
||||
} while (0)
|
||||
|
||||
#define _FP_FRAC_COPY_4_4(D,S) _FP_FRAC_COPY_4(D,S)
|
||||
|
@ -1153,7 +1153,8 @@ do { \
|
||||
if (_FP_FRACBITS_##dfs < _FP_FRACBITS_##sfs \
|
||||
|| (_FP_EXPMAX_##dfs - _FP_EXPBIAS_##dfs \
|
||||
< _FP_EXPMAX_##sfs - _FP_EXPBIAS_##sfs) \
|
||||
|| _FP_EXPBIAS_##dfs < _FP_EXPBIAS_##sfs + _FP_FRACBITS_##sfs - 1) \
|
||||
|| (_FP_EXPBIAS_##dfs < _FP_EXPBIAS_##sfs + _FP_FRACBITS_##sfs - 1 \
|
||||
&& _FP_EXPBIAS_##dfs != _FP_EXPBIAS_##sfs)) \
|
||||
abort(); \
|
||||
D##_s = S##_s; \
|
||||
_FP_FRAC_COPY_##dwc##_##swc(D, S); \
|
||||
@ -1168,6 +1169,14 @@ do { \
|
||||
{ \
|
||||
if (_FP_FRAC_ZEROP_##swc(S)) \
|
||||
D##_e = 0; \
|
||||
else if (_FP_EXPBIAS_##dfs \
|
||||
< _FP_EXPBIAS_##sfs + _FP_FRACBITS_##sfs - 1) \
|
||||
{ \
|
||||
FP_SET_EXCEPTION(FP_EX_DENORM); \
|
||||
_FP_FRAC_SLL_##dwc(D, (_FP_FRACBITS_##dfs \
|
||||
- _FP_FRACBITS_##sfs)); \
|
||||
D##_e = 0; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
int _lz; \
|
||||
@ -1199,7 +1208,8 @@ do { \
|
||||
#define FP_TRUNC(dfs,sfs,dwc,swc,D,S) \
|
||||
do { \
|
||||
if (_FP_FRACBITS_##sfs < _FP_FRACBITS_##dfs \
|
||||
|| _FP_EXPBIAS_##sfs < _FP_EXPBIAS_##dfs + _FP_FRACBITS_##dfs - 1) \
|
||||
|| (_FP_EXPBIAS_##sfs < _FP_EXPBIAS_##dfs + _FP_FRACBITS_##dfs - 1 \
|
||||
&& _FP_EXPBIAS_##sfs != _FP_EXPBIAS_##dfs)) \
|
||||
abort(); \
|
||||
D##_s = S##_s; \
|
||||
if (_FP_EXP_NORMAL(sfs, swc, S)) \
|
||||
@ -1211,8 +1221,11 @@ do { \
|
||||
{ \
|
||||
if (D##_e <= 0) \
|
||||
{ \
|
||||
if (D##_e <= 1 - _FP_FRACBITS_##dfs) \
|
||||
_FP_FRAC_SET_##swc(S, _FP_ZEROFRAC_##swc); \
|
||||
if (D##_e < 1 - _FP_FRACBITS_##dfs) \
|
||||
{ \
|
||||
_FP_FRAC_SET_##swc(S, _FP_ZEROFRAC_##swc); \
|
||||
_FP_FRAC_LOW_##swc(S) |= 1; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
_FP_FRAC_HIGH_##sfs(S) |= _FP_IMPLBIT_SH_##sfs; \
|
||||
@ -1234,11 +1247,24 @@ do { \
|
||||
if (S##_e == 0) \
|
||||
{ \
|
||||
D##_e = 0; \
|
||||
_FP_FRAC_SET_##dwc(D, _FP_ZEROFRAC_##dwc); \
|
||||
if (!_FP_FRAC_ZEROP_##swc(S)) \
|
||||
if (_FP_FRAC_ZEROP_##swc(S)) \
|
||||
_FP_FRAC_SET_##dwc(D, _FP_ZEROFRAC_##dwc); \
|
||||
else \
|
||||
{ \
|
||||
FP_SET_EXCEPTION(FP_EX_DENORM); \
|
||||
FP_SET_EXCEPTION(FP_EX_INEXACT); \
|
||||
if (_FP_EXPBIAS_##sfs \
|
||||
< _FP_EXPBIAS_##dfs + _FP_FRACBITS_##dfs - 1) \
|
||||
{ \
|
||||
_FP_FRAC_SRS_##swc(S, (_FP_WFRACBITS_##sfs \
|
||||
- _FP_WFRACBITS_##dfs), \
|
||||
_FP_WFRACBITS_##sfs); \
|
||||
_FP_FRAC_COPY_##dwc##_##swc(D, S); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
_FP_FRAC_SET_##dwc(D, _FP_ZEROFRAC_##dwc); \
|
||||
_FP_FRAC_LOW_##dwc(D) |= 1; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
else \
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* Software floating-point emulation.
|
||||
Definitions for IEEE Quad Precision.
|
||||
Copyright (C) 1997,1998,1999,2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Richard Henderson (rth@cygnus.com),
|
||||
Jakub Jelinek (jj@ultra.linux.cz),
|
||||
@ -176,15 +176,15 @@ union _FP_UNION_Q
|
||||
} longs;
|
||||
struct {
|
||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
||||
unsigned sign : 1;
|
||||
unsigned exp : _FP_EXPBITS_Q;
|
||||
unsigned long frac1 : _FP_FRACBITS_Q-(_FP_IMPLBIT_Q != 0)-_FP_W_TYPE_SIZE;
|
||||
unsigned long frac0 : _FP_W_TYPE_SIZE;
|
||||
unsigned sign : 1;
|
||||
unsigned exp : _FP_EXPBITS_Q;
|
||||
_FP_W_TYPE frac1 : _FP_FRACBITS_Q - (_FP_IMPLBIT_Q != 0) - _FP_W_TYPE_SIZE;
|
||||
_FP_W_TYPE frac0 : _FP_W_TYPE_SIZE;
|
||||
#else
|
||||
unsigned long frac0 : _FP_W_TYPE_SIZE;
|
||||
unsigned long frac1 : _FP_FRACBITS_Q-(_FP_IMPLBIT_Q != 0)-_FP_W_TYPE_SIZE;
|
||||
unsigned exp : _FP_EXPBITS_Q;
|
||||
unsigned sign : 1;
|
||||
_FP_W_TYPE frac0 : _FP_W_TYPE_SIZE;
|
||||
_FP_W_TYPE frac1 : _FP_FRACBITS_Q - (_FP_IMPLBIT_Q != 0) - _FP_W_TYPE_SIZE;
|
||||
unsigned exp : _FP_EXPBITS_Q;
|
||||
unsigned sign : 1;
|
||||
#endif
|
||||
} bits;
|
||||
};
|
||||
|
@ -703,7 +703,7 @@ sparc_override_options (void)
|
||||
error ("-mcmodel= is not supported on 32 bit systems");
|
||||
}
|
||||
|
||||
fpu = TARGET_FPU; /* save current -mfpu status */
|
||||
fpu = target_flags & MASK_FPU; /* save current -mfpu status */
|
||||
|
||||
/* Set the default CPU. */
|
||||
for (def = &cpu_default[0]; def->name; ++def)
|
||||
@ -7968,8 +7968,10 @@ sparc_vis_init_builtins (void)
|
||||
Expand builtin functions for sparc intrinsics. */
|
||||
|
||||
static rtx
|
||||
sparc_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
|
||||
enum machine_mode tmode, int ignore ATTRIBUTE_UNUSED)
|
||||
sparc_expand_builtin (tree exp, rtx target,
|
||||
rtx subtarget ATTRIBUTE_UNUSED,
|
||||
enum machine_mode tmode ATTRIBUTE_UNUSED,
|
||||
int ignore ATTRIBUTE_UNUSED)
|
||||
{
|
||||
tree arglist;
|
||||
tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0);
|
||||
@ -7978,14 +7980,13 @@ sparc_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
|
||||
enum machine_mode mode[4];
|
||||
int arg_count = 0;
|
||||
|
||||
mode[arg_count] = tmode;
|
||||
|
||||
if (target == 0
|
||||
|| GET_MODE (target) != tmode
|
||||
|| ! (*insn_data[icode].operand[0].predicate) (target, tmode))
|
||||
op[arg_count] = gen_reg_rtx (tmode);
|
||||
mode[0] = insn_data[icode].operand[0].mode;
|
||||
if (!target
|
||||
|| GET_MODE (target) != mode[0]
|
||||
|| ! (*insn_data[icode].operand[0].predicate) (target, mode[0]))
|
||||
op[0] = gen_reg_rtx (mode[0]);
|
||||
else
|
||||
op[arg_count] = target;
|
||||
op[0] = target;
|
||||
|
||||
for (arglist = TREE_OPERAND (exp, 1); arglist;
|
||||
arglist = TREE_CHAIN (arglist))
|
||||
@ -8101,11 +8102,11 @@ sparc_fold_builtin (tree fndecl, tree arglist, bool ignore)
|
||||
{
|
||||
tree arg0, arg1, arg2;
|
||||
tree rtype = TREE_TYPE (TREE_TYPE (fndecl));
|
||||
|
||||
|
||||
if (ignore && DECL_FUNCTION_CODE (fndecl) != CODE_FOR_alignaddrsi_vis
|
||||
if (ignore
|
||||
&& DECL_FUNCTION_CODE (fndecl) != CODE_FOR_alignaddrsi_vis
|
||||
&& DECL_FUNCTION_CODE (fndecl) != CODE_FOR_alignaddrdi_vis)
|
||||
return build_int_cst (rtype, 0);
|
||||
return fold_convert (rtype, integer_zero_node);
|
||||
|
||||
switch (DECL_FUNCTION_CODE (fndecl))
|
||||
{
|
||||
@ -8219,6 +8220,7 @@ sparc_fold_builtin (tree fndecl, tree arglist, bool ignore)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return NULL_TREE;
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,93 @@
|
||||
2007-07-19 Release Manager
|
||||
|
||||
* GCC 4.2.1 released.
|
||||
|
||||
2007-07-07 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/32232
|
||||
* pt.c (resolve_overloaded_unification): Robustify. Return a
|
||||
bool, not an int.
|
||||
(type_unification_real): Adjust accordingly.
|
||||
|
||||
2007-07-06 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/32245
|
||||
* init.c (build_zero_init): Always build an initializer for
|
||||
non-static storage.
|
||||
* typeck2.c (build_functional_cast): Use build_zero_init.
|
||||
|
||||
PR c++/32251
|
||||
* init.c (build_new_1): Always pass the allocation function to
|
||||
build_op_delete_call.
|
||||
* call.c (build_op_delete_call): Handle operator delete with a
|
||||
variable-argument list. Do not issue an error when no matching
|
||||
deallocation function is available for a new operator.
|
||||
|
||||
PR c++/31992
|
||||
* cp-tree.h (any_value_dependent_elements_p): Declare it.
|
||||
* decl.c (value_dependent_init_p): New function.
|
||||
(cp_finish_decl): Use it.
|
||||
* pt.c (value_dependent_expression_p): Use
|
||||
any_value_dependent_elements_p.
|
||||
* parser.c (cp_parser_primary_expression): Add comment about
|
||||
treating dependent qualified names as integral
|
||||
constant-expressions.
|
||||
|
||||
2007-07-03 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/31338
|
||||
* cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
|
||||
* typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
|
||||
COMPLEX_TYPE is now an ARITHMETIC_TYPE.
|
||||
* init.c (build_zero_init): Adjust, as
|
||||
COMPLEX_TYPE is now a SCALAR_TYPE.
|
||||
* typeck2.c (digest_init): Allow brace-enclosed initializers for
|
||||
COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
|
||||
|
||||
2007-07-03 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR c++/32609
|
||||
* class.c (fixed_type_or_null): Re-lookup the hashtable slot
|
||||
after recursing.
|
||||
|
||||
2007-07-02 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/31748
|
||||
* semantics.c (finish_omp_clauses): Use %qD instead of %qE for
|
||||
DECL_P in not a variable and appears more than once error messages.
|
||||
|
||||
2007-06-27 Simon Martin <simartin@users.sourceforge.net>
|
||||
|
||||
PR c++/27492
|
||||
* decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
|
||||
function decls.
|
||||
|
||||
2007-06-15 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* cp-tree.h (DECL_VAR_MARKED_P): Remove.
|
||||
(DECL_ANON_UNION_VAR_P): New macro.
|
||||
* class.c (fixed_type_or_null): Tidy. Use a hash table, rather
|
||||
than DECL_VAR_MARKED_P, to keep track of which variables we have
|
||||
seen.
|
||||
* decl.c (redeclaration_error_message): Complain about redeclaring
|
||||
anonymous union members at namespace scope.
|
||||
* decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
|
||||
|
||||
2007-06-08 Dirk Mueller <dmueller@suse.de>
|
||||
|
||||
PR c++/31809
|
||||
PR c++/31806
|
||||
Backport from mainline:
|
||||
2007-05-31 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* decl.c (cp_finish_decl): Also clear was_readonly if a static var
|
||||
needs runtime initialization.
|
||||
|
||||
2007-05-30 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
|
||||
variables that need runtime initialization.
|
||||
|
||||
2007-05-13 Release Manager
|
||||
|
||||
* GCC 4.2.0 released.
|
||||
|
@ -3985,8 +3985,12 @@ build_new_op (enum tree_code code, int flags, tree arg1, tree arg2, tree arg3,
|
||||
GLOBAL_P is true if the delete-expression should not consider
|
||||
class-specific delete operators.
|
||||
PLACEMENT is the corresponding placement new call, or NULL_TREE.
|
||||
If PLACEMENT is non-NULL, then ALLOC_FN is the allocation function
|
||||
called to perform the placement new. */
|
||||
|
||||
If this call to "operator delete" is being generated as part to
|
||||
deallocate memory allocated via a new-expression (as per [expr.new]
|
||||
which requires that if the initialization throws an exception then
|
||||
we call a deallocation function), then ALLOC_FN is the allocation
|
||||
function. */
|
||||
|
||||
tree
|
||||
build_op_delete_call (enum tree_code code, tree addr, tree size,
|
||||
@ -4077,9 +4081,13 @@ build_op_delete_call (enum tree_code code, tree addr, tree size,
|
||||
if (!a && !t)
|
||||
break;
|
||||
}
|
||||
/* On the second pass, the second argument must be
|
||||
"size_t". */
|
||||
/* On the second pass, look for a function with exactly two
|
||||
arguments: "void *" and "size_t". */
|
||||
else if (pass == 1
|
||||
/* For "operator delete(void *, ...)" there will be
|
||||
no second argument, but we will not get an exact
|
||||
match above. */
|
||||
&& t
|
||||
&& same_type_p (TREE_VALUE (t), sizetype)
|
||||
&& TREE_CHAIN (t) == void_list_node)
|
||||
break;
|
||||
@ -4119,10 +4127,18 @@ build_op_delete_call (enum tree_code code, tree addr, tree size,
|
||||
return build_function_call (fn, args);
|
||||
}
|
||||
|
||||
/* If we are doing placement delete we do nothing if we don't find a
|
||||
matching op delete. */
|
||||
if (placement)
|
||||
return NULL_TREE;
|
||||
/* [expr.new]
|
||||
|
||||
If no unambiguous matching deallocation function can be found,
|
||||
propagating the exception does not cause the object's memory to
|
||||
be freed. */
|
||||
if (alloc_fn)
|
||||
{
|
||||
if (!placement)
|
||||
warning (0, "no corresponding deallocation function for `%D'",
|
||||
alloc_fn);
|
||||
return NULL_TREE;
|
||||
}
|
||||
|
||||
error ("no suitable %<operator %s%> for %qT",
|
||||
operator_name_info[(int)code].name, type);
|
||||
|
@ -5350,22 +5350,34 @@ fixed_type_or_null (tree instance, int* nonnull, int* cdtorp)
|
||||
}
|
||||
else if (TREE_CODE (TREE_TYPE (instance)) == REFERENCE_TYPE)
|
||||
{
|
||||
/* We only need one hash table because it is always left empty. */
|
||||
static htab_t ht;
|
||||
if (!ht)
|
||||
ht = htab_create (37,
|
||||
htab_hash_pointer,
|
||||
htab_eq_pointer,
|
||||
/*htab_del=*/NULL);
|
||||
|
||||
/* Reference variables should be references to objects. */
|
||||
if (nonnull)
|
||||
*nonnull = 1;
|
||||
|
||||
/* DECL_VAR_MARKED_P is used to prevent recursion; a
|
||||
/* Enter the INSTANCE in a table to prevent recursion; a
|
||||
variable's initializer may refer to the variable
|
||||
itself. */
|
||||
if (TREE_CODE (instance) == VAR_DECL
|
||||
&& DECL_INITIAL (instance)
|
||||
&& !DECL_VAR_MARKED_P (instance))
|
||||
&& !htab_find (ht, instance))
|
||||
{
|
||||
tree type;
|
||||
DECL_VAR_MARKED_P (instance) = 1;
|
||||
void **slot;
|
||||
|
||||
slot = htab_find_slot (ht, instance, INSERT);
|
||||
*slot = instance;
|
||||
type = fixed_type_or_null (DECL_INITIAL (instance),
|
||||
nonnull, cdtorp);
|
||||
DECL_VAR_MARKED_P (instance) = 0;
|
||||
htab_remove_elt (ht, instance);
|
||||
|
||||
return type;
|
||||
}
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ struct diagnostic_context;
|
||||
DECL_IMPLICIT_TYPEDEF_P (in a TYPE_DECL)
|
||||
3: DECL_IN_AGGR_P.
|
||||
4: DECL_C_BIT_FIELD (in a FIELD_DECL)
|
||||
DECL_VAR_MARKED_P (in a VAR_DECL)
|
||||
DECL_ANON_UNION_VAR_P (in a VAR_DECL)
|
||||
DECL_SELF_REFERENCE_P (in a TYPE_DECL)
|
||||
DECL_INVALID_OVERRIDER_P (in a FUNCTION_DECL)
|
||||
5: DECL_INTERFACE_KNOWN.
|
||||
@ -2111,10 +2111,10 @@ extern void decl_shadowed_for_var_insert (tree, tree);
|
||||
(DECL_LANG_SPECIFIC (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK (NODE)) \
|
||||
->decl_flags.u.template_info)
|
||||
|
||||
/* For a VAR_DECL, indicates that the variable has been processed.
|
||||
This flag is set and unset throughout the code; it is always
|
||||
used for a temporary purpose. */
|
||||
#define DECL_VAR_MARKED_P(NODE) \
|
||||
/* For a VAR_DECL, indicates that the variable is actually a
|
||||
non-static data member of anonymous union that has been promoted to
|
||||
variable status. */
|
||||
#define DECL_ANON_UNION_VAR_P(NODE) \
|
||||
(DECL_LANG_FLAG_4 (VAR_DECL_CHECK (NODE)))
|
||||
|
||||
/* Template information for a RECORD_TYPE or UNION_TYPE. */
|
||||
@ -2418,14 +2418,21 @@ extern void decl_shadowed_for_var_insert (tree, tree);
|
||||
/* [basic.fundamental]
|
||||
|
||||
Integral and floating types are collectively called arithmetic
|
||||
types. Keep these checks in ascending code order. */
|
||||
types.
|
||||
|
||||
As a GNU extension, we also accept complex types.
|
||||
|
||||
Keep these checks in ascending code order. */
|
||||
#define ARITHMETIC_TYPE_P(TYPE) \
|
||||
(CP_INTEGRAL_TYPE_P (TYPE) || TREE_CODE (TYPE) == REAL_TYPE)
|
||||
(CP_INTEGRAL_TYPE_P (TYPE) \
|
||||
|| TREE_CODE (TYPE) == REAL_TYPE \
|
||||
|| TREE_CODE (TYPE) == COMPLEX_TYPE)
|
||||
|
||||
/* [basic.types]
|
||||
|
||||
Arithmetic types, enumeration types, pointer types, and
|
||||
pointer-to-member types, are collectively called scalar types.
|
||||
|
||||
Keep these checks in ascending code order. */
|
||||
#define SCALAR_TYPE_P(TYPE) \
|
||||
(TYPE_PTRMEM_P (TYPE) \
|
||||
@ -4146,6 +4153,7 @@ extern bool dependent_template_id_p (tree, tree);
|
||||
extern bool type_dependent_expression_p (tree);
|
||||
extern bool any_type_dependent_arguments_p (tree);
|
||||
extern bool value_dependent_expression_p (tree);
|
||||
extern bool any_value_dependent_elements_p (tree);
|
||||
extern tree resolve_typename_type (tree, bool);
|
||||
extern tree template_for_substitution (tree);
|
||||
extern tree build_non_dependent_expr (tree);
|
||||
|
@ -1056,6 +1056,7 @@ build_anon_union_vars (tree type, tree object)
|
||||
tree base;
|
||||
|
||||
decl = build_decl (VAR_DECL, DECL_NAME (field), TREE_TYPE (field));
|
||||
DECL_ANON_UNION_VAR_P (decl) = 1;
|
||||
|
||||
base = get_base_address (object);
|
||||
TREE_PUBLIC (decl) = TREE_PUBLIC (base);
|
||||
|
@ -178,8 +178,7 @@ build_zero_init (tree type, tree nelts, bool static_storage_p)
|
||||
items with static storage duration that are not otherwise
|
||||
initialized are initialized to zero. */
|
||||
;
|
||||
else if (SCALAR_TYPE_P (type)
|
||||
|| TREE_CODE (type) == COMPLEX_TYPE)
|
||||
else if (SCALAR_TYPE_P (type))
|
||||
init = convert (type, integer_zero_node);
|
||||
else if (CLASS_TYPE_P (type))
|
||||
{
|
||||
@ -196,7 +195,7 @@ build_zero_init (tree type, tree nelts, bool static_storage_p)
|
||||
corresponding to base classes as well. Thus, iterating
|
||||
over TYPE_FIELDs will result in correct initialization of
|
||||
all of the subobjects. */
|
||||
if (static_storage_p && !zero_init_p (TREE_TYPE (field)))
|
||||
if (!static_storage_p || !zero_init_p (TREE_TYPE (field)))
|
||||
{
|
||||
tree value = build_zero_init (TREE_TYPE (field),
|
||||
/*nelts=*/NULL_TREE,
|
||||
@ -1970,8 +1969,7 @@ build_new_1 (tree placement, tree type, tree nelts, tree init,
|
||||
globally_qualified_p,
|
||||
(placement_allocation_fn_p
|
||||
? alloc_call : NULL_TREE),
|
||||
(placement_allocation_fn_p
|
||||
? alloc_fn : NULL_TREE));
|
||||
alloc_fn);
|
||||
|
||||
if (!cleanup)
|
||||
/* We're done. */;
|
||||
|
@ -3197,7 +3197,19 @@ cp_parser_primary_expression (cp_parser *parser,
|
||||
/* If name lookup gives us a SCOPE_REF, then the
|
||||
qualifying scope was dependent. */
|
||||
if (TREE_CODE (decl) == SCOPE_REF)
|
||||
return decl;
|
||||
{
|
||||
/* At this point, we do not know if DECL is a valid
|
||||
integral constant expression. We assume that it is
|
||||
in fact such an expression, so that code like:
|
||||
|
||||
template <int N> struct A {
|
||||
int a[B<N>::i];
|
||||
};
|
||||
|
||||
is accepted. At template-instantiation time, we
|
||||
will check that B<N>::i is actually a constant. */
|
||||
return decl;
|
||||
}
|
||||
/* Check to see if DECL is a local variable in a context
|
||||
where that is forbidden. */
|
||||
if (parser->local_variables_forbidden_p
|
||||
|
@ -91,8 +91,8 @@ static htab_t local_specializations;
|
||||
|
||||
static void push_access_scope (tree);
|
||||
static void pop_access_scope (tree);
|
||||
static int resolve_overloaded_unification (tree, tree, tree, tree,
|
||||
unification_kind_t, int);
|
||||
static bool resolve_overloaded_unification (tree, tree, tree, tree,
|
||||
unification_kind_t, int);
|
||||
static int try_one_overload (tree, tree, tree, tree, tree,
|
||||
unification_kind_t, int, bool);
|
||||
static int unify (tree, tree, tree, tree, int);
|
||||
@ -9943,17 +9943,18 @@ type_unification_real (tree tparms,
|
||||
gcc_assert (TREE_TYPE (arg) != NULL_TREE);
|
||||
if (type_unknown_p (arg))
|
||||
{
|
||||
/* [temp.deduct.type] A template-argument can be deduced from
|
||||
a pointer to function or pointer to member function
|
||||
argument if the set of overloaded functions does not
|
||||
contain function templates and at most one of a set of
|
||||
overloaded functions provides a unique match. */
|
||||
/* [temp.deduct.type]
|
||||
|
||||
A template-argument can be deduced from a pointer to
|
||||
function or pointer to member function argument if
|
||||
the set of overloaded functions does not contain
|
||||
function templates and at most one of a set of
|
||||
overloaded functions provides a unique match. */
|
||||
if (resolve_overloaded_unification
|
||||
(tparms, targs, parm, arg, strict, sub_strict)
|
||||
!= 0)
|
||||
return 1;
|
||||
continue;
|
||||
(tparms, targs, parm, arg, strict, sub_strict))
|
||||
continue;
|
||||
|
||||
return 1;
|
||||
}
|
||||
arg = unlowered_expr_type (arg);
|
||||
if (arg == error_mark_node)
|
||||
@ -10006,12 +10007,13 @@ type_unification_real (tree tparms,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Subroutine of type_unification_real. Args are like the variables at the
|
||||
call site. ARG is an overloaded function (or template-id); we try
|
||||
deducing template args from each of the overloads, and if only one
|
||||
succeeds, we go with that. Modifies TARGS and returns 0 on success. */
|
||||
/* Subroutine of type_unification_real. Args are like the variables
|
||||
at the call site. ARG is an overloaded function (or template-id);
|
||||
we try deducing template args from each of the overloads, and if
|
||||
only one succeeds, we go with that. Modifies TARGS and returns
|
||||
true on success. */
|
||||
|
||||
static int
|
||||
static bool
|
||||
resolve_overloaded_unification (tree tparms,
|
||||
tree targs,
|
||||
tree parm,
|
||||
@ -10070,16 +10072,17 @@ resolve_overloaded_unification (tree tparms,
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (TREE_CODE (arg) != OVERLOAD
|
||||
&& TREE_CODE (arg) != FUNCTION_DECL)
|
||||
/* If ARG is, for example, "(0, &f)" then its type will be unknown
|
||||
-- but the deduction does not succeed because the expression is
|
||||
not just the function on its own. */
|
||||
return false;
|
||||
else
|
||||
{
|
||||
gcc_assert (TREE_CODE (arg) == OVERLOAD
|
||||
|| TREE_CODE (arg) == FUNCTION_DECL);
|
||||
|
||||
for (; arg; arg = OVL_NEXT (arg))
|
||||
good += try_one_overload (tparms, targs, tempargs, parm,
|
||||
TREE_TYPE (OVL_CURRENT (arg)),
|
||||
strict, sub_strict, addr_p);
|
||||
}
|
||||
for (; arg; arg = OVL_NEXT (arg))
|
||||
good += try_one_overload (tparms, targs, tempargs, parm,
|
||||
TREE_TYPE (OVL_CURRENT (arg)),
|
||||
strict, sub_strict, addr_p);
|
||||
|
||||
/* [temp.deduct.type] A template-argument can be deduced from a pointer
|
||||
to function or pointer to member function argument if the set of
|
||||
@ -10097,9 +10100,9 @@ resolve_overloaded_unification (tree tparms,
|
||||
TREE_VEC_ELT (targs, i) = TREE_VEC_ELT (tempargs, i);
|
||||
}
|
||||
if (good)
|
||||
return 0;
|
||||
return true;
|
||||
|
||||
return 1;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Subroutine of resolve_overloaded_unification; does deduction for a single
|
||||
@ -12895,12 +12898,7 @@ value_dependent_expression_p (tree expression)
|
||||
}
|
||||
|
||||
if (TREE_CODE (expression) == TREE_LIST)
|
||||
{
|
||||
for (; expression; expression = TREE_CHAIN (expression))
|
||||
if (value_dependent_expression_p (TREE_VALUE (expression)))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
return any_value_dependent_elements_p (expression);
|
||||
|
||||
return value_dependent_expression_p (expression);
|
||||
}
|
||||
@ -13104,6 +13102,19 @@ any_type_dependent_arguments_p (tree args)
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Returns TRUE if LIST (a TREE_LIST whose TREE_VALUEs are
|
||||
expressions) contains any value-dependent expressions. */
|
||||
|
||||
bool
|
||||
any_value_dependent_elements_p (tree list)
|
||||
{
|
||||
for (; list; list = TREE_CHAIN (list))
|
||||
if (value_dependent_expression_p (TREE_VALUE (list)))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Returns TRUE if the ARG (a template argument) is dependent. */
|
||||
|
||||
static bool
|
||||
|
@ -3344,14 +3344,17 @@ finish_omp_clauses (tree clauses)
|
||||
{
|
||||
if (processing_template_decl)
|
||||
break;
|
||||
error ("%qE is not a variable in clause %qs", t, name);
|
||||
if (DECL_P (t))
|
||||
error ("%qD is not a variable in clause %qs", t, name);
|
||||
else
|
||||
error ("%qE is not a variable in clause %qs", t, name);
|
||||
remove = true;
|
||||
}
|
||||
else if (bitmap_bit_p (&generic_head, DECL_UID (t))
|
||||
|| bitmap_bit_p (&firstprivate_head, DECL_UID (t))
|
||||
|| bitmap_bit_p (&lastprivate_head, DECL_UID (t)))
|
||||
{
|
||||
error ("%qE appears more than once in data clauses", t);
|
||||
error ("%qD appears more than once in data clauses", t);
|
||||
remove = true;
|
||||
}
|
||||
else
|
||||
|
@ -256,11 +256,9 @@ type_after_usual_arithmetic_conversions (tree t1, tree t2)
|
||||
|
||||
/* FIXME: Attributes. */
|
||||
gcc_assert (ARITHMETIC_TYPE_P (t1)
|
||||
|| TREE_CODE (t1) == COMPLEX_TYPE
|
||||
|| TREE_CODE (t1) == VECTOR_TYPE
|
||||
|| TREE_CODE (t1) == ENUMERAL_TYPE);
|
||||
gcc_assert (ARITHMETIC_TYPE_P (t2)
|
||||
|| TREE_CODE (t2) == COMPLEX_TYPE
|
||||
|| TREE_CODE (t2) == VECTOR_TYPE
|
||||
|| TREE_CODE (t2) == ENUMERAL_TYPE);
|
||||
|
||||
@ -761,9 +759,9 @@ common_type (tree t1, tree t2)
|
||||
code2 = TREE_CODE (t2);
|
||||
|
||||
if ((ARITHMETIC_TYPE_P (t1) || code1 == ENUMERAL_TYPE
|
||||
|| code1 == COMPLEX_TYPE || code1 == VECTOR_TYPE)
|
||||
|| code1 == VECTOR_TYPE)
|
||||
&& (ARITHMETIC_TYPE_P (t2) || code2 == ENUMERAL_TYPE
|
||||
|| code2 == COMPLEX_TYPE || code2 == VECTOR_TYPE))
|
||||
|| code2 == VECTOR_TYPE))
|
||||
return type_after_usual_arithmetic_conversions (t1, t2);
|
||||
|
||||
else if ((TYPE_PTR_P (t1) && TYPE_PTR_P (t2))
|
||||
|
@ -710,7 +710,8 @@ digest_init (tree type, tree init)
|
||||
}
|
||||
|
||||
/* Handle scalar types (including conversions) and references. */
|
||||
if (SCALAR_TYPE_P (type) || code == REFERENCE_TYPE)
|
||||
if (TREE_CODE (type) != COMPLEX_TYPE
|
||||
&& (SCALAR_TYPE_P (type) || code == REFERENCE_TYPE))
|
||||
return convert_for_initialization (0, type, init, LOOKUP_NORMAL,
|
||||
"initialization", NULL_TREE, 0);
|
||||
|
||||
@ -1347,7 +1348,9 @@ build_functional_cast (tree exp, tree parms)
|
||||
&& !CLASSTYPE_NON_POD_P (type)
|
||||
&& TYPE_HAS_DEFAULT_CONSTRUCTOR (type))
|
||||
{
|
||||
exp = build_constructor (type, NULL);
|
||||
exp = build_zero_init (type,
|
||||
/*nelts=*/NULL_TREE,
|
||||
/*static_storage_p=*/false);
|
||||
return get_target_expr (exp);
|
||||
}
|
||||
|
||||
|
@ -129,13 +129,14 @@
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "CPP 1"
|
||||
.TH CPP 1 "2006-03-06" "gcc-3.4.6" "GNU"
|
||||
.TH CPP 1 "2007-07-19" "gcc-4.2.1" "GNU"
|
||||
.SH "NAME"
|
||||
cpp \- The C Preprocessor
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
cpp [\fB\-D\fR\fImacro\fR[=\fIdefn\fR]...] [\fB\-U\fR\fImacro\fR]
|
||||
[\fB\-I\fR\fIdir\fR...] [\fB\-W\fR\fIwarn\fR...]
|
||||
[\fB\-I\fR\fIdir\fR...] [\fB\-iquote\fR\fIdir\fR...]
|
||||
[\fB\-W\fR\fIwarn\fR...]
|
||||
[\fB\-M\fR|\fB\-MM\fR] [\fB\-MG\fR] [\fB\-MF\fR \fIfilename\fR]
|
||||
[\fB\-MP\fR] [\fB\-MQ\fR \fItarget\fR...]
|
||||
[\fB\-MT\fR \fItarget\fR...]
|
||||
@ -218,7 +219,6 @@ options may \fInot\fR be grouped: \fB\-dM\fR is very different from
|
||||
Predefine \fIname\fR as a macro, with definition \f(CW1\fR.
|
||||
.IP "\fB\-D\fR \fIname\fR\fB=\fR\fIdefinition\fR" 4
|
||||
.IX Item "-D name=definition"
|
||||
Predefine \fIname\fR as a macro, with definition \fIdefinition\fR.
|
||||
The contents of \fIdefinition\fR are tokenized and processed as if
|
||||
they appeared during translation phase three in a \fB#define\fR
|
||||
directive. In particular, the definition will be truncated by
|
||||
@ -282,7 +282,6 @@ comment, or whenever a backslash-newline appears in a \fB//\fR comment.
|
||||
(Both forms have the same effect.)
|
||||
.IP "\fB\-Wtrigraphs\fR" 4
|
||||
.IX Item "-Wtrigraphs"
|
||||
@anchor{Wtrigraphs}
|
||||
Most trigraphs in comments cannot affect the meaning of the program.
|
||||
However, a trigraph that would form an escaped newline (\fB??/\fR at
|
||||
the end of a line) can, by changing where the comment begins or ends.
|
||||
@ -316,7 +315,7 @@ time it is redefined or undefined.
|
||||
Built-in macros, macros defined on the command line, and macros
|
||||
defined in include files are not warned about.
|
||||
.Sp
|
||||
\&\fBNote:\fR If a macro is actually used, but only used in skipped
|
||||
\&\fINote:\fR If a macro is actually used, but only used in skipped
|
||||
conditional blocks, then \s-1CPP\s0 will report it as unused. To avoid the
|
||||
warning in such a case, you might improve the scope of the macro's
|
||||
definition by, for example, moving it into the first skipped block.
|
||||
@ -397,8 +396,6 @@ This implies that the choice of angle brackets or double quotes in an
|
||||
\&\fB#include\fR directive does not in itself determine whether that
|
||||
header will appear in \fB\-MM\fR dependency output. This is a
|
||||
slight change in semantics from \s-1GCC\s0 versions 3.0 and earlier.
|
||||
.Sp
|
||||
@anchor{dashMF}
|
||||
.IP "\fB\-MF\fR \fIfile\fR" 4
|
||||
.IX Item "-MF file"
|
||||
When used with \fB\-M\fR or \fB\-MM\fR, specifies a
|
||||
@ -471,8 +468,7 @@ argument but with a suffix of \fI.d\fR, otherwise it take the
|
||||
basename of the input file and applies a \fI.d\fR suffix.
|
||||
.Sp
|
||||
If \fB\-MD\fR is used in conjunction with \fB\-E\fR, any
|
||||
\&\fB\-o\fR switch is understood to specify the dependency output file
|
||||
(but \f(CW@pxref\fR{dashMF,,\-MF}), but if used without \fB\-E\fR, each \fB\-o\fR
|
||||
\&\fB\-o\fR switch is understood to specify the dependency output file, but if used without \fB\-E\fR, each \fB\-o\fR
|
||||
is understood to specify a target object file.
|
||||
.Sp
|
||||
Since \fB\-E\fR is not implied, \fB\-MD\fR can be used to generate
|
||||
@ -480,7 +476,7 @@ a dependency output file as a side-effect of the compilation process.
|
||||
.IP "\fB\-MMD\fR" 4
|
||||
.IX Item "-MMD"
|
||||
Like \fB\-MD\fR except mention only user header files, not system
|
||||
\&\-header files.
|
||||
header files.
|
||||
.IP "\fB\-x c\fR" 4
|
||||
.IX Item "-x c"
|
||||
.PD 0
|
||||
@ -500,7 +496,7 @@ extensions for \*(C+ and assembly are also recognized. If cpp does not
|
||||
recognize the extension, it will treat the file as C; this is the most
|
||||
generic mode.
|
||||
.Sp
|
||||
\&\fBNote:\fR Previous versions of cpp accepted a \fB\-lang\fR option
|
||||
\&\fINote:\fR Previous versions of cpp accepted a \fB\-lang\fR option
|
||||
which selected both the language and the standards conformance level.
|
||||
This option has been removed, because it conflicts with the \fB\-l\fR
|
||||
option.
|
||||
@ -584,6 +580,8 @@ directories are searched for all \fB#include\fR directives.
|
||||
.Sp
|
||||
In addition, \fB\-I\-\fR inhibits the use of the directory of the current
|
||||
file directory as the first search directory for \f(CW\*(C`#include\ "\f(CIfile\f(CW"\*(C'\fR.
|
||||
.Sp
|
||||
This option has been deprecated.
|
||||
.IP "\fB\-nostdinc\fR" 4
|
||||
.IX Item "-nostdinc"
|
||||
Do not search the standard system directories for header files.
|
||||
@ -634,16 +632,34 @@ Append \fIdir\fR to the prefix specified previously with
|
||||
\&\fB\-iprefix\fR, and add the resulting directory to the include search
|
||||
path. \fB\-iwithprefixbefore\fR puts it in the same place \fB\-I\fR
|
||||
would; \fB\-iwithprefix\fR puts it where \fB\-idirafter\fR would.
|
||||
.IP "\fB\-isysroot\fR \fIdir\fR" 4
|
||||
.IX Item "-isysroot dir"
|
||||
This option is like the \fB\-\-sysroot\fR option, but applies only to
|
||||
header files. See the \fB\-\-sysroot\fR option for more information.
|
||||
.IP "\fB\-imultilib\fR \fIdir\fR" 4
|
||||
.IX Item "-imultilib dir"
|
||||
Use \fIdir\fR as a subdirectory of the directory containing
|
||||
target-specific \*(C+ headers.
|
||||
.IP "\fB\-isystem\fR \fIdir\fR" 4
|
||||
.IX Item "-isystem dir"
|
||||
Search \fIdir\fR for header files, after all directories specified by
|
||||
\&\fB\-I\fR but before the standard system directories. Mark it
|
||||
as a system directory, so that it gets the same special treatment as
|
||||
is applied to the standard system directories.
|
||||
.IP "\fB\-iquote\fR \fIdir\fR" 4
|
||||
.IX Item "-iquote dir"
|
||||
Search \fIdir\fR only for header files requested with
|
||||
\&\f(CW\*(C`#include\ "\f(CIfile\f(CW"\*(C'\fR; they are not searched for
|
||||
\&\f(CW\*(C`#include\ <\f(CIfile\f(CW>\*(C'\fR, before all directories specified by
|
||||
\&\fB\-I\fR and before the standard system directories.
|
||||
.IP "\fB\-fdollars\-in\-identifiers\fR" 4
|
||||
.IX Item "-fdollars-in-identifiers"
|
||||
@anchor{fdollars\-in\-identifiers}
|
||||
Accept \fB$\fR in identifiers.
|
||||
.IP "\fB\-fextended\-identifiers\fR" 4
|
||||
.IX Item "-fextended-identifiers"
|
||||
Accept universal character names in identifiers. This option is
|
||||
experimental; in a future version of \s-1GCC\s0, it will be enabled by
|
||||
default for C99 and \*(C+.
|
||||
.IP "\fB\-fpreprocessed\fR" 4
|
||||
.IX Item "-fpreprocessed"
|
||||
Indicate to the preprocessor that the input file has already been
|
||||
@ -674,17 +690,17 @@ supported by the system's \f(CW\*(C`iconv\*(C'\fR library routine.
|
||||
Set the wide execution character set, used for wide string and
|
||||
character constants. The default is \s-1UTF\-32\s0 or \s-1UTF\-16\s0, whichever
|
||||
corresponds to the width of \f(CW\*(C`wchar_t\*(C'\fR. As with
|
||||
\&\fB\-ftarget\-charset\fR, \fIcharset\fR can be any encoding supported
|
||||
\&\fB\-fexec\-charset\fR, \fIcharset\fR can be any encoding supported
|
||||
by the system's \f(CW\*(C`iconv\*(C'\fR library routine; however, you will have
|
||||
problems with encodings that do not fit exactly in \f(CW\*(C`wchar_t\*(C'\fR.
|
||||
.IP "\fB\-finput\-charset=\fR\fIcharset\fR" 4
|
||||
.IX Item "-finput-charset=charset"
|
||||
Set the input character set, used for translation from the character
|
||||
set of the input file to the source character set used by \s-1GCC\s0. If the
|
||||
set of the input file to the source character set used by \s-1GCC\s0. If the
|
||||
locale does not specify, or \s-1GCC\s0 cannot get this information from the
|
||||
locale, the default is \s-1UTF\-8\s0. This can be overridden by either the locale
|
||||
or this command line option. Currently the command line option takes
|
||||
precedence if there's a conflict. \fIcharset\fR can be any encoding
|
||||
locale, the default is \s-1UTF\-8\s0. This can be overridden by either the locale
|
||||
or this command line option. Currently the command line option takes
|
||||
precedence if there's a conflict. \fIcharset\fR can be any encoding
|
||||
supported by the system's \f(CW\*(C`iconv\*(C'\fR library routine.
|
||||
.IP "\fB\-fworking\-directory\fR" 4
|
||||
.IX Item "-fworking-directory"
|
||||
@ -892,7 +908,7 @@ main input file is omitted.
|
||||
.SH "COPYRIGHT"
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright (c) 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996,
|
||||
1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||||
1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
Free Software Foundation, Inc.
|
||||
.PP
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
|
11186
contrib/gcc/doc/gcc.1
11186
contrib/gcc/doc/gcc.1
File diff suppressed because it is too large
Load Diff
@ -129,7 +129,7 @@
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "GCOV 1"
|
||||
.TH GCOV 1 "2006-03-06" "gcc-3.4.6" "GNU"
|
||||
.TH GCOV 1 "2007-07-19" "gcc-4.2.1" "GNU"
|
||||
.SH "NAME"
|
||||
gcov \- coverage testing tool
|
||||
.SH "SYNOPSIS"
|
||||
@ -222,8 +222,8 @@ and exit without doing any further processing.
|
||||
.IP "\fB\-\-all\-blocks\fR" 4
|
||||
.IX Item "--all-blocks"
|
||||
.PD
|
||||
Write individual execution counts for every basic block. Normally gcov
|
||||
outputs execution counts only for the main blocks of a line. With this
|
||||
Write individual execution counts for every basic block. Normally gcov
|
||||
outputs execution counts only for the main blocks of a line. With this
|
||||
option you can determine if blocks within a single line are not being
|
||||
executed.
|
||||
.IP "\fB\-b\fR" 4
|
||||
@ -234,7 +234,7 @@ executed.
|
||||
.PD
|
||||
Write branch frequencies to the output file, and write branch summary
|
||||
info to the standard output. This option allows you to see how often
|
||||
each branch in your program was taken. Unconditional branches will not
|
||||
each branch in your program was taken. Unconditional branches will not
|
||||
be shown, unless the \fB\-u\fR option is given.
|
||||
.IP "\fB\-c\fR" 4
|
||||
.IX Item "-c"
|
||||
@ -262,7 +262,7 @@ header file \fIx.h\fR contains code, and was included in the file
|
||||
\&\fIa.c\fR, then running \fBgcov\fR on the file \fIa.c\fR will produce
|
||||
an output file called \fIa.c##x.h.gcov\fR instead of \fIx.h.gcov\fR.
|
||||
This can be useful if \fIx.h\fR is included in multiple source
|
||||
files. If you uses the \fB\-p\fR option, both the including and
|
||||
files. If you use the \fB\-p\fR option, both the including and
|
||||
included file names will be complete path names.
|
||||
.IP "\fB\-p\fR" 4
|
||||
.IX Item "-p"
|
||||
@ -271,11 +271,12 @@ included file names will be complete path names.
|
||||
.IX Item "--preserve-paths"
|
||||
.PD
|
||||
Preserve complete path information in the names of generated
|
||||
\&\fI.gcov\fR files. Without this option, just the filename component is
|
||||
used. With this option, all directories are used, with '/' characters
|
||||
translated to '#' characters, '.' directory components removed and '..'
|
||||
components renamed to '^'. This is useful if sourcefiles are in several
|
||||
different directories. It also affects the \fB\-l\fR option.
|
||||
\&\fI.gcov\fR files. Without this option, just the filename component is
|
||||
used. With this option, all directories are used, with \fB/\fR characters
|
||||
translated to \fB#\fR characters, \fI.\fR directory components
|
||||
removed and \fI..\fR
|
||||
components renamed to \fB^\fR. This is useful if sourcefiles are in several
|
||||
different directories. It also affects the \fB\-l\fR option.
|
||||
.IP "\fB\-f\fR" 4
|
||||
.IX Item "-f"
|
||||
.PD 0
|
||||
@ -292,11 +293,11 @@ Output summaries for each function in addition to the file level summary.
|
||||
.IX Item "--object-file file"
|
||||
.PD
|
||||
Specify either the directory containing the gcov data files, or the
|
||||
object path name. The \fI.gcno\fR, and
|
||||
\&\fI.gcda\fR data files are searched for using this option. If a directory
|
||||
object path name. The \fI.gcno\fR, and
|
||||
\&\fI.gcda\fR data files are searched for using this option. If a directory
|
||||
is specified, the data files are in that directory and named after the
|
||||
source file name, without its extension. If a file is specified here,
|
||||
the data files are named after that file, without its extension. If this
|
||||
source file name, without its extension. If a file is specified here,
|
||||
the data files are named after that file, without its extension. If this
|
||||
option is not supplied, it defaults to the current directory.
|
||||
.IP "\fB\-u\fR" 4
|
||||
.IX Item "-u"
|
||||
@ -304,35 +305,53 @@ option is not supplied, it defaults to the current directory.
|
||||
.IP "\fB\-\-unconditional\-branches\fR" 4
|
||||
.IX Item "--unconditional-branches"
|
||||
.PD
|
||||
When branch counts are given, include those of unconditional branches.
|
||||
When branch probabilities are given, include those of unconditional branches.
|
||||
Unconditional branches are normally not interesting.
|
||||
.PP
|
||||
\&\fBgcov\fR should be run with the current directory the same as that
|
||||
when you invoked the compiler. Otherwise it will not be able to locate
|
||||
the source files. \fBgcov\fR produces files called
|
||||
\&\fI\fImangledname\fI.gcov\fR in the current directory. These contain
|
||||
when you invoked the compiler. Otherwise it will not be able to locate
|
||||
the source files. \fBgcov\fR produces files called
|
||||
\&\fI\fImangledname\fI.gcov\fR in the current directory. These contain
|
||||
the coverage information of the source file they correspond to.
|
||||
One \fI.gcov\fR file is produced for each source file containing code,
|
||||
which was compiled to produce the data files. The \fImangledname\fR part
|
||||
which was compiled to produce the data files. The \fImangledname\fR part
|
||||
of the output file name is usually simply the source file name, but can
|
||||
be something more complicated if the \fB\-l\fR or \fB\-p\fR options are
|
||||
given. Refer to those options for details.
|
||||
given. Refer to those options for details.
|
||||
.PP
|
||||
The \fI.gcov\fR files contain the ':' separated fields along with
|
||||
program source code. The format is
|
||||
The \fI.gcov\fR files contain the \fB:\fR separated fields along with
|
||||
program source code. The format is
|
||||
.PP
|
||||
.Vb 1
|
||||
\& <execution_count>:<line_number>:<source line text>
|
||||
.Ve
|
||||
.PP
|
||||
Additional block information may succeed each line, when requested by
|
||||
command line option. The \fIexecution_count\fR is \fB\-\fR for lines
|
||||
containing no code and \fB#####\fR for lines which were never
|
||||
executed. Some lines of information at the start have \fIline_number\fR
|
||||
of zero.
|
||||
command line option. The \fIexecution_count\fR is \fB\-\fR for lines
|
||||
containing no code and \fB#####\fR for lines which were never executed.
|
||||
Some lines of information at the start have \fIline_number\fR of zero.
|
||||
.PP
|
||||
The preamble lines are of the form
|
||||
.PP
|
||||
.Vb 1
|
||||
\& -:0:<tag>:<value>
|
||||
.Ve
|
||||
.PP
|
||||
The ordering and number of these preamble lines will be augmented as
|
||||
\&\fBgcov\fR development progresses \-\-\- do not rely on them remaining
|
||||
unchanged. Use \fItag\fR to locate a particular preamble line.
|
||||
.PP
|
||||
The additional block information is of the form
|
||||
.PP
|
||||
.Vb 1
|
||||
\& <tag> <information>
|
||||
.Ve
|
||||
.PP
|
||||
The \fIinformation\fR is human readable, but designed to be simple
|
||||
enough for machine parsing too.
|
||||
.PP
|
||||
When printing percentages, 0% and 100% are only printed when the values
|
||||
are \fIexactly\fR 0% and 100% respectively. Other values which would
|
||||
are \fIexactly\fR 0% and 100% respectively. Other values which would
|
||||
conventionally be rounded to 0% or 100% are instead printed as the
|
||||
nearest non-boundary value.
|
||||
.PP
|
||||
@ -364,7 +383,7 @@ is what you see when you use the basic \fBgcov\fR facility:
|
||||
The file \fItmp.c.gcov\fR contains output from \fBgcov\fR.
|
||||
Here is a sample:
|
||||
.PP
|
||||
.Vb 23
|
||||
.Vb 22
|
||||
\& -: 0:Source:tmp.c
|
||||
\& -: 0:Graph:tmp.gcno
|
||||
\& -: 0:Data:tmp.gcda
|
||||
@ -373,7 +392,6 @@ Here is a sample:
|
||||
\& -: 1:#include <stdio.h>
|
||||
\& -: 2:
|
||||
\& -: 3:int main (void)
|
||||
\& function main called 1 returned 1 blocks executed 75%
|
||||
\& 1: 4:{
|
||||
\& 1: 5: int i, total;
|
||||
\& -: 6:
|
||||
@ -393,7 +411,7 @@ Here is a sample:
|
||||
When you use the \fB\-a\fR option, you will get individual block
|
||||
counts, and the output looks like this:
|
||||
.PP
|
||||
.Vb 30
|
||||
.Vb 29
|
||||
\& -: 0:Source:tmp.c
|
||||
\& -: 0:Graph:tmp.gcno
|
||||
\& -: 0:Data:tmp.gcda
|
||||
@ -402,7 +420,6 @@ counts, and the output looks like this:
|
||||
\& -: 1:#include <stdio.h>
|
||||
\& -: 2:
|
||||
\& -: 3:int main (void)
|
||||
\& function main called 1 returned 1 blocks executed 75%
|
||||
\& 1: 4:{
|
||||
\& 1: 4-block 0
|
||||
\& 1: 5: int i, total;
|
||||
@ -427,11 +444,11 @@ counts, and the output looks like this:
|
||||
.Ve
|
||||
.PP
|
||||
In this mode, each basic block is only shown on one line \*(-- the last
|
||||
line of the block. A multi-line block will only contribute to the
|
||||
line of the block. A multi-line block will only contribute to the
|
||||
execution count of that last line, and other lines will not be shown
|
||||
to contain code, unless previous blocks end on those lines.
|
||||
The total execution count of a line is shown and subsequent lines show
|
||||
the execution counts for individual blocks that end on that line. After each
|
||||
the execution counts for individual blocks that end on that line. After each
|
||||
block, the branch and call counts of the block will be shown, if the
|
||||
\&\fB\-b\fR option is given.
|
||||
.PP
|
||||
@ -484,6 +501,10 @@ Here is a sample of a resulting \fItmp.c.gcov\fR file:
|
||||
\& -: 17:}
|
||||
.Ve
|
||||
.PP
|
||||
For each function, a line is printed showing how many times the function
|
||||
is called, how many times it returns and what percentage of the
|
||||
function's blocks were executed.
|
||||
.PP
|
||||
For each basic block, a line is printed after the last line of the basic
|
||||
block describing the branch or call that ends the basic block. There can
|
||||
be multiple branches and calls listed for a single source line if there
|
||||
@ -496,12 +517,12 @@ on the source line.
|
||||
For a branch, if it was executed at least once, then a percentage
|
||||
indicating the number of times the branch was taken divided by the
|
||||
number of times the branch was executed will be printed. Otherwise, the
|
||||
message ``never executed'' is printed.
|
||||
message \*(L"never executed\*(R" is printed.
|
||||
.PP
|
||||
For a call, if it was executed at least once, then a percentage
|
||||
indicating the number of times the call returned divided by the number
|
||||
of times the call was executed will be printed. This will usually be
|
||||
100%, but may be less for functions call \f(CW\*(C`exit\*(C'\fR or \f(CW\*(C`longjmp\*(C'\fR,
|
||||
100%, but may be less for functions that call \f(CW\*(C`exit\*(C'\fR or \f(CW\*(C`longjmp\*(C'\fR,
|
||||
and thus may not return every time they are called.
|
||||
.PP
|
||||
The execution counts are cumulative. If the example program were
|
||||
@ -581,14 +602,14 @@ same source lines, the line counts themselves might seem inconsistent.
|
||||
\&\fIgpl\fR\|(7), \fIgfdl\fR\|(7), \fIfsf\-funding\fR\|(7), \fIgcc\fR\|(1) and the Info entry for \fIgcc\fR.
|
||||
.SH "COPYRIGHT"
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright (c) 1996, 1997, 1999, 2000, 2001, 2002, 2003
|
||||
Copyright (c) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
Free Software Foundation, Inc.
|
||||
.PP
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.2 or
|
||||
any later version published by the Free Software Foundation; with the
|
||||
Invariant Sections being ``\s-1GNU\s0 General Public License'' and ``Funding
|
||||
Free Software'', the Front-Cover texts being (a) (see below), and with
|
||||
Invariant Sections being \*(L"\s-1GNU\s0 General Public License\*(R" and \*(L"Funding
|
||||
Free Software\*(R", the Front-Cover texts being (a) (see below), and with
|
||||
the Back-Cover Texts being (b) (see below). A copy of the license is
|
||||
included in the \fIgfdl\fR\|(7) man page.
|
||||
.PP
|
||||
|
@ -14289,7 +14289,9 @@ dwarf2out_finish (const char *filename)
|
||||
else if (TYPE_P (node->created_for))
|
||||
context = TYPE_CONTEXT (node->created_for);
|
||||
|
||||
gcc_assert (context && TREE_CODE (context) == FUNCTION_DECL);
|
||||
gcc_assert (context
|
||||
&& (TREE_CODE (context) == FUNCTION_DECL
|
||||
|| TREE_CODE (context) == NAMESPACE_DECL));
|
||||
|
||||
origin = lookup_decl_die (context);
|
||||
if (origin)
|
||||
|
@ -1005,7 +1005,11 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map,
|
||||
for (prev_try = VEC_index (eh_region, cfun->eh->region_array, outer_region);
|
||||
prev_try && prev_try->type != ERT_TRY;
|
||||
prev_try = prev_try->outer)
|
||||
;
|
||||
if (prev_try->type == ERT_MUST_NOT_THROW)
|
||||
{
|
||||
prev_try = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Remap all of the internal catch and cleanup linkages. Since we
|
||||
duplicate entire subtrees, all of the referenced regions will have
|
||||
|
@ -4450,13 +4450,24 @@ merge_ranges (int *pin_p, tree *plow, tree *phigh, int in0_p, tree low0,
|
||||
{
|
||||
low = range_successor (high1);
|
||||
high = high0;
|
||||
in_p = (low != 0);
|
||||
in_p = 1;
|
||||
if (low == 0)
|
||||
{
|
||||
/* We are in the weird situation where high0 > high1 but
|
||||
high1 has no successor. Punt. */
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else if (! subset || highequal)
|
||||
{
|
||||
low = low0;
|
||||
high = range_predecessor (low1);
|
||||
in_p = (high != 0);
|
||||
in_p = 1;
|
||||
if (high == 0)
|
||||
{
|
||||
/* low0 < low1 but low1 has no predecessor. Punt. */
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
@ -4476,7 +4487,12 @@ merge_ranges (int *pin_p, tree *plow, tree *phigh, int in0_p, tree low0,
|
||||
{
|
||||
low = range_successor (high0);
|
||||
high = high1;
|
||||
in_p = (low != 0);
|
||||
in_p = 1;
|
||||
if (low == 0)
|
||||
{
|
||||
/* high1 > high0 but high0 has no successor. Punt. */
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -12634,9 +12650,14 @@ tree_expr_nonnegative_warnv_p (tree t, bool *strict_overflow_p)
|
||||
/* ... fall through ... */
|
||||
|
||||
default:
|
||||
if (truth_value_p (TREE_CODE (t)))
|
||||
/* Truth values evaluate to 0 or 1, which is nonnegative. */
|
||||
return 1;
|
||||
{
|
||||
tree type = TREE_TYPE (t);
|
||||
if ((TYPE_PRECISION (type) != 1 || TYPE_UNSIGNED (type))
|
||||
&& truth_value_p (TREE_CODE (t)))
|
||||
/* Truth values evaluate to 0 or 1, which is nonnegative unless we
|
||||
have a signed:1 type (where the value is -1 and 0). */
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/* We don't know sign of `t', so be conservative and return false. */
|
||||
|
@ -4053,6 +4053,19 @@ gimplify_asm_expr (tree *expr_p, tree *pre_p, tree *post_p)
|
||||
parse_input_constraint (&constraint, 0, 0, noutputs, 0,
|
||||
oconstraints, &allows_mem, &allows_reg);
|
||||
|
||||
/* If we can't make copies, we can only accept memory. */
|
||||
if (TREE_ADDRESSABLE (TREE_TYPE (TREE_VALUE (link))))
|
||||
{
|
||||
if (allows_mem)
|
||||
allows_reg = 0;
|
||||
else
|
||||
{
|
||||
error ("impossible constraint in %<asm%>");
|
||||
error ("non-memory input %d must stay in memory", i);
|
||||
return GS_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
/* If the operand is a memory input, it should be an lvalue. */
|
||||
if (!allows_reg && allows_mem)
|
||||
{
|
||||
@ -4802,7 +4815,20 @@ gimplify_adjust_omp_clauses_1 (splay_tree_node n, void *data)
|
||||
else if (flags & GOVD_SHARED)
|
||||
{
|
||||
if (is_global_var (decl))
|
||||
return 0;
|
||||
{
|
||||
struct gimplify_omp_ctx *ctx = gimplify_omp_ctxp->outer_context;
|
||||
while (ctx != NULL)
|
||||
{
|
||||
splay_tree_node on
|
||||
= splay_tree_lookup (ctx->variables, (splay_tree_key) decl);
|
||||
if (on && (on->value & (GOVD_FIRSTPRIVATE | GOVD_LASTPRIVATE
|
||||
| GOVD_PRIVATE | GOVD_REDUCTION)) != 0)
|
||||
break;
|
||||
ctx = ctx->outer_context;
|
||||
}
|
||||
if (ctx == NULL)
|
||||
return 0;
|
||||
}
|
||||
code = OMP_CLAUSE_SHARED;
|
||||
}
|
||||
else if (flags & GOVD_PRIVATE)
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* POSIX threads dummy routines for systems without weak definitions. */
|
||||
/* Compile this one with gcc. */
|
||||
/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
|
||||
#include "tconfig.h"
|
||||
#include "tm.h"
|
||||
# define __gthrw_pragma(pragma) _Pragma (#pragma)
|
||||
/* Define so we provide weak definitions of functions used by libobjc only. */
|
||||
#define _LIBOBJC_WEAK
|
||||
#include "gthr.h"
|
||||
@ -75,7 +76,7 @@ pthread_create (pthread_t *thread ATTRIBUTE_UNUSED,
|
||||
}
|
||||
|
||||
int
|
||||
pthread_cancel(pthread_t thread ATTRIBUTE_UNUSED)
|
||||
pthread_cancel (pthread_t thread ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* Threads compatibility routines for libgcc2 and libobjc. */
|
||||
/* Compile this one with gcc. */
|
||||
/* Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
/* Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
@ -59,8 +59,12 @@ typedef pthread_mutex_t __gthread_recursive_mutex_t;
|
||||
#endif
|
||||
|
||||
#if SUPPORTS_WEAK && GTHREAD_USE_WEAK
|
||||
# ifndef __gthrw_pragma
|
||||
# define __gthrw_pragma(pragma)
|
||||
# endif
|
||||
# define __gthrw2(name,name2,type) \
|
||||
static __typeof(type) name __attribute__ ((__weakref__(#name2)));
|
||||
static __typeof(type) name __attribute__ ((__weakref__(#name2))); \
|
||||
__gthrw_pragma(weak type)
|
||||
# define __gthrw_(name) __gthrw_ ## name
|
||||
#else
|
||||
# define __gthrw2(name,name2,type)
|
||||
|
@ -1490,7 +1490,7 @@ implies_p (rtx a, rtx b)
|
||||
mode = VOIDmode;
|
||||
}
|
||||
|
||||
if (mode != VOIDmode
|
||||
if (SCALAR_INT_MODE_P (mode)
|
||||
&& rtx_equal_p (op1, opb1)
|
||||
&& simplify_gen_binary (MINUS, mode, opb0, op0) == const1_rtx)
|
||||
return true;
|
||||
|
@ -1,3 +1,7 @@
|
||||
2007-07-19 Release Manager
|
||||
|
||||
* GCC 4.2.1 released.
|
||||
|
||||
2007-05-13 Release Manager
|
||||
|
||||
* GCC 4.2.0 released.
|
||||
|
@ -384,9 +384,12 @@ determine_parallel_type (struct omp_region *region)
|
||||
|
||||
if (single_succ (par_entry_bb) == ws_entry_bb
|
||||
&& single_succ (ws_exit_bb) == par_exit_bb
|
||||
&& workshare_safe_to_combine_p (par_entry_bb, ws_entry_bb))
|
||||
&& workshare_safe_to_combine_p (par_entry_bb, ws_entry_bb)
|
||||
&& (OMP_PARALLEL_COMBINED (last_stmt (par_entry_bb))
|
||||
|| (last_and_only_stmt (ws_entry_bb)
|
||||
&& last_and_only_stmt (par_exit_bb))))
|
||||
{
|
||||
tree ws_stmt = last_stmt (region->inner->entry);
|
||||
tree ws_stmt = last_stmt (ws_entry_bb);
|
||||
|
||||
if (region->inner->type == OMP_FOR)
|
||||
{
|
||||
@ -1505,9 +1508,9 @@ lookup_decl_in_outer_ctx (tree decl, omp_context *ctx)
|
||||
for (up = ctx->outer, t = NULL; up && t == NULL; up = up->outer)
|
||||
t = maybe_lookup_decl (decl, up);
|
||||
|
||||
gcc_assert (t);
|
||||
gcc_assert (t || is_global_var (decl));
|
||||
|
||||
return t;
|
||||
return t ? t : decl;
|
||||
}
|
||||
|
||||
|
||||
@ -4119,6 +4122,28 @@ lower_omp_for (tree *stmt_p, omp_context *ctx)
|
||||
*stmt_p = new_stmt;
|
||||
}
|
||||
|
||||
/* Callback for walk_stmts. Check if *TP only contains OMP_FOR
|
||||
or OMP_PARALLEL. */
|
||||
|
||||
static tree
|
||||
check_combined_parallel (tree *tp, int *walk_subtrees, void *data)
|
||||
{
|
||||
struct walk_stmt_info *wi = data;
|
||||
int *info = wi->info;
|
||||
|
||||
*walk_subtrees = 0;
|
||||
switch (TREE_CODE (*tp))
|
||||
{
|
||||
case OMP_FOR:
|
||||
case OMP_SECTIONS:
|
||||
*info = *info == 0 ? 1 : -1;
|
||||
break;
|
||||
default:
|
||||
*info = -1;
|
||||
break;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Lower the OpenMP parallel directive in *STMT_P. CTX holds context
|
||||
information for the directive. */
|
||||
@ -4136,6 +4161,19 @@ lower_omp_parallel (tree *stmt_p, omp_context *ctx)
|
||||
par_bind = OMP_PARALLEL_BODY (stmt);
|
||||
par_body = BIND_EXPR_BODY (par_bind);
|
||||
child_fn = ctx->cb.dst_fn;
|
||||
if (!OMP_PARALLEL_COMBINED (stmt))
|
||||
{
|
||||
struct walk_stmt_info wi;
|
||||
int ws_num = 0;
|
||||
|
||||
memset (&wi, 0, sizeof (wi));
|
||||
wi.callback = check_combined_parallel;
|
||||
wi.info = &ws_num;
|
||||
wi.val_only = true;
|
||||
walk_stmts (&wi, &par_bind);
|
||||
if (ws_num == 1)
|
||||
OMP_PARALLEL_COMBINED (stmt) = 1;
|
||||
}
|
||||
|
||||
push_gimplify_context ();
|
||||
|
||||
|
@ -22,13 +22,12 @@ Boston, MA 02110-1301, USA. */
|
||||
#include "system.h"
|
||||
#include "pointer-set.h"
|
||||
|
||||
/* A pointer sets is represented as a simple open-addressing hash
|
||||
/* A pointer set is represented as a simple open-addressing hash
|
||||
table. Simplifications: The hash code is based on the value of the
|
||||
pointer, not what it points to. The number of buckets is always a
|
||||
power of 2. Null pointers are a reserved value. Deletion is not
|
||||
supported. There is no mechanism for user control of hash
|
||||
function, equality comparison, initial size, or resizing policy.
|
||||
*/
|
||||
supported (yet). There is no mechanism for user control of hash
|
||||
function, equality comparison, initial size, or resizing policy. */
|
||||
|
||||
struct pointer_set_t
|
||||
{
|
||||
@ -114,22 +113,16 @@ pointer_set_contains (struct pointer_set_t *pset, void *p)
|
||||
}
|
||||
}
|
||||
|
||||
/* Subroutine of pointer_set_insert. Inserts P into an empty
|
||||
element of SLOTS, an array of length N_SLOTS. Returns nonzero
|
||||
if P was already present in N_SLOTS. */
|
||||
static int
|
||||
/* Subroutine of pointer_set_insert. Return the insertion slot for P into
|
||||
an empty element of SLOTS, an array of length N_SLOTS. */
|
||||
static inline size_t
|
||||
insert_aux (void *p, void **slots, size_t n_slots, size_t log_slots)
|
||||
{
|
||||
size_t n = hash1 (p, n_slots, log_slots);
|
||||
while (true)
|
||||
{
|
||||
if (slots[n] == p)
|
||||
return 1;
|
||||
else if (slots[n] == 0)
|
||||
{
|
||||
slots[n] = p;
|
||||
return 0;
|
||||
}
|
||||
if (slots[n] == p || slots[n] == 0)
|
||||
return n;
|
||||
else
|
||||
{
|
||||
++n;
|
||||
@ -144,12 +137,10 @@ insert_aux (void *p, void **slots, size_t n_slots, size_t log_slots)
|
||||
int
|
||||
pointer_set_insert (struct pointer_set_t *pset, void *p)
|
||||
{
|
||||
if (insert_aux (p, pset->slots, pset->n_slots, pset->log_slots))
|
||||
return 1;
|
||||
|
||||
/* We've inserted a new element. Expand the table if necessary to keep
|
||||
the load factor small. */
|
||||
++pset->n_elements;
|
||||
size_t n;
|
||||
|
||||
/* For simplicity, expand the set even if P is already there. This can be
|
||||
superfluous but can happen at most once. */
|
||||
if (pset->n_elements > pset->n_slots / 4)
|
||||
{
|
||||
size_t new_log_slots = pset->log_slots + 1;
|
||||
@ -158,9 +149,10 @@ pointer_set_insert (struct pointer_set_t *pset, void *p)
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < pset->n_slots; ++i)
|
||||
{
|
||||
if (pset->slots[i])
|
||||
insert_aux (pset->slots[i], new_slots, new_n_slots, new_log_slots);
|
||||
{
|
||||
void *value = pset->slots[i];
|
||||
n = insert_aux (value, new_slots, new_n_slots, new_log_slots);
|
||||
new_slots[n] = value;
|
||||
}
|
||||
|
||||
XDELETEVEC (pset->slots);
|
||||
@ -169,5 +161,144 @@ pointer_set_insert (struct pointer_set_t *pset, void *p)
|
||||
pset->slots = new_slots;
|
||||
}
|
||||
|
||||
n = insert_aux (p, pset->slots, pset->n_slots, pset->log_slots);
|
||||
if (pset->slots[n])
|
||||
return 1;
|
||||
|
||||
pset->slots[n] = p;
|
||||
++pset->n_elements;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Pass each pointer in PSET to the function in FN, together with the fixed
|
||||
parameter DATA. If FN returns false, the iteration stops. */
|
||||
|
||||
void pointer_set_traverse (struct pointer_set_t *pset,
|
||||
bool (*fn) (void *, void *), void *data)
|
||||
{
|
||||
size_t i;
|
||||
for (i = 0; i < pset->n_slots; ++i)
|
||||
if (pset->slots[i] && !fn (pset->slots[i], data))
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
/* A pointer map is represented the same way as a pointer_set, so
|
||||
the hash code is based on the address of the key, rather than
|
||||
its contents. Null keys are a reserved value. Deletion is not
|
||||
supported (yet). There is no mechanism for user control of hash
|
||||
function, equality comparison, initial size, or resizing policy. */
|
||||
|
||||
struct pointer_map_t
|
||||
{
|
||||
size_t log_slots;
|
||||
size_t n_slots; /* n_slots = 2^log_slots */
|
||||
size_t n_elements;
|
||||
|
||||
void **keys;
|
||||
void **values;
|
||||
};
|
||||
|
||||
/* Allocate an empty pointer map. */
|
||||
struct pointer_map_t *
|
||||
pointer_map_create (void)
|
||||
{
|
||||
struct pointer_map_t *result = XNEW (struct pointer_map_t);
|
||||
|
||||
result->n_elements = 0;
|
||||
result->log_slots = 8;
|
||||
result->n_slots = (size_t) 1 << result->log_slots;
|
||||
|
||||
result->keys = XCNEWVEC (void *, result->n_slots);
|
||||
result->values = XCNEWVEC (void *, result->n_slots);
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Reclaims all memory associated with PMAP. */
|
||||
void pointer_map_destroy (struct pointer_map_t *pmap)
|
||||
{
|
||||
XDELETEVEC (pmap->keys);
|
||||
XDELETEVEC (pmap->values);
|
||||
XDELETE (pmap);
|
||||
}
|
||||
|
||||
/* Returns a pointer to the value to which P maps, if PMAP contains P. P
|
||||
must be nonnull. Return NULL if PMAP does not contain P.
|
||||
|
||||
Collisions are resolved by linear probing. */
|
||||
void **
|
||||
pointer_map_contains (struct pointer_map_t *pmap, void *p)
|
||||
{
|
||||
size_t n = hash1 (p, pmap->n_slots, pmap->log_slots);
|
||||
|
||||
while (true)
|
||||
{
|
||||
if (pmap->keys[n] == p)
|
||||
return &pmap->values[n];
|
||||
else if (pmap->keys[n] == 0)
|
||||
return NULL;
|
||||
else
|
||||
{
|
||||
++n;
|
||||
if (n == pmap->n_slots)
|
||||
n = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Inserts P into PMAP if it wasn't already there. Returns a pointer
|
||||
to the value. P must be nonnull. */
|
||||
void **
|
||||
pointer_map_insert (struct pointer_map_t *pmap, void *p)
|
||||
{
|
||||
size_t n;
|
||||
|
||||
/* For simplicity, expand the map even if P is already there. This can be
|
||||
superfluous but can happen at most once. */
|
||||
if (pmap->n_elements > pmap->n_slots / 4)
|
||||
{
|
||||
size_t new_log_slots = pmap->log_slots + 1;
|
||||
size_t new_n_slots = pmap->n_slots * 2;
|
||||
void **new_keys = XCNEWVEC (void *, new_n_slots);
|
||||
void **new_values = XCNEWVEC (void *, new_n_slots);
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < pmap->n_slots; ++i)
|
||||
if (pmap->keys[i])
|
||||
{
|
||||
void *key = pmap->keys[i];
|
||||
n = insert_aux (key, new_keys, new_n_slots, new_log_slots);
|
||||
new_keys[n] = key;
|
||||
new_values[n] = pmap->values[i];
|
||||
}
|
||||
|
||||
XDELETEVEC (pmap->keys);
|
||||
XDELETEVEC (pmap->values);
|
||||
pmap->n_slots = new_n_slots;
|
||||
pmap->log_slots = new_log_slots;
|
||||
pmap->keys = new_keys;
|
||||
pmap->values = new_values;
|
||||
}
|
||||
|
||||
n = insert_aux (p, pmap->keys, pmap->n_slots, pmap->log_slots);
|
||||
if (!pmap->keys[n])
|
||||
{
|
||||
++pmap->n_elements;
|
||||
pmap->keys[n] = p;
|
||||
}
|
||||
|
||||
return &pmap->values[n];
|
||||
}
|
||||
|
||||
/* Pass each pointer in PMAP to the function in FN, together with the pointer
|
||||
to the value and the fixed parameter DATA. If FN returns false, the
|
||||
iteration stops. */
|
||||
|
||||
void pointer_map_traverse (struct pointer_map_t *pmap,
|
||||
bool (*fn) (void *, void **, void *), void *data)
|
||||
{
|
||||
size_t i;
|
||||
for (i = 0; i < pmap->n_slots; ++i)
|
||||
if (pmap->keys[i] && !fn (pmap->keys[i], &pmap->values[i], data))
|
||||
break;
|
||||
}
|
||||
|
@ -22,11 +22,21 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
#define POINTER_SET_H
|
||||
|
||||
struct pointer_set_t;
|
||||
|
||||
struct pointer_set_t *pointer_set_create (void);
|
||||
void pointer_set_destroy (struct pointer_set_t *pset);
|
||||
|
||||
int pointer_set_contains (struct pointer_set_t *pset, void *p);
|
||||
int pointer_set_insert (struct pointer_set_t *pset, void *p);
|
||||
void pointer_set_traverse (struct pointer_set_t *, bool (*) (void *, void *),
|
||||
void *);
|
||||
|
||||
struct pointer_map_t;
|
||||
struct pointer_map_t *pointer_map_create (void);
|
||||
void pointer_map_destroy (struct pointer_map_t *pmap);
|
||||
|
||||
void **pointer_map_contains (struct pointer_map_t *pmap, void *p);
|
||||
void **pointer_map_insert (struct pointer_map_t *pmap, void *p);
|
||||
void pointer_map_traverse (struct pointer_map_t *,
|
||||
bool (*) (void *, void **, void *), void *);
|
||||
|
||||
#endif /* POINTER_SET_H */
|
||||
|
@ -113,7 +113,8 @@ static bool if_convertible_stmt_p (struct loop *, basic_block, tree);
|
||||
static bool if_convertible_bb_p (struct loop *, basic_block, basic_block);
|
||||
static bool if_convertible_loop_p (struct loop *, bool);
|
||||
static void add_to_predicate_list (basic_block, tree);
|
||||
static tree add_to_dst_predicate_list (struct loop * loop, basic_block, tree, tree,
|
||||
static tree add_to_dst_predicate_list (struct loop * loop, edge,
|
||||
tree, tree,
|
||||
block_stmt_iterator *);
|
||||
static void clean_predicate_lists (struct loop *loop);
|
||||
static basic_block find_phi_replacement_condition (struct loop *loop,
|
||||
@ -143,7 +144,6 @@ tree_if_conversion (struct loop *loop, bool for_vectorizer)
|
||||
{
|
||||
basic_block bb;
|
||||
block_stmt_iterator itr;
|
||||
tree cond;
|
||||
unsigned int i;
|
||||
|
||||
ifc_bbs = NULL;
|
||||
@ -163,11 +163,11 @@ tree_if_conversion (struct loop *loop, bool for_vectorizer)
|
||||
return false;
|
||||
}
|
||||
|
||||
cond = NULL_TREE;
|
||||
|
||||
/* Do actual work now. */
|
||||
for (i = 0; i < loop->num_nodes; i++)
|
||||
{
|
||||
tree cond;
|
||||
|
||||
bb = ifc_bbs [i];
|
||||
|
||||
/* Update condition using predicate list. */
|
||||
@ -191,7 +191,6 @@ tree_if_conversion (struct loop *loop, bool for_vectorizer)
|
||||
basic_block bb_n = single_succ (bb);
|
||||
if (cond != NULL_TREE)
|
||||
add_to_predicate_list (bb_n, cond);
|
||||
cond = NULL_TREE;
|
||||
}
|
||||
}
|
||||
|
||||
@ -275,12 +274,12 @@ tree_if_convert_cond_expr (struct loop *loop, tree stmt, tree cond,
|
||||
/* Add new condition into destination's predicate list. */
|
||||
|
||||
/* If 'c' is true then TRUE_EDGE is taken. */
|
||||
add_to_dst_predicate_list (loop, true_edge->dest, cond,
|
||||
add_to_dst_predicate_list (loop, true_edge, cond,
|
||||
unshare_expr (c), bsi);
|
||||
|
||||
/* If 'c' is false then FALSE_EDGE is taken. */
|
||||
c2 = invert_truthvalue (unshare_expr (c));
|
||||
add_to_dst_predicate_list (loop, false_edge->dest, cond, c2, bsi);
|
||||
add_to_dst_predicate_list (loop, false_edge, cond, c2, bsi);
|
||||
|
||||
/* Now this conditional statement is redundant. Remove it.
|
||||
But, do not remove exit condition! Update exit condition
|
||||
@ -565,7 +564,15 @@ if_convertible_loop_p (struct loop *loop, bool for_vectorizer ATTRIBUTE_UNUSED)
|
||||
/* ??? Check data dependency for vectorizer. */
|
||||
|
||||
/* What about phi nodes ? */
|
||||
for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
|
||||
phi = phi_nodes (bb);
|
||||
|
||||
/* Clear aux field of incoming edges to a bb with a phi node. */
|
||||
if (phi)
|
||||
FOR_EACH_EDGE (e, ei, bb->preds)
|
||||
e->aux = NULL;
|
||||
|
||||
/* Check statements. */
|
||||
for (; phi; phi = PHI_CHAIN (phi))
|
||||
if (!if_convertible_phi_p (loop, bb, phi))
|
||||
return false;
|
||||
|
||||
@ -602,13 +609,13 @@ add_to_predicate_list (basic_block bb, tree new_cond)
|
||||
existing condition. */
|
||||
|
||||
static tree
|
||||
add_to_dst_predicate_list (struct loop * loop, basic_block bb,
|
||||
add_to_dst_predicate_list (struct loop * loop, edge e,
|
||||
tree prev_cond, tree cond,
|
||||
block_stmt_iterator *bsi)
|
||||
{
|
||||
tree new_cond = NULL_TREE;
|
||||
|
||||
if (!flow_bb_inside_loop_p (loop, bb))
|
||||
if (!flow_bb_inside_loop_p (loop, e->dest))
|
||||
return NULL_TREE;
|
||||
|
||||
if (prev_cond == boolean_true_node || !prev_cond)
|
||||
@ -629,6 +636,11 @@ add_to_dst_predicate_list (struct loop * loop, basic_block bb,
|
||||
if (tmp_stmts2)
|
||||
bsi_insert_before (bsi, tmp_stmts2, BSI_SAME_STMT);
|
||||
|
||||
/* Add the condition to aux field of the edge. In case edge
|
||||
destination is a PHI node, this condition will be ANDed with
|
||||
block predicate to construct complete condition. */
|
||||
e->aux = cond;
|
||||
|
||||
/* new_cond == prev_cond AND cond */
|
||||
tmp = build2 (TRUTH_AND_EXPR, boolean_type_node,
|
||||
unshare_expr (prev_cond), cond);
|
||||
@ -636,22 +648,30 @@ add_to_dst_predicate_list (struct loop * loop, basic_block bb,
|
||||
bsi_insert_before (bsi, tmp_stmt, BSI_SAME_STMT);
|
||||
new_cond = TREE_OPERAND (tmp_stmt, 0);
|
||||
}
|
||||
add_to_predicate_list (bb, new_cond);
|
||||
add_to_predicate_list (e->dest, new_cond);
|
||||
return new_cond;
|
||||
}
|
||||
|
||||
/* During if-conversion aux field from basic block is used to hold predicate
|
||||
list. Clean each basic block's predicate list for the given LOOP. */
|
||||
/* During if-conversion aux field from basic block structure is used to hold
|
||||
predicate list. Clean each basic block's predicate list for the given LOOP.
|
||||
Also clean aux field of succesor edges, used to hold true and false
|
||||
condition from conditional expression. */
|
||||
|
||||
static void
|
||||
clean_predicate_lists (struct loop *loop)
|
||||
{
|
||||
basic_block *bb;
|
||||
unsigned int i;
|
||||
edge e;
|
||||
edge_iterator ei;
|
||||
|
||||
bb = get_loop_body (loop);
|
||||
for (i = 0; i < loop->num_nodes; i++)
|
||||
bb[i]->aux = NULL;
|
||||
|
||||
{
|
||||
bb[i]->aux = NULL;
|
||||
FOR_EACH_EDGE (e, ei, bb[i]->succs)
|
||||
e->aux = NULL;
|
||||
}
|
||||
free (bb);
|
||||
}
|
||||
|
||||
@ -664,13 +684,12 @@ find_phi_replacement_condition (struct loop *loop,
|
||||
basic_block bb, tree *cond,
|
||||
block_stmt_iterator *bsi)
|
||||
{
|
||||
basic_block first_bb = NULL;
|
||||
basic_block second_bb = NULL;
|
||||
edge first_edge, second_edge;
|
||||
tree tmp_cond, new_stmts;
|
||||
|
||||
gcc_assert (EDGE_COUNT (bb->preds) == 2);
|
||||
first_bb = (EDGE_PRED (bb, 0))->src;
|
||||
second_bb = (EDGE_PRED (bb, 1))->src;
|
||||
first_edge = EDGE_PRED (bb, 0);
|
||||
second_edge = EDGE_PRED (bb, 1);
|
||||
|
||||
/* Use condition based on following criteria:
|
||||
1)
|
||||
@ -691,42 +710,55 @@ find_phi_replacement_condition (struct loop *loop,
|
||||
S3: x = (c == d) ? b : a;
|
||||
|
||||
S3 is preferred over S1 and S2*, Make 'b' first_bb and use
|
||||
its condition.
|
||||
its condition.
|
||||
|
||||
4) If pred B is dominated by pred A then use pred B's condition.
|
||||
See PR23115. */
|
||||
|
||||
/* Select condition that is not TRUTH_NOT_EXPR. */
|
||||
tmp_cond = first_bb->aux;
|
||||
tmp_cond = (first_edge->src)->aux;
|
||||
if (TREE_CODE (tmp_cond) == TRUTH_NOT_EXPR)
|
||||
{
|
||||
basic_block tmp_bb;
|
||||
tmp_bb = first_bb;
|
||||
first_bb = second_bb;
|
||||
second_bb = tmp_bb;
|
||||
edge tmp_edge;
|
||||
|
||||
tmp_edge = first_edge;
|
||||
first_edge = second_edge;
|
||||
second_edge = tmp_edge;
|
||||
}
|
||||
|
||||
/* Check if FIRST_BB is loop header or not and make sure that
|
||||
FIRST_BB does not dominate SECOND_BB. */
|
||||
if (first_bb == loop->header
|
||||
|| dominated_by_p (CDI_DOMINATORS, second_bb, first_bb))
|
||||
if (first_edge->src == loop->header
|
||||
|| dominated_by_p (CDI_DOMINATORS,
|
||||
second_edge->src, first_edge->src))
|
||||
{
|
||||
tmp_cond = second_bb->aux;
|
||||
if (TREE_CODE (tmp_cond) == TRUTH_NOT_EXPR)
|
||||
{
|
||||
/* Select non loop header condition but do not switch basic blocks. */
|
||||
*cond = invert_truthvalue (unshare_expr (tmp_cond));
|
||||
}
|
||||
*cond = (second_edge->src)->aux;
|
||||
|
||||
/* If there is a condition on an incoming edge,
|
||||
AND it with the incoming bb predicate. */
|
||||
if (second_edge->aux)
|
||||
*cond = build2 (TRUTH_AND_EXPR, boolean_type_node,
|
||||
*cond, second_edge->aux);
|
||||
|
||||
if (TREE_CODE (*cond) == TRUTH_NOT_EXPR)
|
||||
/* We can be smart here and choose inverted
|
||||
condition without switching bbs. */
|
||||
*cond = invert_truthvalue (*cond);
|
||||
else
|
||||
{
|
||||
/* Select non loop header condition. */
|
||||
first_bb = second_bb;
|
||||
*cond = first_bb->aux;
|
||||
}
|
||||
/* Select non loop header bb. */
|
||||
first_edge = second_edge;
|
||||
}
|
||||
else
|
||||
/* FIRST_BB is not loop header */
|
||||
*cond = first_bb->aux;
|
||||
{
|
||||
/* FIRST_BB is not loop header */
|
||||
*cond = (first_edge->src)->aux;
|
||||
|
||||
/* If there is a condition on an incoming edge,
|
||||
AND it with the incoming bb predicate. */
|
||||
if (first_edge->aux)
|
||||
*cond = build2 (TRUTH_AND_EXPR, boolean_type_node,
|
||||
*cond, first_edge->aux);
|
||||
}
|
||||
|
||||
/* Create temp. for the condition. Vectorizer prefers to have gimple
|
||||
value as condition. Various targets use different means to communicate
|
||||
@ -746,7 +778,7 @@ find_phi_replacement_condition (struct loop *loop,
|
||||
|
||||
gcc_assert (*cond);
|
||||
|
||||
return first_bb;
|
||||
return first_edge->src;
|
||||
}
|
||||
|
||||
|
||||
@ -777,10 +809,6 @@ replace_phi_with_cond_modify_expr (tree phi, tree cond, basic_block true_bb,
|
||||
/* Find basic block and initialize iterator. */
|
||||
bb = bb_for_stmt (phi);
|
||||
|
||||
new_stmt = NULL_TREE;
|
||||
arg_0 = NULL_TREE;
|
||||
arg_1 = NULL_TREE;
|
||||
|
||||
/* Use condition that is not TRUTH_NOT_EXPR in conditional modify expr. */
|
||||
if (EDGE_PRED (bb, 1)->src == true_bb)
|
||||
{
|
||||
|
@ -1747,6 +1747,12 @@ infer_loop_bounds_from_undefined (struct loop *loop)
|
||||
{
|
||||
bb = bbs[i];
|
||||
|
||||
/* If BB is not executed in each iteration of the loop, we cannot
|
||||
use the operations in it to infer reliable upper bound on the
|
||||
# of iterations of the loop. */
|
||||
if (!dominated_by_p (CDI_DOMINATORS, loop->latch, bb))
|
||||
continue;
|
||||
|
||||
for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi))
|
||||
{
|
||||
tree stmt = bsi_stmt (bsi);
|
||||
|
@ -2162,9 +2162,14 @@ build_ssa_operands (tree stmt)
|
||||
{
|
||||
stmt_ann_t ann = get_stmt_ann (stmt);
|
||||
|
||||
/* Initially assume that the statement has no volatile operands. */
|
||||
/* Initially assume that the statement has no volatile operands and
|
||||
does not take the address of any symbols. */
|
||||
if (ann)
|
||||
ann->has_volatile_ops = false;
|
||||
{
|
||||
ann->has_volatile_ops = false;
|
||||
if (ann->addresses_taken)
|
||||
ann->addresses_taken = NULL;
|
||||
}
|
||||
|
||||
start_ssa_stmt_operands ();
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -195,6 +195,27 @@ is_overflow_infinity (tree val)
|
||||
|| operand_equal_p (val, TYPE_MIN_VALUE (TREE_TYPE (val)), 0)));
|
||||
}
|
||||
|
||||
/* If VAL is now an overflow infinity, return VAL. Otherwise, return
|
||||
the same value with TREE_OVERFLOW clear. This can be used to avoid
|
||||
confusing a regular value with an overflow value. */
|
||||
|
||||
static inline tree
|
||||
avoid_overflow_infinity (tree val)
|
||||
{
|
||||
if (!is_overflow_infinity (val))
|
||||
return val;
|
||||
|
||||
if (operand_equal_p (val, TYPE_MAX_VALUE (TREE_TYPE (val)), 0))
|
||||
return TYPE_MAX_VALUE (TREE_TYPE (val));
|
||||
else
|
||||
{
|
||||
#ifdef ENABLE_CHECKING
|
||||
gcc_assert (operand_equal_p (val, TYPE_MIN_VALUE (TREE_TYPE (val)), 0));
|
||||
#endif
|
||||
return TYPE_MIN_VALUE (TREE_TYPE (val));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Return whether VAL is equal to the maximum value of its type. This
|
||||
will be true for a positive overflow infinity. We can't do a
|
||||
@ -351,23 +372,11 @@ set_value_range_to_varying (value_range_t *vr)
|
||||
infinity when we shouldn't. */
|
||||
|
||||
static inline void
|
||||
set_value_range_to_value (value_range_t *vr, tree val)
|
||||
set_value_range_to_value (value_range_t *vr, tree val, bitmap equiv)
|
||||
{
|
||||
gcc_assert (is_gimple_min_invariant (val));
|
||||
if (is_overflow_infinity (val))
|
||||
{
|
||||
if (operand_equal_p (val, TYPE_MAX_VALUE (TREE_TYPE (val)), 0))
|
||||
val = TYPE_MAX_VALUE (TREE_TYPE (val));
|
||||
else
|
||||
{
|
||||
#ifdef ENABLE_CHECKING
|
||||
gcc_assert (operand_equal_p (val,
|
||||
TYPE_MIN_VALUE (TREE_TYPE (val)), 0));
|
||||
#endif
|
||||
val = TYPE_MIN_VALUE (TREE_TYPE (val));
|
||||
}
|
||||
}
|
||||
set_value_range (vr, VR_RANGE, val, val, NULL);
|
||||
val = avoid_overflow_infinity (val);
|
||||
set_value_range (vr, VR_RANGE, val, val, equiv);
|
||||
}
|
||||
|
||||
/* Set value range VR to a non-negative range of type TYPE.
|
||||
@ -411,8 +420,7 @@ set_value_range_to_nonnull (value_range_t *vr, tree type)
|
||||
static inline void
|
||||
set_value_range_to_null (value_range_t *vr, tree type)
|
||||
{
|
||||
tree zero = build_int_cst (type, 0);
|
||||
set_value_range (vr, VR_RANGE, zero, zero, vr->equiv);
|
||||
set_value_range_to_value (vr, build_int_cst (type, 0), vr->equiv);
|
||||
}
|
||||
|
||||
|
||||
@ -763,7 +771,9 @@ compare_values_warnv (tree val1, tree val2, bool *strict_overflow_p)
|
||||
if (!TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (val1)))
|
||||
return -2;
|
||||
|
||||
if (strict_overflow_p != NULL)
|
||||
if (strict_overflow_p != NULL
|
||||
&& (code1 == SSA_NAME || !TREE_NO_WARNING (val1))
|
||||
&& (code2 == SSA_NAME || !TREE_NO_WARNING (val2)))
|
||||
*strict_overflow_p = true;
|
||||
|
||||
if (code1 == SSA_NAME)
|
||||
@ -1028,6 +1038,8 @@ extract_range_from_assert (value_range_t *vr_p, tree expr)
|
||||
cond_code = swap_tree_comparison (TREE_CODE (cond));
|
||||
}
|
||||
|
||||
limit = avoid_overflow_infinity (limit);
|
||||
|
||||
type = TREE_TYPE (limit);
|
||||
gcc_assert (limit != var);
|
||||
|
||||
@ -1167,6 +1179,8 @@ extract_range_from_assert (value_range_t *vr_p, tree expr)
|
||||
{
|
||||
tree one = build_int_cst (type, 1);
|
||||
max = fold_build2 (MINUS_EXPR, type, max, one);
|
||||
if (EXPR_P (max))
|
||||
TREE_NO_WARNING (max) = 1;
|
||||
}
|
||||
|
||||
set_value_range (vr_p, VR_RANGE, min, max, vr_p->equiv);
|
||||
@ -1200,6 +1214,8 @@ extract_range_from_assert (value_range_t *vr_p, tree expr)
|
||||
{
|
||||
tree one = build_int_cst (type, 1);
|
||||
min = fold_build2 (PLUS_EXPR, type, min, one);
|
||||
if (EXPR_P (min))
|
||||
TREE_NO_WARNING (min) = 1;
|
||||
}
|
||||
|
||||
set_value_range (vr_p, VR_RANGE, min, max, vr_p->equiv);
|
||||
@ -1619,7 +1635,7 @@ extract_range_from_binary_expr (value_range_t *vr, tree expr)
|
||||
if (TREE_CODE (op0) == SSA_NAME)
|
||||
vr0 = *(get_value_range (op0));
|
||||
else if (is_gimple_min_invariant (op0))
|
||||
set_value_range_to_value (&vr0, op0);
|
||||
set_value_range_to_value (&vr0, op0, NULL);
|
||||
else
|
||||
set_value_range_to_varying (&vr0);
|
||||
|
||||
@ -1627,7 +1643,7 @@ extract_range_from_binary_expr (value_range_t *vr, tree expr)
|
||||
if (TREE_CODE (op1) == SSA_NAME)
|
||||
vr1 = *(get_value_range (op1));
|
||||
else if (is_gimple_min_invariant (op1))
|
||||
set_value_range_to_value (&vr1, op1);
|
||||
set_value_range_to_value (&vr1, op1, NULL);
|
||||
else
|
||||
set_value_range_to_varying (&vr1);
|
||||
|
||||
@ -2006,7 +2022,7 @@ extract_range_from_unary_expr (value_range_t *vr, tree expr)
|
||||
if (TREE_CODE (op0) == SSA_NAME)
|
||||
vr0 = *(get_value_range (op0));
|
||||
else if (is_gimple_min_invariant (op0))
|
||||
set_value_range_to_value (&vr0, op0);
|
||||
set_value_range_to_value (&vr0, op0, NULL);
|
||||
else
|
||||
set_value_range_to_varying (&vr0);
|
||||
|
||||
@ -2091,6 +2107,8 @@ extract_range_from_unary_expr (value_range_t *vr, tree expr)
|
||||
&& is_gimple_val (new_max)
|
||||
&& tree_int_cst_equal (new_min, orig_min)
|
||||
&& tree_int_cst_equal (new_max, orig_max)
|
||||
&& (!is_overflow_infinity (new_min)
|
||||
|| !is_overflow_infinity (new_max))
|
||||
&& compare_values (new_min, new_max) <= 0
|
||||
&& compare_values (new_min, new_max) >= -1)
|
||||
{
|
||||
@ -2393,7 +2411,10 @@ extract_range_from_comparison (value_range_t *vr, tree expr)
|
||||
its type may be different from _Bool. Convert VAL to EXPR's
|
||||
type. */
|
||||
val = fold_convert (TREE_TYPE (expr), val);
|
||||
set_value_range (vr, VR_RANGE, val, val, vr->equiv);
|
||||
if (is_gimple_min_invariant (val))
|
||||
set_value_range_to_value (vr, val, vr->equiv);
|
||||
else
|
||||
set_value_range (vr, VR_RANGE, val, val, vr->equiv);
|
||||
}
|
||||
else
|
||||
set_value_range_to_varying (vr);
|
||||
@ -2424,7 +2445,7 @@ extract_range_from_expr (value_range_t *vr, tree expr)
|
||||
else if (TREE_CODE_CLASS (code) == tcc_comparison)
|
||||
extract_range_from_comparison (vr, expr);
|
||||
else if (is_gimple_min_invariant (expr))
|
||||
set_value_range_to_value (vr, expr);
|
||||
set_value_range_to_value (vr, expr, NULL);
|
||||
else
|
||||
set_value_range_to_varying (vr);
|
||||
|
||||
@ -2545,6 +2566,13 @@ adjust_range_with_scev (value_range_t *vr, struct loop *loop, tree stmt,
|
||||
if (compare_values (min, max) == 1)
|
||||
return;
|
||||
}
|
||||
|
||||
/* According to the loop information, the variable does not
|
||||
overflow. If we think it does, probably because of an
|
||||
overflow due to arithmetic on a different INF value,
|
||||
reset now. */
|
||||
if (is_negative_overflow_infinity (min))
|
||||
min = tmin;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2557,12 +2585,61 @@ adjust_range_with_scev (value_range_t *vr, struct loop *loop, tree stmt,
|
||||
if (compare_values (min, max) == 1)
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_positive_overflow_infinity (max))
|
||||
max = tmax;
|
||||
}
|
||||
|
||||
set_value_range (vr, VR_RANGE, min, max, vr->equiv);
|
||||
}
|
||||
}
|
||||
|
||||
/* Return true if VAR may overflow at STMT. This checks any available
|
||||
loop information to see if we can determine that VAR does not
|
||||
overflow. */
|
||||
|
||||
static bool
|
||||
vrp_var_may_overflow (tree var, tree stmt)
|
||||
{
|
||||
struct loop *l;
|
||||
tree chrec, init, step;
|
||||
|
||||
if (current_loops == NULL)
|
||||
return true;
|
||||
|
||||
l = loop_containing_stmt (stmt);
|
||||
if (l == NULL)
|
||||
return true;
|
||||
|
||||
chrec = instantiate_parameters (l, analyze_scalar_evolution (l, var));
|
||||
if (TREE_CODE (chrec) != POLYNOMIAL_CHREC)
|
||||
return true;
|
||||
|
||||
init = initial_condition_in_loop_num (chrec, l->num);
|
||||
step = evolution_part_in_loop_num (chrec, l->num);
|
||||
|
||||
if (step == NULL_TREE
|
||||
|| !is_gimple_min_invariant (step)
|
||||
|| !valid_value_p (init))
|
||||
return true;
|
||||
|
||||
/* If we get here, we know something useful about VAR based on the
|
||||
loop information. If it wraps, it may overflow. */
|
||||
|
||||
if (scev_probably_wraps_p (init, step, stmt,
|
||||
current_loops->parray[CHREC_VARIABLE (chrec)],
|
||||
true))
|
||||
return true;
|
||||
|
||||
if (dump_file && (dump_flags & TDF_DETAILS) != 0)
|
||||
{
|
||||
print_generic_expr (dump_file, var, 0);
|
||||
fprintf (dump_file, ": loop information indicates does not overflow\n");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/* Given two numeric value ranges VR0, VR1 and a comparison code COMP:
|
||||
|
||||
@ -4156,7 +4233,7 @@ compare_names (enum tree_code comp, tree n1, tree n2,
|
||||
t = retval = NULL_TREE;
|
||||
EXECUTE_IF_SET_IN_BITMAP (e2, 0, i2, bi2)
|
||||
{
|
||||
bool sop;
|
||||
bool sop = false;
|
||||
|
||||
value_range_t vr2 = *(vr_value[i2]);
|
||||
|
||||
@ -4773,7 +4850,8 @@ vrp_visit_phi_node (tree phi)
|
||||
if (vrp_val_is_max (vr_result.max))
|
||||
goto varying;
|
||||
|
||||
if (!needs_overflow_infinity (TREE_TYPE (vr_result.min)))
|
||||
if (!needs_overflow_infinity (TREE_TYPE (vr_result.min))
|
||||
|| !vrp_var_may_overflow (lhs, phi))
|
||||
vr_result.min = TYPE_MIN_VALUE (TREE_TYPE (vr_result.min));
|
||||
else if (supports_overflow_infinity (TREE_TYPE (vr_result.min)))
|
||||
vr_result.min =
|
||||
@ -4791,7 +4869,8 @@ vrp_visit_phi_node (tree phi)
|
||||
if (vrp_val_is_min (vr_result.min))
|
||||
goto varying;
|
||||
|
||||
if (!needs_overflow_infinity (TREE_TYPE (vr_result.max)))
|
||||
if (!needs_overflow_infinity (TREE_TYPE (vr_result.max))
|
||||
|| !vrp_var_may_overflow (lhs, phi))
|
||||
vr_result.max = TYPE_MAX_VALUE (TREE_TYPE (vr_result.max));
|
||||
else if (supports_overflow_infinity (TREE_TYPE (vr_result.max)))
|
||||
vr_result.max =
|
||||
@ -4971,6 +5050,8 @@ test_for_singularity (enum tree_code cond_code, tree op0,
|
||||
{
|
||||
tree one = build_int_cst (TREE_TYPE (op0), 1);
|
||||
max = fold_build2 (MINUS_EXPR, TREE_TYPE (op0), max, one);
|
||||
if (EXPR_P (max))
|
||||
TREE_NO_WARNING (max) = 1;
|
||||
}
|
||||
}
|
||||
else if (cond_code == GE_EXPR || cond_code == GT_EXPR)
|
||||
@ -4984,6 +5065,8 @@ test_for_singularity (enum tree_code cond_code, tree op0,
|
||||
{
|
||||
tree one = build_int_cst (TREE_TYPE (op0), 1);
|
||||
min = fold_build2 (PLUS_EXPR, TREE_TYPE (op0), min, one);
|
||||
if (EXPR_P (min))
|
||||
TREE_NO_WARNING (min) = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user