* Middle-end and optimization regressions: what should we do?
@ 2005-07-28 17:26 François-Xavier Coudert
2005-07-28 17:41 ` Steve Kargl
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: François-Xavier Coudert @ 2005-07-28 17:26 UTC (permalink / raw)
To: fortran, gcc
Hi all,
PR 22619 and PR 22509 are two examples of recent 4.1 regressions that
showed up in gfortran, due to middle-end or optimization bugs (only
happen at -O3). Since these are regressions, they should be treated
before a long time passes, but since both source codes are Fortran, I
guess people don't (and won't) want to look at them.
How can we help here? Is there a way to make gfortran output a
complete GIMPLE tree, that could be used for middle-end hackers to
determine where the problem is? Or are we doomed to a dichotomy to
know which patch caused these regressions?
FX
PS: PR 22619 appeared somewhere between 20050716 and 20050717, so
patches that could possible have messed up are:
005-07-17 Daniel Berlin <dberlin@dberlin.org>
Fix PR tree-optimization/22531
* tree-ssa-pre.c (do_eustores): Make sure LHS is a decl for the
moment.
2005-07-17 Daniel Berlin <dberlin@dberlin.org>
* tree-promote-statics.c (pass_promote_statics): Change dump file
name.
2005-07-17 Daniel Berlin <dberlin@dberlin.org>
* tree-optimize.c (init_tree_optimization_passes): Add
pass_eliminate_useless_stores pass.
* tree-pass.h (pass_eliminate_useless_stores): New pass structure.
* tree-ssa-pre.c (is_copy_stmt): New function.
(follow_copies_till_vuse): Ditto.
(do_eustores): Ditto.
(gate_eustores): Ditto.
2005-07-16 Richard Henderson <rth@redhat.com>
* gcc.c (MFWRAP_SPEC): Don't wrap pthread_join or pthread_exit.
2005-07-16 Danny Berlin <dberlin@dberlin.org>
Kenneth Zadeck <zadeck@naturalbridge.com>
* Makefile.in: Added rules for ipa-pure-const.c, ipa-reference.c,
ipa-reference.h, ipa-utils.c, ipa-utils.h, ipa-type-escape.c,
ipa-type-escape.h, tree-promote-statics.c
* ipa-pure-const.c, ipa-reference.c, ipa-reference.h, ipa-utils.c,
ipa-utils.h, ipa-type-escape.c, ipa-type-escape.h,
tree-promote-statics.c: new files.
* alias.c: (nonlocal_mentioned_p_1, nonlocal_mentioned_p,
nonlocal_referenced_p_1, nonlocal_referenced_p, nonlocal_set_p_1,
int nonlocal_set_p, mark_constant_function): Deleted.
(rest_of_handle_cfg): Removed call to mark_constant_function.
(nonoverlapping_component_refs_p): Added calls to support
type based aliasing.
* tree-ssa-alias.c (may_alias_p,
compute_flow_insensitive_aliasing): Ditto.
* calls.c (flags_from_decl_or_type): Removed reference to
cgraph_rtl_info.
* c-typeck.c (convert_arguments): Make builtins tolerant of having
too many arguments. This is necessary for Spec 2000.
* cgraph.h (const_function, pure_function): Removed.
* common.opt: Added "fipa-pure-const", "fipa-reference",
"fipa-type-escape", and "ftree-promote-static".
* opts.c: Ditto.
* passes.c: Added ipa and tree-promote-statics passes.
* timevar.def: Added TV_IPA_PURE_CONST, TV_IPA_REFERENCE,
TV_IPA_TYPE_ESCAPE, and TV_PROMOTE_STATICS.
* tree-dfa.c (referenced_var_lookup_if_exists): New function.
* tree-flow.h: Added exposed sra calls and addition of
reference_vars_info field for FUNCTION_DECLS.
* tree-pass.h: Added passes.
* tree-sra.c: (sra_init_cache): New function.
(sra_insert_before, sra_insert_after) Made public.
(type_can_be_decomposed_p): Renamed from type_can_be_decomposed_p
and made public.
* tree-ssa-alias.c (dump_alias_stats): Added stats for type based
aliasing. (may_alias_p): Added code to use type escape analysis to
improve alias sets.
* tree-ssa-operands.c (add_call_clobber_ops): Added parameter and
code to prune clobbers of static variables based on information
produced in ipa-reference pass. Changed call clobbering so that
statics are not marked as clobbered if the call does not clobber
them.
2005-07-16 Daniel Berlin <dberlin@dberlin.org>
* tree-ssa-structalias.c (need_to_solve): Need to check for preds,
too.
2005-07-16 Eric Botcazou <ebotcazou@libertysurf.fr>
* doc/install.texi (*-*-solaris2*): Document recommended version
of GNU binutils and mention GNU linker problem on Solaris 10.
2005-07-16 Joseph S. Myers <joseph@codesourcery.com>
PR c/22421
* c-decl.c (c_build_bitfield_integer_type): New function.
(finish_struct): Call it.
* c-pretty-print.c (pp_c_type_specifier): Handle bit-field types.
2005-07-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* c-typeck.c (digest_init): Call 'convert_for_assignment'
before returning.
2005-07-16 Jan Hubicka <jh@suse.cz>
* cfg.c (update_bb_profile_for_threading): Fix profile updating.
(scale_bbs_frequencies_int): Watch roundoff errors.
* predict.c (return_prediction): Initialize return_stmt.
2005-07-16 Jan Hubicka <jh@suse.cz>
* profile.c (rest_of_handle_branch_prob): Fix handling of estimation
after RTL profiling.
PR 22509 appeared between 20050713 and 20050714, so possible guilty patches are:
2005-07-14 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/rs6000.md (UNSPEC_SYNC, UNSPEC_LWSYNC,
UNSPEC_ISYNC, UNSPEC_SYNC_OP, UNSPEC_ATOMIC, UNSPEC_CMPXCHG,
UNSPEC_XCHG, UNSPEC_AND): New.
(UNSPECV_ATOMIC, UNSPECV_SYNC, UNSPECV_SYNC_OP, UNSPECV_CMPXCHG,
UNSPECV_LWSYNC, UNSPECV_ISYNC): Delete.
* config/rs6000/sync.md (FETCHOP): New code macro.
(fetchop_name, fetchop_pred, fetchopsi_constr, fetchopdi_constr):
New code attrs.
(memory_barrier, sync_internal): Use unspec instead of unspec_volatile.
(sync_compare_and_swap<mode>): Same.
(sync_lock_test_and_set<mode>): Same.
(sync_<fetchop><mode>, sync_nand<mode>): Only use rs6000_emit_sync
for QImode and HImode, and not PPC405.
(sync_old_<fetchop><mode>, sync_old_nand<mode>): Same.
(sync_new_<fetchop><mode>, sync_new_nand<mode>): Same.
(sync_<fetchop>{si,di}_internal): New.
(sync_nand{si,di}_internal): New.
(sync_old_<fetchop>{si,di}_internal): New.
(sync_old_nand{si,di}_internal): New
(sync_new_<fetchop>{si,di}_internal): New.
(sync_new_nand{si,di}_internal): New.
(atomic_and{si,di}): New.
(sync_new_nand{si,di}_internal): New.
(atomic_and{si,di}): New.
(sync_add<mode>_internal): Delete.
(sync_addshort_internal): Use unspec instead of unspec_volatile.
(sync_sub<mode>_internal): Delte.
(sync_subshort_internal): New.
(sync_andsi_internal): Use unspec instead of unspec_volatile.
(sync_anddi_internal): Delete.
(sync_boolsi_internal): Use unspec instead of unspec_volatile.
(sync_booldi_internal): Delete.
(sync_boolc<mode>_internal): Delete.
(sync_boolcshort_internal): Use unspec instead of unspec_volatile.
(sync_boolc<mode>_internal2): Delete.
(sync_boolcc<mode>_internal): Delete.
(isync, lwsync): Use unspec instead of unspec_volatile.
* config/rs6000/rs6000.c (rs6000_emit_sync): Implement MINUS.
Revert UNSPEC_VOLATILE.
(rs6000_split_atomic_op): New.
* config/rs6000/rs6000-protos.h (rs6000_split_atomic_op): Declare.
2005-07-14 Eric Christopher <echristo@redhat.com>
* config/mips/mips.c (mips_canonicalize_comparison): Cast
argument of trunc_int_for_mode to unsigned HOST_WIDE_INT.
2005-07-14 Eric Christopher <echristo@redhat.com>
* config/s390/t-tpf (SHLIB_MAPFILES): Remove.
2005-07-14 Steven Bosscher <stevenb@suse.de>
PR tree-optimization/22230
* tree-vrp.c (extract_range_from_binary_expr): Fix logics thinko in
the computation of the four cross productions for "range op range".
2005-07-14 Alexandre Oliva <aoliva@redhat.com>
Ulrich Weigand <uweigand@de.ibm.com>
PR target/20126
* loop.c (loop_givs_rescan): Do not ICE if unable to reduce an IV
in some insn.
2005-07-14 Ulrich Weigand <uweigand@de.ibm.com>
* config/s390/s390.h (TARGET_TPF_PROFILING): Add default definition.
2005-07-14 Steve Ellcey <sje@cup.hp.com>
* config/ia64/ia64.c (ia64_output_dwarf_dtprel): Support ILP32 mode.
2005-07-14 Richard Guenther <rguenther@suse.de>
PR middle-end/22347
* config/i386/i386-protos.h (ix86_function_value): Change
prototype to match new target hook.
* config/i386/i386.c (ix86_value_regno): Change prototype
to take extra type argument.
(TARGET_FUNCTION_VALUE): Define.
(ix86_function_ok_for_sibcall): Pass extra argument to
ix86_value_regno, check return slot rtx for exact match.
(ix86_function_value): Take extra parameter. Dispatch to
ix86_value_regno with fndecl/fntype as provided.
(ix86_value_regno): Handle extra type argument.
* config/i386/i386.h (FUNCTION_VALUE): No longer define.
* testsuite/gcc.target/i386/sseregparm-3.c: New testcase.
* testsuite/gcc.target/i386/sseregparm-4.c: New testcase.
* testsuite/gcc.target/i386/sseregparm-5.c: New testcase.
* testsuite/gcc.target/i386/sseregparm-6.c: New testcase.
* testsuite/gcc.target/i386/sseregparm-7.c: New testcase.
2005-07-14 Richard Guenther <rguenther@suse.de>
* Makefile.in (explow.o, reg-stack.o): Depend on target.h.
* calls.c (expand_call): Pass fntype to hard_function_value.
(emit_library_call_value_1): Likewise.
* explow.c: Include target.h.
(hard_function_value): Take extra argument, the fntype.
Use new target hook for function_value.
* expr.h (hard_function_value): Change prototype.
* function.c (aggregate_value_p): Pass 0 as fntype to
hard_function_value.
(assign_parms): Use new target hook for function_value.
Pass 0 as fntype to hard_function_value.
(expand_function_end): Likewise.
* reg-stack.c: Include target.h.
(stack_result): Use new target hook for function_value.
* target-def.h: New target hook function_value.
* target.h: Likewise.
* targhooks.c (default_function_value): New function.
* targhooks.h (default_function_value): Declare.
2005-07-13 Ian Lance Taylor <ian@airs.com>
* config/mips/mips.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
2005-07-14 Jan Hubicka <jh@suse.cz>
* tree-dfa.c (dump_variable): Use default_def function.
* tree-ssa-alias.c (dump_points_to_info): Likewise.
* tree-ssa.c (verify_use): Likewise.
* tree-ssanames.c (release_ssa_name): Likewise.
* tree-tailcall.c (eliminate_tail_call): Likewise.
(tree_optimize_tail_calls_1): Likewise.
* tree-vrp.c (get_value_range): Likewise.
2005-07-14 Ben Elliston <bje@au.ibm.com>
* gcc.c (main): Compare language[0] with '*' when iterating over
the infiles.
2005-07-13 Adrian Strae½tling <straetling@de.ibm.com>
* config/s390/s390.c: (s390_cc_modes_compatible): Move before
"s390_emit_compare". Add handling of CCZ1mode.
(s390_canonicalize_comparison): Simplify cascaded EQ, NE.
(390_emit_compare): Use "s390_cc_modes_compatible" for mode
checking.
(s390_branch_condition_mask): Add CCZ1mode handling.
* config/s390/s390.md: ("seq", "*seq"): New pattern.
("sync_compare_and_swap_cc<mode>", "*sync_compare_and_swap_cc<mode>"):
Use CCZ1mode instead of CCZmode.
* config/s390/s390-modes.def: Add CCZ1mode. Comment new mode.
2006-07-13 Adrian Strae½tling <straetling@de.ibm.com>
* config/s390/s390.md: ("cmpstrsi", "*cmpstr<mode>"): New
pattern.
("strlen<mode>", "*strlen<mode>"): Use hard reg 0 in SImode.
2005-07-13 Eric Christopher <echristo@redhat.com>
* config/mips/mips.c (mips_canonicalize_comparison): New.
(mips_emit_int_relational): Use.
2005-07-13 Eric Christopher <echristo@redhat.com>
* config.gcc (s390x-ibm-tpf*): Add extra_options. Remove
static extra parts.
* config/s390/s390.md: Include tpf.md. Move tpf specific
patterns...
* config/s390/tpf.md: To here.
* config/s390/s390.opt: Move tpf specific options...
* config/s390/tpf.opt: to here. Add mmain option.
* config/s390/tpf-unwind.h: Remove unnecessary defines.
* config/s390/tpf.h: Rewrite.
2005-07-13 H.J. Lu <hongjiu.lu@intel.com>
* doc/tm.texi: Remove @xref{Cross-profiling}.
2005-07-13 Jeff Law <law@redhat.com>
* fold-const.c (fold_binary): When comparing two simple ADDR_EXPR
expressions, test their _DECL operands for pointer equality rather
than using operand_equal_p.
2005-07-13 H.J. Lu <hongjiu.lu@intel.com>
* config/alpha/linux.h (TARGET_HAS_F_SETLKW): Renamed to ...
(TARGET_POSIX_IO): This.
* config/darwin.h: Likewise.
* config/freebsd.h: Likewise.
* config/linux.h: Likewise.
* config/lynx.h: Likewise.
* config/netbsd.h: Likewise.
* config/rs6000/linux64.h: Likewise.
* config/rs6000/linux.h: Likewise.
* config/s390/tpf.h: Likewise.
* config/sh/embed-elf.h: Likewise.
* config/sparc/linux64.h: Likewise.
* config/sparc/linux.h: Likewise.
* config/svr4.h: Likewise.
* gcov-io.h: Likewise.
* doc/tm.texi: Updated.
* libgcov.c (create_file_directory): Defined only if
TARGET_POSIX_IO is defined.
(gcov_exit): Call create_file_directory only if TARGET_POSIX_IO
is defined.
2005-07-13 Jan Hubicka <jh@suse.cz>
* tree-ssa-operands.c (get_expr_operands): Fix typo in previous patch.
2005-07-13 David Edelsohn <edelsohn@gnu.org>
* tree-ssa-dom.c (lookup_avail_expr): Do not pass member in freed
structure as argument.
2005-07-13 Paolo Bonzini <bonzini@gnu.org>
PR tree-optimization/21921
* tree-iterator.c (tsi_link_before): Support the case when
tsi_end_p (tsi) == true.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Middle-end and optimization regressions: what should we do?
2005-07-28 17:26 Middle-end and optimization regressions: what should we do? François-Xavier Coudert
@ 2005-07-28 17:41 ` Steve Kargl
2005-07-28 22:38 ` Janis Johnson
2005-07-28 18:03 ` Daniel Berlin
2005-07-28 19:48 ` Andrew Pinski
2 siblings, 1 reply; 5+ messages in thread
From: Steve Kargl @ 2005-07-28 17:41 UTC (permalink / raw)
To: Fran?ois-Xavier Coudert; +Cc: fortran, gcc
On Thu, Jul 28, 2005 at 07:26:22PM +0200, Fran?ois-Xavier Coudert wrote:
>
> PR 22619 and PR 22509 are two examples of recent 4.1 regressions that
> showed up in gfortran, due to middle-end or optimization bugs (only
> happen at -O3). Since these are regressions, they should be treated
> before a long time passes, but since both source codes are Fortran, I
> guess people don't (and won't) want to look at them.
>
> How can we help here? Is there a way to make gfortran output a
> complete GIMPLE tree, that could be used for middle-end hackers to
> determine where the problem is? Or are we doomed to a dichotomy to
> know which patch caused these regressions?
>
These types of regressions have essentially halted my testing
and development on gfortran because I usually try to identify
the exact ChangeLog entry associated with the problem. This
typically involves a binary search for the problem with a
bootstrap in a clean directory for each "cvs update -D <date>".
As far as providing info to the middle-end people, you can
do -fdump-tree-all and try to sift through the volumes of
data.
--
Steve
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Middle-end and optimization regressions: what should we do?
2005-07-28 17:26 Middle-end and optimization regressions: what should we do? François-Xavier Coudert
2005-07-28 17:41 ` Steve Kargl
@ 2005-07-28 18:03 ` Daniel Berlin
2005-07-28 19:48 ` Andrew Pinski
2 siblings, 0 replies; 5+ messages in thread
From: Daniel Berlin @ 2005-07-28 18:03 UTC (permalink / raw)
To: François-Xavier Coudert; +Cc: fortran, gcc
On Thu, 2005-07-28 at 19:26 +0200, François-Xavier Coudert wrote:
> Hi all,
>
> PR 22619 and PR 22509 are two examples of recent 4.1 regressions that
> showed up in gfortran, due to middle-end or optimization bugs (only
> happen at -O3). Since these are regressions, they should be treated
> before a long time passes, but since both source codes are Fortran, I
> guess people don't (and won't) want to look at them.
I was getting these failures before my patch that added eustores, and
kenny was responsible for regtesting the tree for the ipa-* patches :)
(I always bootstrap and regtest with fortran on).
> PS: PR 22619 appeared somewhere between 20050716 and 20050717, so
> patches that could possible have messed up are:
The culprit in this case is indirectly the patch that added
ipa-reference AFAICT. -fno-ipa-reference seems to fix the bug on my
computer, see if it helps you too.
No clue why.
Given that it happens after CSE, I imagine it's enabling CSE to
eliminate something it didn't expect to be able to eliminate.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Middle-end and optimization regressions: what should we do?
2005-07-28 17:26 Middle-end and optimization regressions: what should we do? François-Xavier Coudert
2005-07-28 17:41 ` Steve Kargl
2005-07-28 18:03 ` Daniel Berlin
@ 2005-07-28 19:48 ` Andrew Pinski
2 siblings, 0 replies; 5+ messages in thread
From: Andrew Pinski @ 2005-07-28 19:48 UTC (permalink / raw)
To: fxcoudert; +Cc: fortran, gcc
>
> Hi all,
>
> PR 22619 and PR 22509 are two examples of recent 4.1 regressions that
> showed up in gfortran, due to middle-end or optimization bugs (only
> happen at -O3). Since these are regressions, they should be treated
> before a long time passes, but since both source codes are Fortran, I
> guess people don't (and won't) want to look at them.
>
> How can we help here? Is there a way to make gfortran output a
> complete GIMPLE tree, that could be used for middle-end hackers to
> determine where the problem is? Or are we doomed to a dichotomy to
> know which patch caused these regressions?
>
> FX
>
> PS: PR 22619 appeared somewhere between 20050716 and 20050717, so
> patches that could possible have messed up are:
Patch which exposed it:
> 2005-07-16 Danny Berlin <dberlin@dberlin.org>
> Kenneth Zadeck <zadeck@naturalbridge.com>
Kenny's patch exposed the latent bug. I attached a testcase to RR
22619 showing that it is a regression from 3.2.3 and it fails in
3.3 and up. Kenny's patch changes a static variable to a static
const variable which gets "inlined".
> PR 22509 appeared between 20050713 and 20050714, so possible guilty patches are:
this was caused exposed by:
2005-07-12 Zdenek Dvorak <dvorakz@suse.cz>
PR rtl-optimization/20376
* toplev.c (process_options): Enable -fweb and -frename-registers when
unrolling.
* doc/invoke.texi: Update the information about when -fweb and
-frename-registers are enabled.
Thanks,
Andrew Pinski
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Middle-end and optimization regressions: what should we do?
2005-07-28 17:41 ` Steve Kargl
@ 2005-07-28 22:38 ` Janis Johnson
0 siblings, 0 replies; 5+ messages in thread
From: Janis Johnson @ 2005-07-28 22:38 UTC (permalink / raw)
To: Steve Kargl; +Cc: Fran?ois-Xavier Coudert, fortran, gcc
On Thu, Jul 28, 2005 at 10:41:48AM -0700, Steve Kargl wrote:
> On Thu, Jul 28, 2005 at 07:26:22PM +0200, Fran?ois-Xavier Coudert wrote:
> >
> > PR 22619 and PR 22509 are two examples of recent 4.1 regressions that
> > showed up in gfortran, due to middle-end or optimization bugs (only
> > happen at -O3). Since these are regressions, they should be treated
> > before a long time passes, but since both source codes are Fortran, I
> > guess people don't (and won't) want to look at them.
> >
> > How can we help here? Is there a way to make gfortran output a
> > complete GIMPLE tree, that could be used for middle-end hackers to
> > determine where the problem is? Or are we doomed to a dichotomy to
> > know which patch caused these regressions?
>
> These types of regressions have essentially halted my testing
> and development on gfortran because I usually try to identify
> the exact ChangeLog entry associated with the problem. This
> typically involves a binary search for the problem with a
> bootstrap in a clean directory for each "cvs update -D <date>".
In case you're not already aware of them, see contrib/reghunt and
http://gcc.gnu.org/bugs/reghunt.html.
Janis
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-07-28 22:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-28 17:26 Middle-end and optimization regressions: what should we do? François-Xavier Coudert
2005-07-28 17:41 ` Steve Kargl
2005-07-28 22:38 ` Janis Johnson
2005-07-28 18:03 ` Daniel Berlin
2005-07-28 19:48 ` Andrew Pinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).