2010-11-03 Richard Guenther <rguenther@suse.de>
PR middle-end/46288
* predict.c (strip_predict_hints): Simply DCE builtin expect if
the result is unused.
* gcc.dg/pr46288.c: New testcase.
From-SVN: r166258
2010-11-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/43899
* runtime/error.c (generate_warning): New function to generate a run
time warning message. Fix some whitespace.
* libgfortran.h: Add prototype for new function.
* io/list_read.c (nml_read_obj): Use new function to warn when a
character namelist object is truncated. Only warn if compiled
with -fbounds-check.
From-SVN: r166252
PR tree-optimization/46009
* tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Call
cond_if_else_store_replacement if bb1 and bb2 have the same
single successor.
(cond_store_replacement): Use gimple_assign_single_p, don't
check if rhs is SSA_NAME or invariant. Call release_defs for
assign.
(cond_if_else_store_replacement): New function.
* gcc.dg/vect/pr46009.c: New function.
From-SVN: r166251
2010-11-03 Richard Guenther <rguenther@suse.de>
* opts.c (finish_options): Properly check for all WHOPR
flags before complaining about -flto-partition.
From-SVN: r166250
* config/rs6000/rs6000.c (rs6000_pic_labelno): Make static.
(rs6000_emit_load_toc_table): Don't use rs6000_pic_labelno when
TARGET_SECURE_PLT.
* config/rs6000/sysv4.h (rs6000_pic_labelno): Don't declare.
* config/rs6000/rs6000.md (load_toc_v4_PIC_3b): Use "b" constraint
on input, "r" on output.
From-SVN: r166247
In gcc/:
2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
Implemented -fobjc-std=objc1 flag.
* doc/invoke.texi (Option Summary): Document -fobjc-std=objc1
option.
* doc/standards.texi (Standards): Updated the section on
Objective-C; mention support for Objective-C 2.0 features and the
new -fstd-objc=objc1 flag to disable them.
In gcc/c-family/:
2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
Implemented -fobjc-std=objc1 flag.
* c.opt (fobjc-std=objc1): New option.
In gcc/objc/:
2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
Implemented -fobjc-std=objc1 flag.
* objc-act.c (objc_start_class_interface): If attributes are
specified when flag_objc1_only is set, print an error.
(objc_start_category_interface): Same change.
(objc_start_protocol): Same change.
(objc_add_method_declaration): Same change.
(objc_start_method_definition): Same change.
(objc_build_keyword_decl): Same change.
(objc_set_method_opt): If flag_objc1_only is set, print an error.
(objc_add_property_declaration): Same change.
(objc_add_synthesize_declaration): Same change.
(objc_add_dynamic_declaration): Same change.
(objc_finish_foreach_loop): Same change.
(objc_maybe_build_component_ref): If flag_objc1_only is set,
return immediately.
In gcc/testsuite/:
2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
Implemented -fobjc-std=objc1 flag.
* objc.dg/fobjc-std-1.m: New.
* obj-c++.dg/fobjc-std-1.mm: New.
From-SVN: r166246
In gcc/objc/:
2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-act.c (maybe_make_artificial_property_decl): New.
(objc_maybe_build_component_ref): Call
maybe_make_artificial_property_decl if a property can not be
found. Do not call objc_finish_message_expr if
PROPERTY_HAS_NO_GETTER.
* objc-act.h Updated comments.
(PROPERTY_HAS_NO_GETTER): New.
(PROPERTY_HAS_NO_SETTER): New.
* objc-tree.def: Updated comment.
In gcc/testsuite/:
2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/property/dotsyntax-1.m: New.
* objc.dg/property/dotsyntax-2.m: New.
* obj-c++.dg/property/dotsyntax-1.mm: New.
* obj-c++.dg/property/dotsyntax-2.mm: New.
From-SVN: r166237
PR tree-optimization/46165
* tree-ssa-pre.c (eliminate): Return TODO_cleanup_cfg if changing
a normal call into noreturn call.
* gcc.dg/pr46165.c: New test.
From-SVN: r166236
PR tree-optimization/46107
* cfgloopmanip.c (loop_version): Set irred_flag back into entry->flags
if cfg_hook_duplicate_loop_to_header_edge failed.
* gcc.c-torture/compile/pr46107.c: New test.
From-SVN: r166234
ChangeLog:
2010-11-03 Ian Lance Taylor <iant@google.com>
Dave Korn <dave.korn.cygwin@gmail.com>
PR lto/46273
* configure.ac: Remove libelf tests. Build lto-plugin on ELF always
and on other supported platforms whenever LTO is enabled.
* configure: Rebuild.
gcc/ChangeLog:
2010-11-03 Ian Lance Taylor <iant@google.com>
PR lto/46273
* gcc/config.gcc: Don't set lto_binary_reader.
* doc/install.texi (Prerequisites): Remove libelf paragraphs.
(Configuration): Mention --disable-lto. Remove --with-libelf
paragraph.
lto-plugin/ChangeLog:
2010-11-03 Dave Korn <dave.korn.cygwin@gmail.com>
PR lto/46273
* lto-plugin.h: Delete.
* lto-plugin-elf.c: Likewise.
* lto-plugin-coff.c: Likewise.
* configure.ac: Don't use libelf, don't source config.gcc.
(LIBELFLIBS): Delete.
(LIBELFINC): Delete.
(LTO_FORMAT): Delete.
(SYM_STYLE): Add AC_DEFINE var, set based on $target.
(config.h): Add AC_CONFIG_HEADERS directive.
* Makefile.am (LIBELFLIBS): Delete.
(LIBELFINC): Delete.
(LTO_FORMAT): Delete.
(DEFS): Import.
(AM_CPPFLAGS): Use it. Don't use LIBELFINC.
(liblto_plugin_la_SOURCES): Don't use LTO_FORMAT, don't include
any object-format-specific source file in the link.
(liblto_plugin_la_LIBADD): Don't use LIBELFLIBS.
* config.h.in: Generate.
* configure: Regenerate.
* Makefile.in: Likewise.
* lto-plugin.c (O_BINARY): Definition moved here from lto-plugin.h.
(LTO_SEGMENT_NAME): New definition.
(LTO_SECTION_PREFIX): Definition moved here from lto-plugin.h.
(LTO_SECTION_PREFIX_LEN): New definition.
(struct sym_aux): Struct definition moved here from lto-plugin.h.
(struct plugin_symtab): Likewise.
(struct plugin_objfile): Likewise.
(struct plugin_objfile): New struct def.
(enum symbol_style): New enum type.
(add_symbols): Make static.
(claimed_files): Likewise.
(num_claimed_files): Likewise.
(sym_style): New global.
(check): Make static.
(parse_table_entry): Likewise. Respect sym_style when extracting
symbol from symtab entry.
(translate): Make static.
(resolve_conflicts): Likewise.
(process_symtab): New function, per-section callback version of
old object-format-specific handling from deleted lto-plugin-elf.c.
(claim_file_handler): Convert ELF-specific version from deleted
lto-plugin-elf.c to simple_object interface and move here.
(process_options): Allow new '-sym-style=' option.
(onload): Don't call deleted onload_format_checks hook.
From-SVN: r166233
PR rtl-optimization/46034
PR rtl-optimization/46212
PR rtl-optimization/46248
* combine.c (try_combine): If added_sets_2 where i0dest_in_i0src
and i0 feeds i1 and i1 feeds i2 or i0 feeds i2, make a copy of i1src
before i0dest -> i0src substitution and pass 1 instead of 0 as last
argument to subst on i2pat.
* gcc.c-torture/compile/pr46034.c: New test.
* gcc.c-torture/compile/pr46248.c: New test.
* gcc.dg/pr46212.c: New test.
From-SVN: r166231
* gcc-interface/gigi.h (add_stmt_force): Declare.
(add_stmt_with_node_force): Likewise.
* gcc-interface/trans.c (Attribute_to_gnu): Don't set TREE_SIDE_EFFECTS
on the SAVE_EXPR built for cached expressions of parameter attributes.
(Subprogram_Body_to_gnu): Force evaluation of the SAVE_EXPR built for
cached expressions of parameter attributes.
(add_stmt_force): New function.
(add_stmt_with_node_force): Likewise.
From-SVN: r166222
2010-11-02 Richard Guenther <rguenther@suse.de>
PR tree-optimization/46216
* tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars):
Check if we can propagate from a POINTER_PLUS_EXPR before doing so.
* gcc.dg/torture/pr46216.c: New testcase.
From-SVN: r166203
* config/i386/i386-protos.h (struct ix86_first_cycle_multipass_data_):
New type to hold target-specific data for multipass scheduling.
(TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DATA_T): Define.
* config/i386/i386.c (ia32_multipass_dfa_lookahead): Update for
Core 2/i7.
(core2i7_secondary_decoder_max_insn_size,)
(core2i7_secondary_ifetch_block_size, core2i7_ifetch_block_max_insns):
New static variables.
([const_]ix86_first_cycle_multipass_data_t): New typedefs.
([_]ix86_first_cycle_multipass_data): New static variable.
(core2i7_first_cycle_multipass_init, core2i7_dfa_poast_advance_cycle):
Implement targetm.sched hooks.
(core2i7_first_cycle_multipass_filter_ready_try): New static subroutine
of ...
(core2i7_first_cycle_multipass_{begin, issue, backtrack, end, fini}):
Implement new targetm.sched hooks.
(ix86_sched_init_global, TARGET_SCHED_INIT_GLOBAL): Define
targetm.sched hook to install multipass scheduling hooks on demand.
* doc/tm.texi.in: Document new targetm.sched hooks.
* doc/tm.texi: Regenerate.
* haifa-sched.c (TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DATA_T): Define.
(first_cycle_multipass_data_t): New typedef.
(struct choice_entry: target_data): New field.
(max_issue): Add first_cycle_insn_p parameter. Call new target hooks
to allow target model restrictions not represented in DFA.
(choose_ready, schedule_block): Update.
(sched_extend_ready_list, sched_finish_ready_list): Call new target
hooks to initialize target-specific data for multipass scheduling.
* sched-int.h (max_issue): Update declaration.
* sel-sched.c (choose_best_insn): Update.
* target.def (first_cycle_multipass_{begin, issue, backtrack},)
(first_cycle_multipass_{init, fini}): Define and document new
targetm.sched hooks.
From-SVN: r166196