Richard Guenther [Wed, 20 Jun 2012 12:00:20 +0000 (12:00 +0000)]
re PR tree-optimization/30318 (VRP does not create ANTI_RANGEs on overflow)
2012-06-20 Richard Guenther <rguenther@suse.de>
PR tree-optimization/30318
* tree-vrp.c (range_int_cst_p): Do not reject overflowed
constants here.
(range_int_cst_singleton_p): But explicitely here.
(zero_nonzero_bits_from_vr): And here.
(extract_range_from_binary_expr_1): Re-implement PLUS_EXPR
to cover all cases we can perform arbitrary precision
arithmetic with double-ints.
(intersect_ranges): Handle adjacent anti-ranges.
Uros Bizjak [Wed, 20 Jun 2012 10:25:17 +0000 (12:25 +0200)]
i386.md (rounding_insn): New int attribute.
2012-06-20 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (rounding_insn): New int attribute.
(<rounding_insn>xf2): Macroize insn from
{floor,ceil,btrunc}xf2 using FRNDINT_ROUNDING int iterator.
(l<rounding_insn>xf<mode>2): Rename from l<rounding>xf<mode>2.
2012-06-20 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (IEEE_MAXMIN): New int iterator.
(ieee_maxmin): New int attribute.
(*ieee_s<ieee_maxmin><mode>3): Macroize insn from
*ieee_s{max,min}<mode>3 using IEEE_MAXMIN mode iterator.
Steven Bosscher [Wed, 20 Jun 2012 10:18:08 +0000 (10:18 +0000)]
arm.h (EMIT_EABI_ATTRIBUTE): Remove.
* config/arm/arm.h (EMIT_EABI_ATTRIBUTE): Remove.
* config/arm/arm.c: Do not include c-pragma.h.
(arm_emit_eabi_attribute): New function based on EMIT_EABI_ATTRIBUTE.
(arm_file_start): Replace uses of EMIT_EABI_ATTRIBUTE with calls
to arm_emit_eabi_attribute.
* arm-c.c: Do not include output.h.
(arm_output_c_attributes): Replace use of EMIT_EABI_ATTRIBUTE with a
call to arm_emit_eabi_attribute.
* config/arm/arm-protos.h (arm_emit_eabi_attribute): Prototype it.
Maxim Kuvyrkov [Wed, 20 Jun 2012 01:05:25 +0000 (01:05 +0000)]
emit-rtl.c (need_atomic_barrier_p): New function.
* emit-rtl.c (need_atomic_barrier_p): New function.
* emit-rtl.h (need_atomic_barrier_p): Declare it.
* config/alpha/alpha.c (alpha_{pre,post}_atomic_barrier): Use it.
* config/arm/arm.c (arm_{pre,post}_atomic_barrier): Use it.
* config/tilegx/tilegx.c (tile_{pre,post}_atomic_barrier): Use it.
* config/mips/mips.c (mips_{pre,post}_atomic_barrier_p): Remove.
(mips_process_sync_loop): Use generic version instead.
Tom de Vries [Wed, 20 Jun 2012 00:57:23 +0000 (00:57 +0000)]
2012-06-19 Tom de Vries <vries@codesourcery.com>
Maxim Kuvyrkov <maxim@codesourcery.com>
* config/mips/mips.c (mips_emit_pre_atomic_barrier_p,)
(mips_emit_post_atomic_barrier_p): New static functions.
(mips_process_sync_loop): Use them. Emit sync memory barriers in
accordance with memory model semantics. Add return of CMP result for
compare_and_swap.
* config/mips/mips.md: Update comment.
(sync_cmp): New attribute.
(sync_memmodel): New attribute replacing sync_release_barrier.
* config/mips/sync.md (UNSPEC_ATOMIC_COMPARE_AND_SWAP,)
(UNSPEC_ATOMIC_EXCHANGE, UNSPEC_ATOMIC_FETCH_OP): New constants.
(sync_lock_test_and_set, test_and_set_12): Update.
(atomic_compare_and_swap, atomic_exchange, atomic_exchange_llsc,)
(atomic_fetch_add, atomic_fetch_add_llsc): New patterns.
Joseph Myers [Tue, 19 Jun 2012 22:08:49 +0000 (23:08 +0100)]
spe.md (*mov_si<mode>_e500_subreg0): Rename to mov_si<mode>_e500_subreg0.
* config/rs6000/spe.md (*mov_si<mode>_e500_subreg0): Rename to
mov_si<mode>_e500_subreg0.
(*mov_si<mode>_e500_subreg0_elf_low)
(*mov_si<mode>_e500_subreg4_elf_low): New patterns.
testsuite:
* gcc.c-torture/compile/vector-5.c,
gcc.c-torture/compile/vector-6.c: New tests.
gcc/
* doc/tm.texi.in (TARGET_OBJC_DECLARE_UNRESOLVED_CLASS_REFERENCE,
TARGET_OBJC_DECLARE_CLASS_DEFINITION): Add @hooks.
(ASM_DECLARE_CLASS_REFERENCE, ASM_DECLARE_UNRESOLVED_REFERENCE):
Remove.
* doc/tm.texi: Regenerate.
* config/darwin.h (ASM_OUTPUT_LABELREF): Remove special case for
.objc_class_name_*.
* config/darwin-c.c: Include target.h.
(darwin_objc_declare_unresolved_class_reference): New function.
(darwin_objc_declare_class_definition): New function.
(TARGET_OBJC_DECLARE_UNRESOLVED_CLASS_REFERENCE): Define.
(TARGET_OBJC_DECLARE_CLASS_DEFINITION): Define.
c-family/
* c-target.def (objc_declare_unresolved_class_reference,
objc_declare_class_definition): Add new hooks.
objc/
* objc-next-runtime-abi-01.c: Do not include tm.h and output.h.
Include c-family/c-target.h.
(handle_next_class_ref): Rewrite to emit top-level asm statements.
(handle_next_impent): Likewise.
* objc/Make-lang.in: Fix dependencies for objc-next-runtime-abi-01.o.
Steven Bosscher [Tue, 19 Jun 2012 19:55:33 +0000 (19:55 +0000)]
target.def (output_ident): New hook.
gcc/
* target.def (output_ident): New hook.
* targhooks.h (default_asm_output_ident_directive): Add prototype.
* varasm.c (assemble_asm): Only prefix a tab if the string does not
already start with one.
(default_asm_output_ident_directive): New function to emit
.ident as a top-level asm node while parsing, or directly to
asm_out_file after parsing.
* toplev.c (compile_file): Print a GCC .ident with
targetm.asm_out.output_ident.
* doc/tm.texi.in (ASM_OUTPUT_IDENT): Remove documentation for macro.
(TARGET_ASM_OUTPUT_IDENT): Add @hook for this.
* doc/tm.texi: Update.
* config/microblaze/microblaze-protos.h (microblaze_asm_output_ident):
Add prototype.
* config/microblaze/microblaze.c: Include cgraph.h for add_asm_node.
(microblaze_asm_output_ident): Rewrite to work similar to
default_asm_output_ident_directive for front-end .idents.
* config/microblaze/microblaze.h (ASM_OUTPUT_IDENT): Remove.
(TARGET_ASM_OUTPUT_IDENT): Define.
* config/rx/rx.c: Include cgraph.h for add_asm_node.
(rx_asm_output_ident): New function, similar to
default_asm_output_ident_directive, but handle AS100 syntax also, so
that #ident also works for rx in AS100 syntax.
(TARGET_ASM_OUTPUT_IDENT): Define.
* config/rx/rx.h (IDENT_ASM_OP): Remove.
* Makefile.in: Fix dependencies for c-family/c-lex.o.
c-family/
* c-lex.c: Do not include output.h.
(cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
Remove uses of ASM_OUTPUT_IDENT.
ada/
* gcc-interface/trans.c: Include target.h.
(gigi): Try to put out .ident with targetm.asm_out.output_ident.
Remove uses of ASM_OUTPUT_IDENT.
* gcc-interface/Make-lang.in: Fix dependencies.
Uros Bizjak [Tue, 19 Jun 2012 18:24:26 +0000 (20:24 +0200)]
i386.md (FIST_ROUNDING): New int iterator.
* config/i386/i386.md (FIST_ROUNDING): New int iterator.
(rounding): Handle UNSPEC_FIST_{FLOOR,CEIL}.
(ROUNDING): Ditto.
(*fist<mode>2_<rounding>_1): Macroize insn from
*fist<mode>2_{floor,ceil}_1 using FIST_ROUNDING int iterator.
(fistdi2_<rounding>): Macroize insn from
fistdi2_{floor,ceil} using FIST_ROUNDING int iterator.
(fistdi2_<rounding>_with_temp and splitters): Macroize insn and
corresponding splitters from fistdi2_{floor,ceil} and corresponding
splitters using FIST_ROUNDING int iterator.
(fist<mode>2_<rounding>): Macroize insn from
fist<mode>2_{floor,ceil} using FIST_ROUNDING int iterator.
(fist<mode>2_<rounding>_with_temp and splitters): Macroize insn and
corresponding splitters from fist<mode>2_{floor,ceil} and corresponding
splitters using FIST_ROUNDING int iterator.
(l<rounding>xf<mode>2): Macroize expander from l{floor,ceil}xf<mode>2
using FIST_ROUNDING int iterator.
Uros Bizjak [Tue, 19 Jun 2012 16:32:57 +0000 (18:32 +0200)]
i386.md (FRNDINT_ROUNDING): New int iterator.
* config/i386/i386.md (FRNDINT_ROUNDING): New int iterator.
(rounding): New int attribute.
(ROUNDING): Ditto.
(frndintxf2_<rounding>): Macroize insn from
frndintxf2_{floor,ceil,trunc} using FRNDINT_ROUNDING int iterator.
(frndintxf2_<rounding>_i387): Macroize insn from
frndintxf2_{floor,ceil,trunc}_i387 using FRNDINT_ROUNDING int iterator.
Richard Guenther [Tue, 19 Jun 2012 09:19:07 +0000 (09:19 +0000)]
re PR middle-end/53708 (Many failures of the objc tests with -O3 -fnext-runtime and -m32)
2012-06-19 Richard Guenther <rguenther@suse.de>
PR tree-optimization/53708
* tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Preserve
user-supplied alignment and alignment of decls with the used
attribute.
Lawrence Crowl [Tue, 19 Jun 2012 01:30:31 +0000 (01:30 +0000)]
The intent of the phases was to have a high-level but mutually exclusive accounting of compile time.
The intent of the phases was to have a high-level but mutually exclusive
accounting of compile time. We want to track compile time in a way that
tells us which conceptual phases are taking the most time. That intent
is not currently satisfied. This patch restores that intent.
Add code to verify that the sum of the phase times is less than the total
time, to detect when phases are overlapped. A slight amount of leeway is
required due to time jitters. This verification is done as the last step
in printing timevars so that any timevar information is not lost.
Rename the phases to be clearer about what they measure, so that they
are less likely to be modified to be overlapping. The primary example
is to change TV_PHASE_GENERATE to TV_PHASE_LATE_ASM, meaning late work
on the assembly. This name change avoids confusion n moving the timevar
start call after the call to lang_hooks.decls.final_write_globals, which
prevents overlapping phases.
Each implementation of lang_hooks.decls.final_write_globals, is responsible
for starting and stopping its own phases. Each implementation currently has
a first phase of TV_PHASE_DEFERRED for front-end work deferred until after
parsing is complete. The second phase has been renamed from TV_PHASE_CGRAPH
to TV_PHASE_OPT_GEN, to better reflect its use as the main optimization
and generation phase. This phase accounts for 70%-80% of compilation time
during bootstrap. The third phase is TV_PHASE_DBGINFO, except in cp/decl2.c,
where it is TV_PHASE_CHECK_DBGINFO because cc1plus mixes checking in with
debug info generation. In langhooks.c, write_global_declarations was
using TV_PHASE_CHECK_DBGINFO, but it was doing no checking. So, it now
uses TV_PHASE_DBGINFO.
The changes to LTO are significant. First, initialization now uses
TV_PHASE_SETUP. Reading files now uses TV_PHASE_STREAM_IN. Writing files
now uses TV_PHASE_STREAM_OUT. The remaining phase is TV_PHASE_OPT_GEN
(formerly TV_PHASE_CGRAPH). Finally, because LTO is treated as a front
end, TV_PHASE_PARSING and TV_PARSE_GLOBAL active around it. It is not
parsing, and so those timers should not be active. Rather than make all
front ends manage them, we turn them off as the first thing in LTO and turn
them back on as the last thing.
Tested on x86_64.
Index: gcc/ChangeLog
2012-06-18 Lawrence Crowl <crowl@google.com>
* timevar.def (TV_PHASE_GENERATE): Rename to TV_PHASE_LATE_ASM.
(TV_PHASE_CGRAPH): Rename to TV_PHASE_OPT_GEN.
(TV_PHASE_STREAM_IN): New.
(TV_PHASE_STREAM_OUT): New.
* timevar.c (validate_phases): New.
(timevar_print): Call validate_phases.
* c-decl.c (c_write_global_declarations): Rename use of TV_PHASE_CGRAPH
to TV_PHASE_OPT_GEN.
* langhooks.c (write_global_declarations): Rename use of
TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Use TV_PHASE_DBGINFO instead of
TV_PHASE_CHECK_DBGINFO.
* toplev.c (compile_file): Rename use of TV_PHASE_GENERATE to
TV_PHASE_LATE_ASM. Move start of TV_PHASE_LATE_ASM to after call to
lang_hooks.decls.final_write_globals.
Index: gcc/cp/ChangeLog
2012-06-18 Lawrence Crowl <crowl@google.com>
* decl2.c (cp_write_global_declarations): Rename use of TV_PHASE_CGRAPH
to TV_PHASE_OPT_GEN.
Index: gcc/lto/ChangeLog
2012-06-18 Lawrence Crowl <crowl@google.com>
* lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
to lto_wpa_write_files.
(lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
TV_PHASE_SETUP for the call to lto_init. Use new timevar
TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
to be a front end, but is not one.
Tobias Burnus [Mon, 18 Jun 2012 18:37:16 +0000 (20:37 +0200)]
intrinsic.h (gfc_resolve_rank): New prototype.
2012-06-18 Tobias Burnus <burnus@net-b.de>
* intrinsic.h (gfc_resolve_rank): New prototype.
* intrinsic.c (add_functions): Use gfc_resolve_rank.
* iresolve.c (add_functions): New function.
* trans-intrinsic.c (gfc_conv_intrinsic_rank): New function.
(gfc_conv_intrinsic_function): Call it.
Ian Bolton [Mon, 18 Jun 2012 18:06:54 +0000 (18:06 +0000)]
As a result of the previous changes, epilogue_insns pattern can only be generated in Thumb1.
As a result of the previous changes, epilogue_insns pattern can only be
generated in Thumb1. After removing other cases in define_insn for
epilogue_insns, the function arm_output_epilogue becomes dead code and can
be eliminated, along with all its helper functions.
gcc/
2012-06-18 Ian Bolton <ian.bolton@arm.com>
Sameera Deshpande <sameera.deshpande@arm.com>
Greta Yorsh <greta.yorsh@arm.com>
Ian Bolton [Mon, 18 Jun 2012 17:57:06 +0000 (17:57 +0000)]
Add a new parameter to the function output_return_instruction to handle simple...
Add a new parameter to the function output_return_instruction to handle
simple cases of return when no epilogue needs to be printed out.
gcc/
2012-06-18 Ian Bolton <ian.bolton@arm.com>
Sameera Deshpande <sameera.deshpande@arm.com>
Greta Yorsh <greta.yorsh@arm.com>
* config/arm/arm-protos.h (output_return_instruction): New parameter and
int to bool change of parameter types.
* config/arm/arm.c (output_return_instruction): Likewise.
* config/arm/arm.md (arm_simple_return): New pattern.
(arm_return, cond_return, cond_return_inverted): Add new arguments.
* config/arm/thumb2.md (thumb2_return): Update condition and code.
Co-Authored-By: Greta Yorsh <greta.yorsh@arm.com> Co-Authored-By: Sameera Deshpande <sameera.deshpande@arm.com>
From-SVN: r188743
Ian Bolton [Mon, 18 Jun 2012 17:38:21 +0000 (17:38 +0000)]
Helper function for epilogue expansion.
Helper function for epilogue expansion. Emit RTL for APCS frame epilogue
(when -mapcs-frame command line option is specified).
This function is used by a later patch.
gcc/
2012-06-18 Ian Bolton <ian.bolton@arm.com>
Sameera Deshpande <sameera.deshpande@arm.com>
Greta Yorsh <greta.yorsh@arm.com>
* config/arm/arm.c (arm_expand_epilogue_apcs_frame): New function.
* config/arm/arm.md (arm_addsi3) Add an alternative.
Co-Authored-By: Greta Yorsh <greta.yorsh@arm.com> Co-Authored-By: Sameera Deshpande <sameera.deshpande@arm.com>
From-SVN: r188741
Ian Bolton [Mon, 18 Jun 2012 17:30:41 +0000 (17:30 +0000)]
New define insn pattern for epilogue with floating point registers (DFmode) and...
New define insn pattern for epilogue with floating point registers (DFmode)
and a new function that emits RTL for this pattern. This function is a
helper for epilogue extension. It is used by a later patch.
gcc/
2012-06-18 Ian Bolton <ian.bolton@arm.com>
Sameera Deshpande <sameera.deshpande@arm.com>
Greta Yorsh <greta.yorsh@arm.com>
* config/arm/arm.md (vfp_pop_multiple_with_writeback) New
define_insn.
* config/arm/predicates.md (pop_multiple_fp) New special predicate.
* config/arm/arm.c (arm_emit_vfp_multi_reg_pop): New function.
Co-Authored-By: Greta Yorsh <greta.yorsh@arm.com> Co-Authored-By: Sameera Deshpande <sameera.deshpande@arm.com>
From-SVN: r188740
Ian Bolton [Mon, 18 Jun 2012 17:24:25 +0000 (17:24 +0000)]
This patch adds new define_insn patterns for epilogue with integer
registers.
The patterns can handle pop multiple with writeback and return (loading into
PC directly).
To handle return, the patterns use a new special predicate
pop_multiple_return, that uses ldm_stm_operation_p function from a previous
patch. To output assembly, the patterns use a new function
arm_output_multireg_pop.
This patch also adds a new function arm_emit_multi_reg_pop
that emits RTL that matches the new pop patterns for integer registers.
This is a helper function for epilogue expansion. It is used by a later
patch.
2012-06-18 Ian Bolton <ian.bolton@arm.com>
Sameera Deshpande <sameera.deshpande@arm.com>
Greta Yorsh <greta.yorsh@arm.com>
* config/arm/arm.md (load_multiple_with_writeback) New define_insn.
(load_multiple, pop_multiple_with_writeback_and_return) Likewise.
(pop_multiple_with_return, ldr_with_return) Likewise.
* config/arm/predicates.md (pop_multiple_return) New special predicate.
* config/arm/arm-protos.h (arm_output_multireg_pop) New declaration.
* config/arm/arm.c (arm_output_multireg_pop) New function.
(arm_emit_multi_reg_pop): New function.
Co-Authored-By: Greta Yorsh <greta.yorsh@arm.com> Co-Authored-By: Sameera Deshpande <sameera.deshpande@arm.com>
From-SVN: r188739
Greta Yorsh [Mon, 18 Jun 2012 17:06:35 +0000 (18:06 +0100)]
This patch updates ldm_stm_operation_p to check for loads that if SP is in the register list...
This patch updates ldm_stm_operation_p to check for loads that if SP is in
the register list, then the base register is SP. It guarantees that SP is
reset correctly when an LDM instruction is interrupted. Otherwise, we might
end up with a corrupt stack.
gcc/
2012-06-18 Greta Yorsh <greta.yorsh@arm.com>
* config/arm/arm.c (ldm_stm_operation_p): Require SP
as base register for loads if SP is in the register list.
Steven Bosscher [Sun, 17 Jun 2012 21:12:24 +0000 (21:12 +0000)]
output.h (split_double): Move prototype to rtl.h.
* output.h (split_double): Move prototype to rtl.h.
(constructor_static_from_elts_p): Move prototype to tree.c.
* rtl.h (split_double): Moved here from output.h.
* tree.h (constructor_static_from_elts_p): Moved here from output.h.
* final.c (split_double): Move from here ...
* rtlanal.c (split_double): ... to here.
* expr.c: Do not include output.h.
Steven Bosscher [Sun, 17 Jun 2012 21:04:41 +0000 (21:04 +0000)]
cfgloop.h: Do not include rtl.h.
* cfgloop.h: Do not include rtl.h.
(enum iv_extend_code): New.
(struct rtx_iv): Use iv_extend_code instead of rtx_code.
* Makefile.in (CFGLOOP_H): Do not depend on RTL_H.
* loop-iv.c (iv_extend_to_rtx_code): New function to translate
an IV_EXTEND_CODE to an RTX_CODE.
(dump_iv_info): Update for rtx_iv field type change.
(iv_constant): Likewise.
(iv_subreg): Likewise.
(iv_extend): Likewise.
(iv_neg): Likewise.
(iv_add): Likewise.
(iv_mult): Likewise.
(iv_shift): Likewise.
(get_biv_step_1): Likewise.
(get_biv_step): Likewise.
(iv_analyze_biv): Likewise.
(get_iv_value): Likewise.
(shorten_into_mode): Likewise.
(canonicalize_iv_subregs): Likewise.
* sese.c (sese_build_liveouts): Use MAY_HAVE_DEBUG_STMTS instead
of MAY_HAVE_DEBUG_INSNS.
* tree-ssa-loop-ivopts.c: Include recog.h after expr.h.
* tree-ssa-loop-prefetch.c: Likewise.
Steven Bosscher [Sun, 17 Jun 2012 21:01:25 +0000 (21:01 +0000)]
expmed.c (ceil_log2): Move from here...
* expmed.c (ceil_log2): Move from here...
* hwint.c: ... to here for older GCCs...
* hwint.h: ... and here for newer GCCs.
* rtl.h (ceil_log2): Remove prototype.
* tree-phinodes.c: Do not include rtl.h.
* Makefile.in (tree-phinodes.o): Do not depend on RTL_H.
Uros Bizjak [Sun, 17 Jun 2012 13:54:53 +0000 (15:54 +0200)]
sfp-machine.h (FP_HANDLE_EXCEPTIONS): Use __builtin_expect when checking for exceptions.
* config/i386/sfp-machine.h (FP_HANDLE_EXCEPTIONS): Use
__builtin_expect when checking for exceptions.
* config/ia64/sfp-machine.h (FP_HANDLE_EXCEPTIONS): Ditto.
Tobias Burnus [Sat, 16 Jun 2012 18:13:38 +0000 (20:13 +0200)]
re PR fortran/53642 (Front-end optimization: Wrong string length for deferred-length strings)
2012-06-16 Tobias Burnus <burnus@net-b.de>
PR fortran/53642
PR fortran/45170
* frontend-passes.c (optimize_assignment): Don't remove RHS's
trim when assigning to a deferred-length string.
* trans-expr.c (gfc_trans_assignment_1): Ensure that the RHS string
length is evaluated before the deferred-length LHS is reallocated.
Janis Johnson [Fri, 15 Jun 2012 19:45:54 +0000 (19:45 +0000)]
gcov.exp (verify-lines, [...]): Use testname that includes flags, passed in as new argument, in pass/fail messages.
* lib/gcov.exp (verify-lines, verify-branches, verify-calls): Use
testname that includes flags, passed in as new argument, in
pass/fail messages.
(run_gcov): Get testname from dg-test, use it in pass/fail messages
and pass it to verify-* procedures.
Georg-Johann Lay [Fri, 15 Jun 2012 15:56:02 +0000 (15:56 +0000)]
avr.c (avr_default_expand_builtin): New function.
* config/avr/avr.c (avr_default_expand_builtin): New function.
(avr_expand_builtin): Use it.
(avr_expand_unop_builtin): Remove.
(avr_expand_binop_builtin): Remove.
(avr_expand_triop_builtin): Remove.
Michael Matz [Fri, 15 Jun 2012 14:56:26 +0000 (14:56 +0000)]
re PR middle-end/38474 (compile time explosion in dataflow_set_preserve_mem_locs at -O3)
PR middle-end/38474
* cfgexpand.c (add_alias_set_conflicts): Remove.
(expand_used_vars): Don't call it.
(aggregate_contains_union_type): Remove.
* function.c (n_temp_slots_in_use): New static data.
(make_slot_available, assign_stack_temp_for_type): Update it.
(init_temp_slots): Zero it.
(remove_unused_temp_slot_addresses): Use it for quicker removal.
(remove_unused_temp_slot_addresses_1): Use htab_clear_slot.
Michael Matz [Fri, 15 Jun 2012 14:46:36 +0000 (14:46 +0000)]
gimplify.c (gimplify_compound_literal_expr): Take gimple_test_f argument...
* gimplify.c (gimplify_compound_literal_expr): Take gimple_test_f
argument, don't emit assign statement if value is directly usable.
(gimplify_expr): Adjust.
testsuite/
* gcc.dg/tree-ssa/vector-4.c: New test.
Richard Guenther [Fri, 15 Jun 2012 13:38:17 +0000 (13:38 +0000)]
tree-vrp.c (set_and_canonicalize_value_range): Use canonical predicates to set VR_UNDEFINED and VR_VARYING.
2012-06-15 Richard Guenther <rguenther@suse.de>
* tree-vrp.c (set_and_canonicalize_value_range): Use canonical
predicates to set VR_UNDEFINED and VR_VARYING. Drop a case
we assert for in set_value_range to VR_VARYING.
Jakub Jelinek [Fri, 15 Jun 2012 11:07:47 +0000 (13:07 +0200)]
re PR tree-optimization/51581 (Integer division by constant is not vectorized)
PR tree-optimization/51581
* expr.h (choose_multiplier): New prototype.
* expmed.c (choose_multiplier): No longer static.
Change multiplier_ptr from rtx * to UHWI *.
(expand_divmod): Adjust callers.
* tree-vect-patterns.c (vect_recog_sdivmod_pow2_pattern):
Renamed to...
(vect_recog_divmod_pattern): ... this. Pass bb_vinfo as last
argument to new_stmt_vec_info. Attempt to optimize also divisions
by non-pow2 constants if integer vector division isn't supported.
* tree-vect-stmts.c (vect_analyze_stmt): If node != NULL,
don't look at pattern stmts and sequences.
* gcc.c-torture/execute/pr51581-1.c: New test.
* gcc.c-torture/execute/pr51581-2.c: New test.
* gcc.dg/vect/pr51581-1.c: New test.
* gcc.dg/vect/pr51581-2.c: New test.
* gcc.dg/vect/pr51581-3.c: New test.
* gcc.target/i386/avx-pr51581-1.c: New test.
* gcc.target/i386/avx-pr51581-2.c: New test.
* gcc.target/i386/avx2-pr51581-1.c: New test.
* gcc.target/i386/avx2-pr51581-2.c: New test.
* gcc.dg/vect/slp-26.c (main1): Divide by 0x8031 instead of 3.