Richard Guenther [Fri, 25 Mar 2011 10:16:02 +0000 (10:16 +0000)]
tree-cfg.c (verify_gimple_assign_unary): Drop special casing of complex types at -O0.
2011-03-25 Richard Guenther <rguenther@suse.de>
* tree-cfg.c (verify_gimple_assign_unary): Drop special casing
of complex types at -O0.
(verify_gimple_assign_binary): Likewise.
(verify_gimple_assign_ternary): Likewise.
Nathan Froyd [Thu, 24 Mar 2011 23:37:02 +0000 (23:37 +0000)]
function.c (instantiate_virtual_regs): Use FOR_EACH_BB and FOR_BB_INSNS_SAFE to iterate through insns.
* function.c (instantiate_virtual_regs): Use FOR_EACH_BB and
FOR_BB_INSNS_SAFE to iterate through insns. Re-indent.
(pass_instantiate_virtual_regs): Require PROP_cfglayout.
* passes.c (init_optimization_passes): Move
pass_instantiate_virtual_regs after pass_into_cfg_layout_mode.
Nick Clifton [Thu, 24 Mar 2011 17:25:28 +0000 (17:25 +0000)]
rx.h (LABEL_ALIGN_FOR_BARRIER): Define.
* config/rx/rx.h (LABEL_ALIGN_FOR_BARRIER): Define.
(ASM_OUTPUT_MAX_SKIP_ALIGN): Define.
* config/rx/rx.c (rx_option_override): Set align_jumps,
align_loops and align_labels if not set by the user.
(rx_align_for_label): New function.
(rx_max_skip_for_label): New function.
(TARGET_ASM_JUMP_ALIGN_MAX_SKIP): Define.
(TARGET_ASM_LOOP_ALIGN_MAX_SKIP): Define.
(TARGET_ASM_LABEL_ALIGN_MAX_SKIP): Define.
(TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP): Define.
* config/rx/rx-protos.h (rx_align_for_label): Add prototype.
re PR rtl-optimization/48263 (build fails for cris-elf in libgfortran)
gcc/
PR rtl-optimization/48263
* optabs.c (expand_binop_directly): Reinstate convert_modes code
and original commutative_p handling. Use maybe_gen_insn.
Paolo Bonzini [Thu, 24 Mar 2011 17:07:44 +0000 (17:07 +0000)]
configure.ac: Remove all mentions of mh-sysv4 and mh-solaris.
2011-03-24 Paolo Bonzini <bonzini@gnu.org>
* configure.ac: Remove all mentions of mh-sysv4 and mh-solaris.
* configure: Regenerate.
* Makefile.def: Remove all mentions of X11_FLAGS_TO_PASS.
* Makefile.tpl: Likewise.
* Makefile.in: Regenerate.
config:
2011-03-24 Paolo Bonzini <bonzini@gnu.org>
Andreas Krebbel [Thu, 24 Mar 2011 16:50:31 +0000 (16:50 +0000)]
reload.c (find_reloads_subreg_address): Add address_reloaded parameter and return true there if...
2011-03-24 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* reload.c (find_reloads_subreg_address): Add address_reloaded
parameter and return true there if the full address has been
reloaded.
(find_reloads_toplev): Pass address_reloaded flag.
(find_reloads_address_1): Don't use address_reloaded parameter.
* einfo.ads (Size_Depends_On_Discriminant): Adjust description.
* layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
to compute Set_Size_Depends_On_Discriminant.
(Layout_Type): Call it on array types in back-end layout mode.
* sem_util.adb (Requires_Transient_Scope): Return true for array
types only if the size depends on the value of discriminants.
* gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
type if the RHS is a call to a function that returns an unconstrained
type with default discriminant.
Richard Guenther [Thu, 24 Mar 2011 14:43:16 +0000 (14:43 +0000)]
re PR tree-optimization/48271 (ICE: SIGSEGV in tree_ssa_dominator_optimize (tree-ssa-dom.c:2964) with -O -ftree-vrp -fno-guess-branch-probability -fnon-call-exceptions)
2011-03-24 Richard Guenther <rguenther@suse.de>
PR tree-optimization/48271
* tree-ssa-dom.c (tree_ssa_dominator_optimize): Only cleanup
blocks that still exist.
Uros Bizjak [Thu, 24 Mar 2011 13:35:26 +0000 (14:35 +0100)]
re PR target/48237 (ICE: in final_scan_insn, at final.c:2651 with -fselective-scheduling2 -mtune=core2)
PR target/48237
* config/i386/i386.md (*movdf_internal_rex64): Do not split
alternatives that can be handled with movq or movabsq insn.
(*movdf_internal): Disable for !TARGET_64BIT.
(*movdf_internal_nointeger): Ditto.
* config/i386/i386.c (ix86_print_operand): Handle DFmode immediates.
testsuite/ChangeLog:
PR target/48237
* gcc.target/i386/pr48237.c: New test.
Diego Novillo [Thu, 24 Mar 2011 12:39:59 +0000 (08:39 -0400)]
lto-opts.c (input_data_block): Move to lto-streamer-in.c.
* lto-opts.c (input_data_block): Move to lto-streamer-in.c.
* lto-streamer-in.c (input_string_internal): Add clarifying
comments.
(lto_input_data_block): Move from lto-opts.c. Make extern.
Update all users.
(lto_input_string): Rename from input_string. Make extern.
Update all users.
* lto-streamer-out.c (lto_output_string_with_length): Rename from
output_string_with_length.
Output 0 to indicate a non-NULL string. Update all callers to
not emit 0.
(lto_output_string): Rename from output_string. Make extern.
Update all users.
(lto_output_decl_state_streams): Make extern.
(lto_output_decl_state_refs): Make extern.
* lto-streamer.h (lto_input_string): Declare.
(lto_input_data_block): Declare.
(lto_output_string): Declare.
(lto_output_string_with_length): Declare.
(lto_output_decl_state_streams): Declare.
(lto_output_decl_state_refs): Declare.
Richard Guenther [Thu, 24 Mar 2011 11:23:29 +0000 (11:23 +0000)]
re PR tree-optimization/46562 (CCP currently needs iteration for &a[i])
2011-03-24 Richard Guenther <rguenther@suse.de>
PR tree-optimization/46562
* tree.c (build_invariant_address): New function.
* tree.h (build_invariant_address): Declare.
* tree-dfa.c (get_addr_base_and_unit_offset): Wrap around
a renamed function moved ...
* tree-flow-inline.h (get_addr_base_and_unit_offset_1): ... here.
Take valueization callback parameter.
* tree-flow.h (gimple_fold_stmt_to_constant): Declare.
* gimple-fold.h: New file.
* tree-ssa-ccp.c (ccp_fold): Use gimple_fold_stmt_to_constant_1.
(ccp_fold, fold_const_aggregate_ref,
fold_ctor_reference, fold_nonarray_ctor_reference,
fold_array_ctor_reference, fold_string_cst_ctor_reference,
get_base_constructor): Move ...
* gimple-fold.c: ... here.
(gimple_fold_stmt_to_constant_1): New function
split out from ccp_fold. Take a valueization callback parameter.
Valueize all operands.
(gimple_fold_stmt_to_constant): New wrapper function.
(fold_const_aggregate_ref_1): New function split out from
fold_const_aggregate_ref. Take a valueization callback parameter.
(fold_const_aggregate_ref): Wrap fold_const_aggregate_ref_1.
* tree-ssa-sccvn.c (simplify_binary_expression): Simplify
invariant POINTER_PLUS_EXPRs to invariant form.
(vn_valueize): New function.
(try_to_simplify): Simplify by using gimple_fold_stmt_to_constant.
* tree-vrp.c (vrp_valueize): New function.
(vrp_visit_assignment_or_call): Use gimple_fold_stmt_to_constant
to fold statements to constants.
* tree-ssa-pre.c (eliminate): Properly guard propagation of
function declarations.
* Makefile.in (tree-ssa-sccvn.o, tree-vrp.o, gimple-fold.o,
tree-ssa-ccp.o): Add gimple-fold.h dependencies.
* c-c++-common/pr46562-2.c: New testcase.
* c-c++-common/pr46562.c: Likewise.
Jonathan Wakely [Wed, 23 Mar 2011 19:52:13 +0000 (19:52 +0000)]
re PR other/48179 (Reference mismatch in documentation chapter 6)
2011-03-23 Jonathan Wakely <jwakely.gcc@gmail.com>
PR other/48179
PR other/48221
PR other/48234
* doc/extend.texi (Alignment): Move section to match order in TOC.
* doc/invoke.texi (i386 and x86-64 Windows Options): Likewise.
(Warning Options): Adjust -Wno-cpp summary and remove stray backslash.
Andreas Krebbel [Wed, 23 Mar 2011 13:42:46 +0000 (13:42 +0000)]
2084.md: Enable all insn reservations also for z9_ec cpu attribute value.
2011-03-23 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* config/s390/2084.md: Enable all insn reservations also for z9_ec
cpu attribute value.
* config/s390/s390-opts.h (enum s390_arch_option): Remove.
(enum processor_type): Add PROCESSOR_2094_Z9_EC.
* config/s390/s390.c (processor_flags_table): New constant array.
(s390_handle_arch_option): Remove.
(s390_handle_option): Remove s390_handle_arch_option invocations
and OPT_mwarn_framesize_ handling.
(s390_option_override): Remove s390_handle_arch_option invocation.
(s390_emit_prologue): Remove use of HOST_WIDE_INT_PRINT_DEC in
warnings.
* config/s390/s390.md (cpu attribute): Add z9_ec value.
* config/s390/s390.opt (s390_tune, s390_arch)
(march=): Replace s390_arch_option enum and values with
processor_type. Set variable name to s390_arch. Set
initialization value.
(mtune=): Replace s390_arch_option with processor_type. Set
variable name to s390_tune. Set initialization value.
Eric Botcazou [Wed, 23 Mar 2011 10:04:08 +0000 (10:04 +0000)]
trans.c (create_temporary): New function taken from...
* gcc-interface/trans.c (create_temporary): New function taken from...
(create_init_temporary): ...here. Call it.
(call_to_gnu): Create the temporary for the return value early, if any.
Create it for a function with copy-in/copy-out parameters if there is
no target; in other cases of copy-in/copy-out, use another temporary.
Push the new binding level lazily. Add and rename local variables.
Eric Botcazou [Wed, 23 Mar 2011 09:38:07 +0000 (09:38 +0000)]
decl.c (gnat_to_gnu_entity): Create TYPE_DECL for the padded type built in order to support a specified...
* gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
for the padded type built in order to support a specified alignment.
Fix incorrect formatting.
Nathan Froyd [Wed, 23 Mar 2011 01:56:12 +0000 (01:56 +0000)]
refactor emit_*_{after,before}_noloc using common functions
refactor emit_*_{after,before}_noloc using common functions
* emit-rtl.c (emit_pattern_before_noloc): New function.
(emit_insn_before_noloc, emit_jump_insn_before_noloc): Call it.
(emit_call_insn_before_noloc, emit_debug_insn_before_noloc): Likewise.
(emit_pattern_after_noloc): New function.
(emit_insn_after_noloc, emit_jump_insn_after_noloc): Call it.
(emit_call_insn_after_noloc, emit_debug_insn_after_noloc): Likewise.
Joseph Myers [Tue, 22 Mar 2011 22:53:32 +0000 (22:53 +0000)]
s390-opts.h: New.
* config/s390/s390-opts.h: New.
* config/s390/s390.c (s390_tune, s390_tune_flags, s390_arch,
s390_arch_flags, s390_warn_framesize, s390_stack_size,
s390_stack_guard): Remove.
(s390_handle_arch_option): Return void. Take enum
s390_arch_option value instead of string and searching array.
(s390_handle_option): Don't assert that global structures are in
use. Access variables via opts pointer. Use error_at. Don't use
sscanf for -mstack-guard= or -mstack-size=. Update call to
s390_handle_arch_option.
(s390_option_override): Update call to s390_handle_arch_option.
(s390_emit_prologue): Use %d format for s390_stack_size in
diagnostic. Use %wd for HOST_WIDE_INT.
* config/s390/s390.h (enum processor_type): Move to s390-opts.h.
(s390_tune, s390_tune_flags, s390_arch, s390_arch_flags): Remove.
* config/s390/s390.opt (config/s390/s390-opts.h): New
HeaderInclude entry.
(s390_arch_string, s390_tune, s390_tune_flags, s390_arch,
s390_arch_flags, s390_warn_framesize): New Variable entries.
(s390_arch_option): New Enum and EnumValue entries.
(march=): Use Enum instead of Var.
(mstack-guard=, mstack-size=): Use UInteger and Var.
(mtune=): Use Enum.
Joseph Myers [Tue, 22 Mar 2011 22:50:03 +0000 (22:50 +0000)]
score.c (score_handle_option): Don't assert that global structures are in use.
* config/score/score.c (score_handle_option): Don't assert that
global structures are in use. Access target_flags via opts
pointer. Use value of -march= option to determine target_flags
settings.
* config/score/score.opt (march=): Use Enum.
(score_arch): New Enum and EnumValue entries.
Joseph Myers [Tue, 22 Mar 2011 22:49:06 +0000 (22:49 +0000)]
mep.c (option_mtiny_specified): Remove.
* config/mep/mep.c (option_mtiny_specified): Remove.
(mep_option_override): Move register handling for -mivc2 from
mep_handle_option. Use global_options_set.x_mep_tiny_cutoff
instead of option_mtiny_specified.
(mep_handle_option): Access target_flags via opts pointer. Don't
assert that global structures are in use. Defer part of -mivc2
handling and move it to mep_option_override.
* config/mep/mep.opt (IVC2): New Mask entry.
(mivc2): Use Var and Defer instead of Mask.
Joseph Myers [Tue, 22 Mar 2011 22:48:11 +0000 (22:48 +0000)]
v850-opts.h: New.
* config/v850/v850-opts.h: New.
* config/v850/v850.c (small_memory): Replace with
small_memory_physical_max array. Make that array static const.
(v850_handle_memory_option): Take integer value of argument. Take
gcc_options pointer, option text and location. Return void.
Update for changes to small memory structures.
(v850_handle_option): Access target_flags via opts pointer. Don't
assert that global structures are in use. Update calls to
v850_handle_memory_option.
(v850_encode_data_area): Update references to small memory
settings.
* config/v850/v850.h (struct small_memory_info, small_memory):
Remove.
(enum small_memory_type): Move to v850-opts.h.
* config/v850/v850.opt (config/v850/v850-opts.h): New
HeaderInclude entry.
(small_memory_max): New Variable entry.
(msda): Replace by pair of options msda= and msda-. Use UInteger.
(mtda, mzda): Likewise.
Joseph Myers [Tue, 22 Mar 2011 22:42:51 +0000 (22:42 +0000)]
pa-hpux.opt (flag_pa_unix): New Variable entry.
* config/pa/pa-hpux.opt (flag_pa_unix): New Variable entry.
(munix=93): Use Var.
* config/pa/pa-hpux1010.opt (munix=95): Use Var.
* config/pa/pa-hpux1111.opt (munix=98): Use Var.
* config/pa/pa-opts.h: New.
* config/pa/pa.c (pa_cpu, flag_pa_unix): Remove.
(pa_handle_option): Don't assert that global structures are in
use. Access target_flags via opts pointer. Don't handle
OPT_mschedule_, OPT_mfixed_range_, OPT_munix_93, OPT_munix_95 or
OPT_munix_98 here.
(pa_option_override): Handle deferred OPT_mfixed_range_.
Joseph Myers [Tue, 22 Mar 2011 22:41:52 +0000 (22:41 +0000)]
mn10300-opts.h: New.
* config/mn10300/mn10300-opts.h: New.
* config/mn10300/mn10300.c (mn10300_processor,
mn10300_tune_string): Remove.
(mn10300_handle_option): Don't assert that global structures are
in use. Access mn10300_processor via opts pointer. Don't handle
OPT_mtune_ here.
* config/mn10300/mn10300.h (enum processor_type): Move to
mn10300-opts.h.
(mn10300_processor): Remove.
* config/mn10300/mn10300.opt (config/mn10300/mn10300-opts.h): New
HeaderInclude entry.
(mn10300_processor): New Variable entry.
(mtune=): Use Var.
Joseph Myers [Tue, 22 Mar 2011 22:40:52 +0000 (22:40 +0000)]
microblaze.c: Don't include opts.h.
* config/microblaze/microblaze.c: Don't include opts.h.
(microblaze_handle_option, TARGET_HANDLE_OPTION): Remove.
* config/microblaze/microblaze.opt (mxl-stack-check): Use Warn.
(mno-clearbss): Use Var and Warn.
Joseph Myers [Tue, 22 Mar 2011 22:39:54 +0000 (22:39 +0000)]
m32r-opts.h: New.
* config/m32r/m32r-opts.h: New.
* config/m32r/m32r.c (m32r_model, m32r_sdata): Remove.
(m32r_handle_option): Don't assert that global structures are in
use. Access target_flags and m32r_cache_flush_func via opts
pointer. Don't handle OPT_mmodel_, OPT_msdata_ or
OPT_mno_flush_trap here.
* config/m32r/m32r.h (Code Models, Small Data Area): Replace by
include of m32r-opts.h.
* config/m32r/m32r.opt (config/m32r/m32r-opts.h): New
HeaderInclude entry.
(m32r_model_selected, m32r_sdata_selected): New Variable entries.
(mmodel=): Use Enum and Var.
(m32r_model): New Enum and EnumValue entries.
(mno-flush-trap): Use Var.
(msdata=): Use Enum and Var.
(m32r_sdata): New Enum and EnumValue entries.
Joseph Myers [Tue, 22 Mar 2011 22:34:42 +0000 (22:34 +0000)]
iq2000-opts.h: New.
* config/iq2000/iq2000-opts.h: New.
* config/iq2000/iq2000.c: Don't include opts.h.
(iq2000_tune, iq2000_handle_option, TARGET_HANDLE_OPTION): Remove.
* config/iq2000/iq2000.h (enum processor_type, iq2000_tune):
Remove.
* config/iq2000/iq2000.opt (config/iq2000/iq2000-opts.h): New
HeaderInclude entry.
(iq2000_tune): New Variable entry.
(march=): Add comment. Use Enum.
(iq2000_arch): New Enum and EnumValue entries.
(mcpu=): Use Enum and Var.
(iq2000_tune): New Enum and EnumValue entries.
Joseph Myers [Tue, 22 Mar 2011 22:33:40 +0000 (22:33 +0000)]
ia64-opts.h: New.
* config/ia64/ia64-opts.h: New.
* config/ia64/ia64.c (ia64_tune): Remove.
(ia64_handle_option): Don't handle OPT_mfixed_range_ or OPT_mtune_
here. Use error_at.
(ia64_option_override): Handle deferred OPT_mfixed_range_.
* config/ia64/ia64.h (enum processor_type, ia64_tune): Remove.
* config/ia64/ia64.opt (config/ia64/ia64-opts.h): New
HeaderInclude entry.
(ia64_tune): New Variable entry.
(mfixed-range=): Use Defer and Var.
(mtune=): Use Enum and Var.
(ia64_tune): New Enum and EnumValue entries.
Joseph Myers [Tue, 22 Mar 2011 22:31:35 +0000 (22:31 +0000)]
cris.c (cris_handle_option): Access target_flags via opts pointer.
* config/cris/cris.c (cris_handle_option): Access target_flags via
opts pointer. Don't assert that global structures are in use.
Don't call CRIS_SUBTARGET_HANDLE_OPTION.
* config/cris/cris.h (CRIS_SUBTARGET_HANDLE_OPTION): Don't define.
Joseph Myers [Tue, 22 Mar 2011 22:30:46 +0000 (22:30 +0000)]
bfin-opts.h: New.
* config/bfin/bfin-opts.h: New.
* config/bfin/bfin.c (bfin_lib_id_given, bfin_cpu_type,
bfin_si_revision, bfin_workarounds): Remove.
(bfin_cpus): Make static const.
(bfin_load_pic_reg): Check global_options_set.x_bfin_library_id
not bfin_lib_id_given.
(bfin_handle_option): Don't set bfin_lib_id_given. Access
bfin_cpu_type, bfin_si_revision and bfin_workarounds via opts
pointer. Use error_at. Don't assert that global structures are in
use.
* config/bfin/bfin.h: Include bfin-opts.h.
(enum bfin_cpu_type, bfin_cpu_t): Move to bfin-opts.h.
(bfin_cpu_type, bfin_si_revision, bfin_workarounds): Remove.
* bfin.opt (config/bfin/bfin-opts.h): New HeaderInclude entry.
(bfin_cpu_type, bfin_si_revision, bfin_workarounds): New Variable
entries.