gcc/ChangeLog:
* pass_manager.h (pass_manager::register_pass_name): New method.
(pass_manager::get_pass_by_name): New method.
(pass_manager::create_pass_tab): New method.
(pass_manager::m_name_to_pass_map): New field.
* passes.c (name_to_pass_map): Delete global in favor of field
"m_name_to_pass_map" of pass_manager.
(register_pass_name): Rename from a function to...
(pass_manager::register_pass_name): ...this method, updating
for renaming of global "name_to_pass_map" to field
"m_name_to_pass_map".
(create_pass_tab): Rename from a function to...
(pass_manager::create_pass_tab): ...this method, updating
for renaming of global "name_to_pass_map" to field.
(get_pass_by_name): Rename from a function to...
(pass_manager::get_pass_by_name): ...this method.
(enable_disable_pass): Convert use of get_pass_by_name to
a method call, locating the pass_manager singleton.
From-SVN: r235977
* config/i386/sse.md (<mask_codefor>ashr<mode>3<mask_name>): Move
before the ashr<mode>3 pattern.
* gcc.target/i386/avx512bw-vpsraw-3.c: New test.
* gcc.target/i386/avx512vl-vpsrad-3.c: New test.
From-SVN: r235972
* config/i386/sse.md (*avx2_pmaddwd, *sse2_pmaddwd): Use
v instead of x in vex or maybe_vex alternatives, use
maybe_evex instead of vex in prefix.
* gcc.target/i386/avx512bw-vpmaddwd-3.c: New test.
From-SVN: r235971
* config/i386/sse.md (*vec_extractv4sf_0, *sse4_1_extractps,
*vec_extractv4sf_mem, vec_extract_lo_v16hi, vec_extract_hi_v16hi,
vec_extract_lo_v32qi, vec_extract_hi_v32qi): Use v instead of x
in vex or maybe_vex alternatives, use maybe_evex instead of vex
in prefix.
From-SVN: r235970
* config/i386/sse.md (*vec_concatv2sf_sse4_1, *vec_concatv4sf): Use
v instead of x in vex or maybe_vex alternatives, use
maybe_evex instead of vex in prefix.
From-SVN: r235969
* config/i386/sse.md (sse_shufps_<mode>, sse_storehps, sse_loadhps,
sse_storelps, sse_movss, avx2_vec_dup<mode>, avx2_vec_dupv8sf_1,
sse2_shufpd_<mode>, sse2_storehpd, sse2_storelpd, sse2_loadhpd,
sse2_loadlpd, sse2_movsd): Use v instead of x in vex or maybe_vex
alternatives, use maybe_evex instead of vex in prefix.
From-SVN: r235968
*vec_interleave_highv2df, *vec_interleave_lowv2df): Use
v instead of x in vex or maybe_vex alternatives, use
maybe_evex instead of vex in prefix.
From-SVN: r235967
* config/i386/sse.md (sse_movhlps, sse_movlhps): Use
v instead of x in vex or maybe_vex alternatives, use
maybe_evex instead of vex in prefix.
From-SVN: r235966
2016-05-06 Richard Biener <rguenther@suse.de>
PR tree-optimization/70948
* tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
Properly clobber all fields of va_list for __builtin_va_start.
From-SVN: r235963
* tree-ssa-uninit.c: Apply manual changes
to the GNU coding style.
(prune_uninit_phi_opnds): Rename from
prune_uninit_phi_opnds_in_unrealizable_paths.
From-SVN: r235961
2016-05-06 Richard Biener <rguenther@suse.de>
PR middle-end/70941
* fold-const.c (split_tree): Always convert to the original type
before negating.
* gcc.dg/torture/pr70941.c: New testcase.
From-SVN: r235943
PR target/70873
* config/i386/i386-protos.h (ix86_standard_x87sse_constant_load_p):
New prototype.
* config/i386/i386.c (ix86_standard_x87sse_constant_load_p): New.
* config/i386/i386.md (push mem splitter): Use find_constant_src in
the splitter condition.
(FP load splitter): Use ix86_standard_x87sse_constant_load_p in
the splitter condition.
(FP float_extend load splitter): Ditto.
From-SVN: r235936
* config/i386/i386.md (peehole2 patterns): Change true_regnum
to REGNUM in all peephole2 patterns.
(post-reload splitters): Change true_regnum to REGNUM in
post-reload splitters.
(zero_extend splitters): Use general_reg_operand and
nonimmediate_gr_operand predicates.
From-SVN: r235933
* openmp.c (gfc_match_omp_clauses): Restructuralize, so that clause
parsing is done in a big switch based on gfc_peek_ascii_char and
individual clauses under their first letters are sorted too.
From-SVN: r235922
* config/i386/sse.md (<avx512>_fmadd_<mode>_mask3<round_name>): Use
v constraint instead of x.
* gcc.target/i386/avx512f-vfmadd-1.c: New test.
From-SVN: r235921
* c-parser.c (c_parser_switch_statement): Add IF_P argument,
parse it through to c_parser_c99_block_statement.
(c_parser_statement_after_labels): Adjust c_parser_switch_statement
caller.
* parser.c (cp_parser_selection_statement): For RID_SWITCH,
pass if_p instead of NULL to cp_parser_implicitly_scoped_statement.
* c-c++-common/Wdangling-else-4.c: New test.
From-SVN: r235920
For ABI_V4, -mrelocatable and -fPIC both generate position independent
code, with some extra "fixup" output for -mrelocatable. The
similarity of these two options has led to the situation where the
sysv4.h SUBTARGET_OVERRIDE_OPTIONS sets flag_pic on seeing
-mrelocatable, and sets TARGET_RELOCATABLE on seeing -fPIC. That
prevents LTO from properly optimizing position dependent executables,
because the mutual dependence of the flags and the fact that LTO
streaming records the state of rs6000_isa_flags, result in flag_pic
being set when it shouldn't be.
So, don't set TARGET_RELOCATABLE when -fPIC. Places that currently
test TARGET_RELOCATABLE can instead test
TARGET_RELOCATABLE || (DEFAULT_ABI == ABI_V4 && flag_pic > 1)
or since TARGET_RELOCATABLE can only be enabled when ABI_V4,
DEFAULT_ABI == ABI_V4 && (TARGET_RELOCATABLE || flag_pic > 1).
Also, since flag_pic is set by -mrelocatable, a number of places that
currently test TARGET_RELOCATABLE can be simplified. I also made
-mrelocatable set TARGET_NO_FP_IN_TOC, allowing TARGET_RELOCATABLE to
be removed from ASM_OUTPUT_SPECIAL_POOL_ENTRY_P. Reducing occurrences
of TARGET_RELOCATABLE is a good thing.
PR target/68662
* config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Don't
set OPTION_MASK_RELOCATABLE when flag_pic == 2. Set
TARGET_NO_FP_IN_TOC for -mrelocatable.
(MINIMAL_TOC_SECTION_ASM_OP): Remove redundant
TARGET_RELOCATABLE test.
(ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise.
(ASM_PREFERRED_EH_DATA_FORMAT): Likewise.
* config/rs6000/linux64.h (MINIMAL_TOC_SECTION_ASM_OP): Likewise.
(ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise.
(ASM_PREFERRED_EH_DATA_FORMAT): Likewise.
* config/rs6000/freebsd64.h (MINIMAL_TOC_SECTION_ASM_OP): Likewise.
(ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise.
(ASM_PREFERRED_EH_DATA_FORMAT): Likewise.
* config/rs6000/predicates.md (easy_fp_constant): Likewise.
* config/rs6000/rs6000.c (rs6000_elf_output_toc_section_asm_op):
Likewise.
(rs6000_assemble_integer): Update TARGET_RELOCATABLE test.
(rs6000_stack_info): Likewise.
(rs6000_elf_asm_out_constructor): Likewise.
(rs6000_elf_asm_out_destructor): Likewise.
(rs6000_elf_declare_function_name): Likewise.
* config/rs6000/rs6000.md (load_toc_aix_di): Likewise.
* config/rs6000/rs6000.h (MASK_RELOCATABLE, MASK_MINIMAL_TOC):
Don't define.
From-SVN: r235914
Modify SETs rather than using replace_rtx on the whole insn.
Removes fragile hacks preventing USE and CLOBBER being modified.
* config/rs6000/rs6000.c (rs6000_frame_related): Rewrite.
From-SVN: r235913
* config/rs6000/rs6000.c (rs6000_savres_strategy): Don't use
out-of-line gpr restore for one or two regs if that would add
a save of lr.
From-SVN: r235907
PR target/70873
* config/i386/i386.md
(TARGET_SSE_PARTIAL_REG_DEPENDENCY float_extend sf->df peephole2):
Change to post-epilogue_completed late splitter. Use sse_reg_operand
as operand 0 predicate.
(TARGET_SSE_PARTIAL_REG_DEPENDENCY float_truncate df->sf peephole2):
Ditto.
(TARGET_SSE_PARTIAL_REG_DEPENDENCY float {si,di}->{sf,df} peephole2):
Ditto. Emit the pattern using RTX.
(TARGET_USE_VECTOR_FP_CONVERTS float_extend sf->df splitter):
Use sse_reg_opreand as operand 0 predicate. Do not use true_regnum in
the post-reload splitter. Use lowpart_subreg instead of gen_rtx_REG.
(TARGET_USE_VECTOR_FP_CONVERTS float_truncate df->sf splitter):
Ditto.
(TARGET_USE_VECTOR_CONVERTS float si->{sf,df} splitter): Use
sse_reg_operand as operand 0 predicate.
(TARGET_SPLIT_MEM_OPND_FOR_FP_CONVERTS float_extend sf->df peephole2):
Use sse_reg_opreand as operand 0 predicate. Use lowpart_subreg
instead of gen_rtx_REG.
(TARGET_SPLIT_MEM_OPND_FOR_FP_CONVERTS float_truncate sf->df peephole2):
Ditto.
From-SVN: r235906
Now that cfgcleanup knows how to optimize with return statements, the
epilogue insertion code doesn't have to deal with it itself anymore.
* function.c (emit_use_return_register_into_block): Delete.
(gen_return_pattern): Delete.
(emit_return_into_block): Delete.
(active_insn_between): Delete.
(convert_jumps_to_returns): Delete.
(emit_return_for_exit): Delete.
(thread_prologue_and_epilogue_insns): Delete all code dealing with
simple_return for shrink-wrapped blocks.
* shrink-wrap.c (try_shrink_wrapping): Insert simple_return at the
end of blocks that need one.
(get_unconverted_simple_return): Delete.
(convert_to_simple_return): Delete.
* shrink-wrap.c (get_unconverted_simple_return): Delete declaration.
(convert_to_simple_return): Ditto.
From-SVN: r235905
This patch makes cfgcleanup optimize jumps to returns. There are three
cases this handles:
-- A jump to a return; this is simplified to just that return.
-- A conditional branch to a return; simplified to a conditional return.
-- A conditional branch that falls through to a return. This is simplified
to a conditional return (with the condition inverted), falling through
to a jump to the original destination. That jump can then be optimized
further, as usual.
This handles all cases the current function.c does, and a few it misses.
* cfgcleanup.c (bb_is_just_return): New function.
(try_optimize_cfg): Simplify jumps to return, branches to return,
and branches around return.
From-SVN: r235904
If the jump_block here contains just a return, we will crash later
in invert_jump. Don't allow that case.
* cfgcleanup.c (try_simplify_condjump): Don't try to simplify a
branch to a return.
From-SVN: r235903
PR c++/70906
PR c++/70933
* tree-core.h (enum operand_equal_flag): Add OEP_HASH_CHECK.
* tree.c (inchash::add_expr): If !IS_EXPR_CODE_CLASS (tclass),
assert flags & OEP_HASH_CHECK, instead of asserting it
never happens. Handle TARGET_EXPR.
* fold-const.c (operand_equal_p): For hash verification,
or in OEP_HASH_CHECK into flags.
* g++.dg/opt/pr70906.C: New test.
* g++.dg/opt/pr70933.C: New test.
From-SVN: r235902