Steven Bosscher [Mon, 23 Jul 2012 11:59:15 +0000 (11:59 +0000)]
coverage.c: Refer to "notes file" instead of "graph file" in all comments.
gcc/
* coverage.c: Refer to "notes file" instead of "graph file"
in all comments. Explain history of bbg prefix.
* gcov-io.h: Likewise.
* gcov.c: Likewise.
(find_source): Likewise in fnotice.
(read_graph_file): Likewise.
(read_count_file): Likewise.
* doc/gcov.texi: Document -fprofile-dir flag. Add "notes file"
and "data file" explicitly in the explanation of the files.
Steven Bosscher [Mon, 23 Jul 2012 09:24:21 +0000 (09:24 +0000)]
opts.c (common_handle_option): Do not set flag_value_profile_transformations for -fprofile-generate.
* opts.c (common_handle_option): Do not set
flag_value_profile_transformations for -fprofile-generate.
* profile.c (instrument_values): Use COUNTER_FOR_HIST_TYPE.
(BB_TO_GCOV_INDEX): Remove.
(output_location): Don't use it.
(branch_prob): Likewise. Don't fiddle with the index of
ENTRY_BLOCK_PTR and EXIT_BLOCK_PTR. Use clear_aux_for_blocks.
(find_spanning_tree):
* gcov.c (struct function_info): Document that blocks 0 and 1
are the entry resp. exit blocks in gcov, too, like in GCC itself.
(solve_flow_graph): Use ENTRY_BLOCK and EXIT_BLOCK for special
blocks identification.
(output_lines): Likewise.
* value-prof.c (gimple_value_profile_transformations): Do not
test flag_value_profile_transformations again.
(gimple_ic_transform): Take a gimple_stmt_iterator like all other
transformation functions.
(gimple_values_to_profile):
Don't test flag_value_profile_transformations
* tree-profile.c (tree_profiling): Assert that the cgraph is in
the CGRAPH_STATE_IPA_SSA state.
Do not set, or look at, after_tree_profile.
* function.h (struct function): Remove after_tree_profile bit.
* omp-low.c (expand_omp_taskreg): Don't set after_tree_profile.
* tree-inline.c (initialize_cfun): Don't copy it.
* lto-streamer-out.c (output_struct_function_base): Don't stream it.
* lto-streamer-in.c (input_struct_function_base): Likewise.
* exp_ch7.adb, switch-m.adb, exp_ch3.adb, freeze.adb: Minor reformatting
2012-07-23 Ed Schonberg <schonberg@adacore.com>
* exp_ch5.adb (Expand_Iterator_Loop_Over_Array): If original
loop carries an identifier, preserve it when rewriting it as a
standard loop to validate exit statements that may reference
that name in the body of the loop.
* sem_ch4.adb (Analyze_Selected_Component): When checking for
potential ambiguities with class-wide operations on synchronized
types, attach the copied node properly to the tree, to prevent
errors during expansion.
2012-07-23 Yannick Moy <moy@adacore.com>
* sem_ch5.adb (Analyze_Loop_Statement): Make sure the loop body
is analyzed in Alfa mode.
2012-07-23 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb: Adjust previous change.
2012-07-23 Vincent Pucci <pucci@adacore.com>
* sem_ch9.adb (Allows_Lock_Free_Implementation): Flag
Lock_Free_Given renames previous flag Complain. Description
updated. Henceforth, catch every error messages issued by this
routine when Lock_Free_Given is True. Declaration restriction
updated: No non-elementary parameter instead (even in parameter)
New subprogram body restrictions implemented: No allocator,
no address, import or export rep items, no delay statement,
no goto statement, no quantified expression and no dereference
of access value.
* checks.adb (Determine_Range): Add local variable Btyp. Handle
the case where the base type of an enumeration subtype is
private. Replace all occurrences of Base_Type with Btyp.
* exp_attr.adb (Attribute_Valid): Handle the case where the
base type of an enumeration subtype is private. Replace all
occurrences of Base_Type with Btyp.
* sem_util.adb (Get_Enum_Lit_From_Pos): Add local variable
Btyp. Handle the case where the base type of an enumeration
subtype is private. Replace all occurrences of Base_Type with
Btyp.
* par-ch6.adb (P_Mode): in Ada 2005, a mode indicator can apply
to a formal object of an anonymous access type.
2012-07-23 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Try_Container_Indexing): A user-defined indexing
aspect can have more than one index, e.g. to describe indexing
of a multidimensional object.
* exp_ch4.adb (Apply_Accessibility_Check): Reimplemented. The check is
now more complex and contains optional finalization part and mandatory
deallocation part.
* sem_res.adb (Resolve_Explicit_Derenference): If prefix is
overloaded, remove those interpretations whose designated type
does not match the context, to avoid spurious ambiguities that
may be caused by the Ada 2012 conversion rule for anonymous
access types.
* g-spitbo.adb (Substr (String)): Return full string and do not
raise exception when Start is 1 and Len is exactly the length
of the string parameter.
* g-spitbo.ads: Fix spelling error in the name of exception
Index_Error.
2012-07-23 Ed Schonberg <schonberg@adacore.com>
* par.adb: new subprogram Get_Aspect_Specifications.
* par-ch6.adb (P_Subprogram): handle subprogram bodies with aspect
specifications.
* par-ch13.adb (Get_Aspect_Specifications): extracted from
P_Aspect_Specifications. Collect aspect specifications in some
legal context, but do not attach them to any declaration. Used
when parsing subprogram declarations or bodies that include
aspect specifications.
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): If aspects are
present, analyze them, or reject them if the subprogram as a
previous spec.
2012-07-23 Vasiliy Fofanov <fofanov@adacore.com>
* gnat_ugn.texi: Omit section on other platforms/runtimes support
in gnattest for vms version.
2012-07-23 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications):
Handle properly aspects that can be specified on a subprogram
body: CPU, Priority, and Interrupt_Priority.
2012-07-23 Claire Dross <dross@adacore.com>
* a-cfdlli.ads: Switch definition of Constant_Reference_Type
and Empty_List.
2012-07-23 Thomas Quinot <quinot@adacore.com>
* par_sco.adb (Process_Decisions.Output_Header): For the guard
on an alternative in a SELECT statement, use the First_Sloc
of the guard expression (not its topmost sloc) as the decision
location, because this is what is referenced by dominance markers.
* exp_ch7.adb (Requires_Hooking): Examine the original expression
of an object declaration node because a function call that
returns on the secondary stack may have been rewritten into
something else.
2012-07-23 Vincent Pucci <pucci@adacore.com>
* sem_dim.adb (Analyze_Dimension_Has_Etype): For identifier, propagate
dimension when entity is a non-dimensionless constant.
(Analyze_Dimension_Object_Declaration): Propagate
dimension from the expression to the entity when type is a
dimensioned type and object is a constant.
2012-07-23 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Analyze_Attribute, case 'Old): if the prefix
is not an entity name, expand at once so that code generated by
the expansion of the prefix is not generated before the constant
that captures the old value is properly inserted and analyzed.
2012-07-23 Thomas Quinot <quinot@adacore.com>
* exp_ch9.adb (Ensure_Statement_Present): Mark generated NULL
statement as Comes_From_Source so that GIGI does not eliminate it.
* sem_ch12.adb (Insert_Freeze_Node_For_Instance): Inst is now
a local variable. Retrieve the related instance when processing
a subprogram instantiation. Such instances appear as wrapper
packages.
2012-07-23 Vincent Pucci <pucci@adacore.com>
* system-aix64.ads, system-aix.ads, system-darwin-ppc.ads,
system-hpux.ads, system-linux-alpha.ads,
system-linux-hppa.ads, system-linux-ppc.ads,
system-linux-s390.ads, system-linux-s390x.ads,
system-linux-sh4.ads, system-linux-sparc.ads,
system-lynxos-ppc.ads, system-mingw.ads,
system-solaris-sparc.ads, system-solaris-sparcv9.ads,
system-vms_64.ads, * system-vxworks-arm.ads, system-vxworks-m68k.ads,
system-vxworks-mips.ads, system-vxworks-ppc.ads,
system-vxworks-sparcv9.ads: Support_Atomic_Primitives set to False.
* system-darwin-x86.ads, system-darwin-x86_64.ads,
system-freebsd-x86.ads, system-freebsd-x86_64.ads,
system-hpux-ia64.ads, system-linux-ia64.ads, system-linux-x86.ads,
system-linux-x86_64.ads, system-lynxos-x86.ads,
system-mingw-x86_64.ads, system-solaris-x86.ads,
system-solaris-x86_64.ads, system-vms-ia64.ads,
system-vxworks-x86.ads: Support_Atomic_Primitives set to True.
* s-atopri.adb (Lock_Free_Read_X): New body.
(Lock_Free_Try_Write_X): Support_Atomic_Primitives check added.
(Lock_Free_Try_Write_64): New body.
* s-atopri.ads: New type uint.
(Sync_Compare_And_Swap_64): __sync_val_compare_and_swap_8 intrinsic
import.
(Lock_Free_Read_X): Body moved to s-atopri.adb.
(Lock_Free_Try_Write_64): Similar to other Lock_Free_Try_Write_X
routines.
* targparm.adb: New enumeration literal SAP
(Support_Atomic_Primitives) for type Targparm_Tags. New constant
SAP_Str. New component SAP_Str'Access for array Targparm_Str.
(Get_Target_Parameters): Parse Support_Atomic_Primitives_On_Target
flag.
* targparm.ads: New back-end code generation flag
Support_Atomic_Primitives_On_Target
* sem_prag.adb (Make_Inline): If the pragma applies to a
subprogram renaming, set inline flags on both the renamed entity
and on the renaming, so that some ASIS queries can be handled
consistently in the absence of expansion.
* gnat_ugn.texi: Removing obsolete limitation of gnattest
to support only ada05. Updating gnattest support for other
platforms/run-times section to reflect the usage of taget
prefix in gnattest calls. Fixing missed obsolete --stub-default
option name.
2012-07-23 Robert Dewar <dewar@adacore.com>
* uintp.adb: Minor reformatting.
2012-07-23 Olivier Hainque <hainque@adacore.com>
* system-vxworks-ppc.ads: Replace the default
Linker_Options requesting crtbe by a commented out request for
-nostartfiles.
2012-07-23 Vincent Celier <celier@adacore.com>
* prj-nmsc.adb (Check_Naming): Do not get the exceptions names
in a virtual project.
Andrew Pinski [Sat, 21 Jul 2012 10:38:20 +0000 (10:38 +0000)]
mips-protos.h (mips_expand_ext_as_unaligned_load): Add a bool argument.
2012-07-21 Andrew Pinski <apinski@cavium.com>
* config/mips/mips-protos.h (mips_expand_ext_as_unaligned_load):
Add a bool argument.
* config/mips/mips.c (mips_block_move_straight): Update call to
mips_expand_ext_as_unaligned_load.
(mips_expand_ext_as_unaligned_load): Add unsigned_p argument.
Accept DImode dest when the width is that of SImode.
* config/mips/mips.md (extv): Update call to
mips_expand_ext_as_unaligned_load.
(extzv): Likewise.
Richard Guenther [Fri, 20 Jul 2012 12:56:41 +0000 (12:56 +0000)]
tree-dfa.c (collect_dfa_stats): Simplify.
2012-07-20 Richard Guenther <rguenther@suse.de>
* tree-dfa.c (collect_dfa_stats): Simplify.
* tree-ssa-structalias.c (compute_may_aliases): Do not dump
referenced vars.
* cfgexpand.c (estimated_stack_frame_size): Walk over local
decls instead of referenced vars.
* tree-ssa.c (delete_tree_ssa): Simplify.
* tree-tailcall.c (find_tail_calls): Walk over local decls
instead of referenced vars.
(add_virtual_phis): Remove.
(tree_optimize_tail_calls_1): Instead mark the virtual operand
for renaming.
Steven Bosscher [Fri, 20 Jul 2012 12:25:55 +0000 (12:25 +0000)]
basic-block.h (BB_FLAGS_TO_PRESERVE): New define.
gcc/
* basic-block.h (BB_FLAGS_TO_PRESERVE): New define.
(brief_dump_cfg): Update prototype to take flags argument.
(check_bb_profile): Remove prototype.
* tracer.c (tracer): Update brief_dump_cfg calls.
* cfghooks.c (dump_bb): Do not pass TDF_COMMENT to dump_bb_info.
Call dump_bb_info before and after the cfghook dump_bb. Terminate
the dump with a newline.
(dump_flow_info): Do not call check_bb_profile.
* cfg.c (clear_bb_flags): Update using BB_FLAGS_TO_PRESERVE.
(check_bb_profile): Make static. Take indent and flags arguments.
(dump_bb_info): Always dump loop depth. With TDF_DETAILS, call
check_bb_profile. Print one edge per line.
(brief_dump_cfg): Take a flags argument, and filter out
TDF_COMMENT and TDF_DETAILS.
* pretty-print.c (pp_base_newline): Set pp_needs_newline to false.
* gimple-pretty-print.c (dump_gimple_bb_header): Do not use dump_bb_info
here, it is already called from dump_bb. Idem for check_bb_profile.
(dump_gimple_bb_footer): Likewise.
(gimple_dump_bb_buff): Call pp_flush after dump_gimple_stmt to
avoid broken dumps for statement histograms.
(gimple_dump_bb): Handle ENTRY_BLOCK and EXIT_BLOCK. Do
not call pp_flush here, the buffer should be empty.
* sched-rgn.c (debug_region): Pass TDF_BLOCKS to dump_bb.
* sched-vis.c (debug_bb_slim): Likewise.
* tree-cfg.c (remove_bb): Pass dump_flags to dump_bb.
(gimple_debug_bb): Pass TDF_BLOCKS to dump_bb.
(gimple_dump_cfg): Do brief_dump_cfg with TDF_COMMENT.
(dump_function_to_file): Do not call check_bb_profile on
ENTRY_BLOCK and EXIT_BLOCK, check_bb_profile doesn't handle them.
Use dump_bb instead of gimple_dump_bb.
(print_loops_bb): Use dump_bb instead of gimple_dump_bb.
* passes.c (execute_function_dump): Always call print_rtl_with_bb
for RTL dumps.
* cfgrtl.c (print_rtl_with_bb): Handle printing without an up-to-date
CFG. With TDF_BLOCKS and TDF_DETAILS, do DF dumps at the top and bottom
of each basic block.
testsuite/
* gcc.dg/tree-prof/update-loopch.c: Look for counts on the dumps of
the basic block and check loop depth.
* gcc.dg/tree-ssa/pr18133-1.c: Dump details, not blocks. Update
matching patterns and comments.
* gcc.dg/tree-ssa/20031021-1.c: Fix check patterns.
* gcc.dg/tree-ssa/vector-2.c: Likewise.
Eric Botcazou [Thu, 19 Jul 2012 21:09:53 +0000 (21:09 +0000)]
decl.c (gnat_to_gnu_entity): Try to ensure that an object of CW type initialized to a value is sufficiently...
* gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Try to ensure
that an object of CW type initialized to a value is sufficiently
aligned for this value.
Jakub Jelinek [Thu, 19 Jul 2012 20:48:25 +0000 (22:48 +0200)]
re PR rtl-optimization/53942 (unable to find a register to spill in class 'CREG')
PR rtl-optimization/53942
* function.c (assign_parm_setup_reg): Avoid zero/sign extension
directly from likely spilled non-fixed hard registers, move them
to pseudo first.
With the even/odd v4hi multiply pattern names, we'll automatically
generate the same code for dot_prodv4hi. The dot_prodv8qi pattern
was actively incorrect wrt output mode.
Eric Botcazou [Thu, 19 Jul 2012 15:44:00 +0000 (15:44 +0000)]
decl.c (gnat_to_gnu_entity): Do not look up the REP part of the base type in advance.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Do not
look up the REP part of the base type in advance. Deal with that of
the variant types.
(get_rep_part): Be prepared for record types with fields.
Diego Novillo [Thu, 19 Jul 2012 14:35:18 +0000 (10:35 -0400)]
Fix --produce_manifest flag in validate_failures.py.
When I added the functionality to use other summary files for
reporting, I broke the generation of manifests. When sum files are
passed on, we need to use the list. Otherwise, we need to find summary
files in the build directory.
This patch factors out that logic into a new function and calls it
from both the reporting and generation routines.
Committed to trunk.
* testsuite-management/validate_failures.py (CollectSumFiles):
Rename from GetSumFiles.
(GetSumFiles): Factor out of CheckExpectedResults.
(CheckExpectedResults): Call it.
(ProduceManifest): Call it.
Jakub Jelinek [Thu, 19 Jul 2012 14:02:32 +0000 (16:02 +0200)]
re PR middle-end/54017 (Incorrect implementation of infinite loops in OpenMP sections leads to SIGILL)
PR middle-end/54017
* tree-cfgcleanup.c (cleanup_omp_return): Remove.
(cleanup_tree_cfg_bb): Don't call it.
* omp-low.c (expand_omp_sections): Fix up the !exit_reachable case
handling.
Richard Guenther [Thu, 19 Jul 2012 11:48:46 +0000 (11:48 +0000)]
tree-ssa-ccp.c (valid_lattice_transition): Clarify comment about transition from invariant to known bits.
2012-07-19 Richard Guenther <rguenther@suse.de>
Eric Botcazou <ebotcazou@adacore.com>
* tree-ssa-ccp.c (valid_lattice_transition): Clarify comment
about transition from invariant to known bits.
(likely_value): Addresses with UNDEFINED components are
UNDEFINED.
* gnat.dg/loop_optimization11.adb: New testcase.
* gnat.dg/loop_optimization11_pkg.ads: Likewise.
Co-Authored-By: Eric Botcazou <ebotcazou@adacore.com>
From-SVN: r189650
eh_personality.cc (__gxx_personality_seh0): New function.
libstdc++-v3/
* libsupc++/eh_personality.cc (__gxx_personality_seh0): New function.
Adjust for SEH.
* config/abi/pre/gnu.ver: Add __gxx_personality_seh0.
libobjc/
* exception.c (__gnu_objc_personality_seh0): New function.
libjava/
* libgcj.ver: Add __gcj_personality_seh0.
* exception.cc (__gcj_personality_seh0): New function.
Adjust for SEH.
libgcc/
* unwind-seh.c: New file.
* unwind-generic.h: Include windows.h for SEH.
(_Unwind_Exception): Use 6 private fields for SEH.
(_GCC_specific_handler): Declare.
* unwind-c.c (__gcc_personality_seh0): New function.
Adjust for SEH.
* config/i386/libgcc-cygming.ver: New file.
* config/i386/t-seh-eh: New file.
* config.host (x86_64-*-mingw*): Default to seh.
H.J. Lu [Wed, 18 Jul 2012 17:38:37 +0000 (17:38 +0000)]
Check and skip 67h address size prefix for x32
PR libjava/53973
* include/x86_64-signal.h (CHECK_67H_PREFIX): New.
(HANDLE_DIVIDE_OVERFLOW): Check and and skip 67h address size
prefix if CHECK_67H_PREFIX is 1. Use ULL suffix for 64-bit
integer.
Bill Schmidt [Wed, 18 Jul 2012 15:15:36 +0000 (15:15 +0000)]
invoke.texi: Add -fhoist-adjacent-loads and -ftree-slsr to list of flags controlling...
2012-07-18 Bill Schmidt <wschmidt@linux.ibm.com>
* doc/invoke.texi: Add -fhoist-adjacent-loads and -ftree-slsr to list
of flags controlling optimization; add -ftree-slsr to list of flags
enabled by default at -O; add -fhoist-adjacent-loads to list of flags
enabled by default at -O2; add -fvect-cost-model to list of flags
enabled by default at -O3; document -fhoist-adjacent-loads and
-ftree-slsr.
* opts.c (default_option): Make -ftree-slsr default at -O1 and above.
* gimple-ssa-strength-reduction.c (gate_strength_reduction): Use
flag_tree_slsr.
* common.opt: Add -ftree-slsr with flag_tree_slsr.
Eric Botcazou [Wed, 18 Jul 2012 12:20:06 +0000 (12:20 +0000)]
trans.c (stmt_group_may_fallthru): New function.
* gcc-interface/trans.c (stmt_group_may_fallthru): New function.
(gnat_to_gnu) <N_Block_Statement>: Use it to find out whether the
block needs to be translated.
Jie Zhang [Wed, 18 Jul 2012 11:29:45 +0000 (11:29 +0000)]
arm.c (arm_rtx_costs_1): Adjust cost for CONST_VECTOR.
gcc/
* config/arm/arm.c (arm_rtx_costs_1): Adjust cost for
CONST_VECTOR.
(arm_size_rtx_costs): Likewise.
(neon_valid_immediate): Add a case for double 0.0.
gcc/testsuite/
* gcc.target/arm/neon-vdup-1.c: New test case.
* gcc.target/arm/neon-vdup-2.c: New test case.
* gcc.target/arm/neon-vdup-3.c: New test case.
* gcc.target/arm/neon-vdup-4.c: New test case.
* gcc.target/arm/neon-vdup-5.c: New test case.
* gcc.target/arm/neon-vdup-6.c: New test case.
* gcc.target/arm/neon-vdup-7.c: New test case.
* gcc.target/arm/neon-vdup-8.c: New test case.
* gcc.target/arm/neon-vdup-9.c: New test case.
* gcc.target/arm/neon-vdup-10.c: New test case.
* gcc.target/arm/neon-vdup-11.c: New test case.
* gcc.target/arm/neon-vdup-12.c: New test case.
* gcc.target/arm/neon-vdup-13.c: New test case.
* gcc.target/arm/neon-vdup-14.c: New test case.
* gcc.target/arm/neon-vdup-15.c: New test case.
* gcc.target/arm/neon-vdup-16.c: New test case.
* gcc.target/arm/neon-vdup-17.c: New test case.
* gcc.target/arm/neon-vdup-18.c: New test case.
* gcc.target/arm/neon-vdup-19.c: New test case.
* gcc.target/arm/neon-combine-sub-abs-into-vabd.c: Make intrinsic
arguments non-constant.
Co-Authored-By: Julian Brown <julian@codesourcery.com>
From-SVN: r189611
Richard Guenther [Wed, 18 Jul 2012 08:49:55 +0000 (08:49 +0000)]
tree.h (get_object_or_type_alignment): Remove.
2012-07-18 Richard Guenther <rguenther@suse.de>
* tree.h (get_object_or_type_alignment): Remove.
* builtins.c (get_object_alignment_2): New function copied from
get_object_alignment_1. Take extra argument to indicate whether
we take the address of EXP. Rework to use type alignment information
if not, and return whether the result is an approximation or not.
(get_object_alignment_1): Wrap around get_object_alignment_2.
(get_pointer_alignment_1): Call get_object_alignment_2 indicating
we take the address.
(get_object_or_type_alignment): Remove.
* expr.c (expand_assignment): Call get_object_alignment.
(expand_expr_real_1): Likewise.