graphite-sese-to-poly.c (parameter_index_in_region): Only handle INTEGER_TYPE parameters.
* graphite-sese-to-poly.c (parameter_index_in_region): Only handle
INTEGER_TYPE parameters.
(scan_tree_for_params): Handle REAL_CST, COMPLEX_CST, and
VECTOR_CST in scan_tree_for_params.
(add_conditions_to_domain): Only constrain on INTEGER_TYPE.
Co-Authored-By: Sebastian Pop <s.pop@samsung.com>
From-SVN: r225848
Paolo Bonzini [Wed, 15 Jul 2015 15:58:43 +0000 (15:58 +0000)]
Limit AA walking when inlining analysis examines parameters
2015-07-15 Paolo Bonzini <bonzini@gnu.org>
Martin Jambor <mjambor@suse.cz>
* ipa-inline-analysis.c (unmodified_parm_or_parm_agg_item): Accept
struct func_body_info* instead of struct ipa_node_params*, expecting
fbi->info to be filled in. Replace throughout. Adjust call to
ipa_load_from_parm_agg.
(set_cond_stmt_execution_predicate): Accept struct func_body_info*
instead of struct ipa_node_params*. Adjust calls to other functions
so that they pass either fbi or fbi->info.
(set_switch_stmt_execution_predicate): Likewise.
(will_be_nonconstant_predicate): Likewise.
(compute_bb_predicates): Likewise.
(estimate_function_body_sizes): Move asserts earlier. Fill in
struct func_body_info, replace parms_info with fbi.info. Adjust
calls to functions that now accept struct func_body_info.
* ipa-prop.c (param_aa_status, struct ipa_bb_info): Move to ipa-prop.h.
(struct func_body_info): Likewise.
(ipa_load_from_parm_agg_1): Rename to ipa_load_from_parm_agg,
remove static. Adjust callers.
(ipa_load_from_parm_agg): Remove.
* ipa-prop.h (param_aa_status, ipa_bb_info): Move from ipa-prop.c.
(func_body_info): Likewise.
(ipa_load_from_parm_agg): Adjust prototype.
Co-Authored-By: Martin Jambor <mjambor@suse.cz>
From-SVN: r225838
libgomp/
* testsuite/libgomp.fortran/examples-4/simd-8.f90: (main): Change type
of EPS parameter from integer to real.
* testsuite/libgomp.fortran/examples-4/task_dep-5.f90: (check): Change
type of EPS parameter from integer to real.
* fold-const.c (fold_binary_loc): Move bool_var != 0 -> bool_var
and bool_var == 1 -> bool_var simplifications ...
* match.pd: ... to patterns here. Factor out negate_expr_p
cases from the A - B -> A + (-B) patterns as negate_expr_p
predicate and add a -(A + B) -> (-B) - A pattern.
Matthew Fortune [Wed, 15 Jul 2015 11:42:50 +0000 (11:42 +0000)]
Support new interrupt handler options.
gcc/
* config/mips/mips.c (mips_int_mask): New enum.
(mips_shadow_set): Likewise.
(int_mask): New variable.
(use_shadow_register_set_p): Change type to enum mips_shadow_set.
(machine_function): Add int_mask and use_shadow_register_set.
(mips_attribute_table): Add attribute handlers for interrupt and
use_shadow_register_set.
(mips_interrupt_mask): New static function.
(mips_handle_interrupt_attr): Likewise.
(mips_handle_use_shadow_register_set_attr): Likewise.
(mips_use_shadow_register_set): Change return type to enum
mips_shadow_set. Add argument handling for use_shadow_register_set
attribute.
(mips_interrupt_extra_called_saved_reg_p): Update the conditional to
compare with mips_shadow_set enum.
(mips_compute_frame_info): Add interrupt mask and
use_shadow_register_set to per-function information structure.
Add a stack slot for EPC unconditionally.
(mips_expand_prologue): Compare use_shadow_register_set value
with mips_shadow_set enum. Save EPC always in K1, clobber only K1 for
masked interrupt register but in EIC mode use K0 and save Cause in K0.
EPC saved and restored unconditionally. Use PMODE_INSN macro when
copying the stack pointer from the shadow register set.
* config/mips/mips.h (SR_IM0): New define.
* config/mips/mips.md (mips_rdpgpr): Rename to...
(mips_rdpgpr_<mode>): ...this. Use the Pmode iterator.
* doc/extend.texi (Declaring Attributes of Functions): Document
optional arguments for interrupt and use_shadow_register_set
attributes.
gcc/testsuite/
* gcc.target/mips/interrupt_handler-4.c: New test.
Co-Authored-By: Robert Suchanek <robert.suchanek@imgtec.com>
From-SVN: r225819
Robert Suchanek [Wed, 15 Jul 2015 11:42:34 +0000 (11:42 +0000)]
Support interrupt handlers with hard-float.
gcc/
* config/mips/mips.c (mips_compute_frame_info): Allow -mhard-float in
interrupt attribute.
(mips_expand_prologue): Disable the floating point unit in an ISR.
* config/mips/mips.h (SR_COP1): New define.
Andrew Bennett [Wed, 15 Jul 2015 09:22:25 +0000 (09:22 +0000)]
MIPS: In mips.exp allow the post-arch code to be run when the pre-arch code increases the isa_rev to mips32r6 or greater.
testsuite/
* gcc.target/mips/mips.exp (mips-dg-options): Allow the post-arch
code to be run when the pre-arch code increases the isa_rev to
mips32r6 or greater.
Sebastian Huber [Wed, 15 Jul 2015 09:11:11 +0000 (09:11 +0000)]
[gomp] Recycle last non-nested team if possible
libgomp/ChangeLog
2015-07-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
* team.c (get_last_team): New.
(gomp_new_team): Recycle last non-nested team if possible.
(gomp_team_end): Move team work share list free lock destruction
to ...
(free_team): ... here.
Richard Biener [Wed, 15 Jul 2015 08:35:15 +0000 (08:35 +0000)]
genmatch.c (parser::peek, [...]): Add argument to tell how many tokens to peek ahead (default 1).
2015-07-15 Richard Biener <rguenther@suse.de>
* genmatch.c (parser::peek, parser::peek_ident): Add argument
to tell how many tokens to peek ahead (default 1).
(parser::eat_token, parser::eat_ident): Return token consumed.
(parser::parse_result): Parse new switch statement.
* match.pd: Use case statements where appropriate.
re PR rtl-optimization/66838 (Calling multiple SYSV AMD64 ABI functions from MS x64 ABI one results in clobbered parameters)
PR rtl-optimization/66838
* postreload.c (reload_cse_move2add): Also process
CALL_INSN_FUNCTION_USAGE when resetting information of
call-clobbered registers.
testsuite/ChangeLog:
PR rtl-optimization/66838
* gcc.target/i386/pr66838.c: New test.
Patrick Palka [Wed, 15 Jul 2015 00:01:21 +0000 (00:01 +0000)]
re PR c++/66850 (Adding a forward declaration of a template containing a template template parm causes ICE on valid code)
Fix PR c++/66850
gcc/cp/ChangeLog:
PR c++/66850
* pt.c (redeclare_class_template): Set the DECL_CONTEXTs of each
template template parm in the redeclaration.
(lookup_template_class_1): Peel off irrelevant template levels
from current_template_parms before augmenting the argument
list.
gcc/testsuite/ChangeLog:
PR c++/66850
* g++.dg/template/pr66850.C: New test.
2015-07-14 Sandra Loosemore <sandra@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
Chung-Lin Tang <cltang@codesourcery.com>
gcc/
* config/nios2/constraints.md (U, v): New constraints.
* config/nios2/predicates.md (rdprs_dcache_operand): New.
(ldstex_memory_operand): New.
* config/nios2/sync.md: New file.
* config/nios2/nios2.md (unspecv): Add new builtin function
UNSPECV codes.
(rdprs, flushd, flushda, wrpie, eni): New patterns.
(top-level): Include sync.md.
* config/nios2/nios2.c (N2_FTYPES): Add function types for
new builtins.
(N2_BUILTINS): Add arch field setting, add new builtins.
(enum nios2_builtin_code,nios2_builtins): Update N2_BUILTIN_DEF
for arch field.
(nios2_expand_ldst_builtin): Rename from nios2_expand_ldstio_builtin.
Also handle ldex/stex/ldsex/stsex builtins.
(nios2_expand_rdprs_builtin): New function.
(nios2_expand_cache_builtin): New function.
(nios2_expand_wrpie_builtin): New function.
(nios2_expand_eni_builtin): New function.
(nios2_expand_builtin): Add arch field handling and new builtin
cases.
* doc/extend.texi (Altera Nios II Built-in Functions): Document
new builtins.
* doc/md.texi (Machine Constraints): Document U and v constraints.
2015-07-14 Sandra Loosemore <sandra@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
Chung-Lin Tang <cltang@codesourcery.com>
gcc/
* config/nios2/nios2-protos.h (nios2_expand_return): Declare.
* config/nios2/nios2.c (struct GTY (()) machine_function): Add
callee_save_reg_size and uses_anonymous_args fields.
(nios2_compute_frame_layout): Update for CDX push.n/pop.n usage.
(nios2_create_cfa_notes): New function.
(nios2_adjust_stack): New function for adjusting stack.
(nios2_expand_prologue): Update for CDX push.n/pop.n usage.
Use nios2_adjust_stack.
(nios2_expand_epilogue): Likewise.
(nios2_expand_return): New function.
(nios2_can_use_return_insn): Update for CDX pop.n usage.
(nios2_setup_incoming_varargs): Set uses_anonymous_args flag.
If TARGET_HAS_CDX, defer pushing regs to nios2_expand_prologue.
* config/nios2/nios2.md (return): Use nios2_expand_return.
Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com> Co-Authored-By: Chung-Lin Tang <cltang@codesourcery.com>
From-SVN: r225799
gcc/
* config/nios2/nios2.c (TEMP_REG_NUM): Move define up in file.
(nios2_emit_stack_limit_check): Add size parameter. Handle
-fstack-limit-symbol as well as -fstack-limit-register.
(nios2_expand_prologue): Emit only a single stack limit check,
even if multiple stack adjustments are required.
(nios2_option_override): Diagnose unsupported combination of -fpic
and -stack-limit-symbol.
gcc/testsuite/
* gcc.target/nios2/nios2-stack-check-1.c: Adjust patterns.
* gcc.target/nios2/nios2-stack-check-2.c: Likewise.
* gcc.target/nios2/nios2-stack-check-3.c: New test case.
libgomp/
* testsuite/libgomp.c/examples-4/simd-3.c: (main): Change type of res
and ref from int to double. Replaced their comparison with
an inequality of their difference and EPS.
* testsuite/libgomp.c/examples-4/simd-8.c: (main): Replace the
comparison of pri and a reference number with an inequality of their
difference and EPS.
* testsuite/libgomp.fortran/examples-4/simd-3.f90: (main): Replaced
the comparison of sum and sum_ref with an inequality of their
difference and EPS.
* testsuite/libgomp.fortran/examples-4/simd-8.f90: (main): Replace
the comparison of pri and a reference number with an inequality of
their difference and EPS.
H.J. Lu [Tue, 14 Jul 2015 15:03:11 +0000 (15:03 +0000)]
Sync toplevel files binutils-gdb
Sync with binutils-gdb:
2015-05-01 H.J. Lu <hongjiu.lu@intel.com>
PR ld/18355
* Makefile.def: Add extra_configure_flags to host zlib.
* configure.ac (extra_host_zlib_configure_flags): New. Set
to --enable-host-shared When bfd is to be built as shared
library. AC_SUBST.
* Makefile.in: Regenerated.
Tom de Vries [Tue, 14 Jul 2015 08:25:57 +0000 (08:25 +0000)]
Ignore -ftree-parallelize-loops={0,1} using gt
2015-07-14 Tom de Vries <tom@codesourcery.com>
* gcc.c (greater_than_spec_func): Declare forward.
(LINK_COMMAND_SPEC, GOMP_SELF_SPECS): Use gt to ignore
-ftree-parallelize-loops={0,1}.
(static_spec_functions): Add greater_than_spec_func function with name
"gt".
(greater_than_spec_func): New function.
Richard Biener [Tue, 14 Jul 2015 07:27:04 +0000 (07:27 +0000)]
tree-ssa-dom.c (record_temporary_equivalences): Merge wideing type conversion case from record_equivalences_from_incoming_edge...
2015-07-14 Richard Biener <rguenther@suse.de>
* tree-ssa-dom.c (record_temporary_equivalences): Merge
wideing type conversion case from record_equivalences_from_incoming_edge
and use record_equality to record equivalences.
(record_equivalences_from_incoming_edge): Call
record_temporary_equivalences.
Richard Biener [Tue, 14 Jul 2015 07:25:55 +0000 (07:25 +0000)]
genmatch.c (struct operand): Add OP_IF and OP_WITH op_types.
2015-07-14 Richard Biener <rguenther@suse.de>
* genmatch.c (struct operand): Add OP_IF and OP_WITH op_types.
(struct if_expr): New.
(struct with_expr): Likewise.
(is_a_helper): Add helpers for if_expr and with_expr.
(struct simplify): Add simplify_kind enum and member. Remove
ifexpr_vec member.
(simplify::simplify): Adjust.
(lower_commutative): Adjust.
(lower_opt_convert): Likewise.
(lower_cond): Likewise.
(replace_id): Handle with_expr and if_expr.
(lower_for): Adjust.
(dt_simplify::gen_1): New recursive worker, split out from ...
(dt_simplify::gen): ... here. Deal with if and with expansion
recursively.
(capture_info::capture_info): Take context argument
(capture_info::walk_result): Only analyze specific result.
(parser::parse_result): New function.
(parser::parse_simplify): Adjust to parse ifs with then end
else case.
(parser::parse_if): Simplify.
(parser::parse_pattern): Pass down simplify kind.
* match.pd: Convert if structure to new syntax.
Ian Lance Taylor [Tue, 14 Jul 2015 01:22:25 +0000 (01:22 +0000)]
compiler,runtime: Determine if allocations need new pointers in runtime.
As the removed comment states, if the package being compiled played
certain tricks with pointers that looked like integers, the compiler
might allocate space for new pointers unnecessarily. Since the type
information on the heap is now precise, this logic can be moved to the
runtime.
Ian Lance Taylor [Tue, 14 Jul 2015 00:52:25 +0000 (00:52 +0000)]
compiler: Improve location info for function parameters.
Previously, errors reported for function parameters would point to the
beginning of the function declaration instead of to the column for the
given parameter.
Ian Lance Taylor [Tue, 14 Jul 2015 00:02:19 +0000 (00:02 +0000)]
escape: Analyze multiple result type assertions.
For multi-result type assertions, the object being converted is hidden
behind unsafe conversions and calls to runtime methods. This change
allows the analysis to make edges between the result of the assertion
and the object being asserted.
Ian Lance Taylor [Mon, 13 Jul 2015 18:55:15 +0000 (18:55 +0000)]
syscall: remove calls to Entersyscall & Exitsyscall in Getdents
The syscall for Getdents in syscall/libcall_linux.go
called Entersyscall and Exitsyscall, causing the
runtime_sched counts for goroutines to be incorrect.
Inconsistent counts caused checkdead in runtime/proc.c
to panic.
Andrew MacLeod [Mon, 13 Jul 2015 15:41:54 +0000 (15:41 +0000)]
omega.h: Don't include config.h...
* omega.h: Don't include config.h, don't include params.h again if
omega.h has already been included.
* graphite-poly.h: Include sese.h.
* graphite.c: Don't include sese.h, remove needless includes and
minimize includes outside #ifdef HAVE_isl block.
* graphite-blocking.c: Don't include sese.h, remove needless includes,
and wrap entire file in #ifdef HAVE_isl
* graphite-dependences.c: Likewise.
* graphite-interchange.c: Likewise.
* graphite-isl-ast-to-gimple.c: Likewise.
* graphite-optimize-isl.c: Likewise.
* graphite-poly.c: Likewise.
* graphite-scop-detection.c: Likewise.
* graphite-sese-to-poly.c: Likewise.
Fix several crashes of C++ demangler on fuzzed input.
libiberty/
* cp-demangle.c (d_dump): Fix syntax error.
(d_identifier): Adjust type of len to match d_source_name.
(d_expression_1): Fix out-of-bounds access. Check code variable for
NULL before dereferencing it.
(d_find_pack): Do not recurse for FIXED_TYPE, DEFAULT_ARG and NUMBER.
(d_print_comp_inner): Add NULL pointer check.
* cp-demangle.h (d_peek_next_char): Define as inline function when
CHECK_DEMANGLER is defined.
(d_advance): Likewise.
* testsuite/demangle-expected: Add new testcases.
Patrick Palka [Fri, 10 Jul 2015 23:21:39 +0000 (23:21 +0000)]
re PR c++/30044 (ICE in tsubst, at cp/pt.c:7359)
Fix PR c++/30044
gcc/cp/ChangeLog:
PR c++/30044
* pt.c (begin_template_parm_list): Add a dummy parameter level
to current_template_parms.
(end_template_parm_list): Remove the dummy parameter level
before adding the real one.
(tsubst): Don't attempt to substitute for template parameters
corresponding to a dummy argument level.
(template_parms_to_args): Remove obsolete hack for
giving template template arguments the proper level.
(splite_late_return_type): Remove obsolete hack for giving
template template arguments the proper level.
* error.c (dump_template_decl): Don't print dummy template
levels.
gcc/testsuite/ChangeLog
PR c++/30044
* g++.dg/cpp0x/auto46.C: New test.
* g++.dg/template/pr30044.C: New test.
* g++.dg/template/shadow2.C: New test.
* g++.dg/template/error55.C: New test.
* g++.dg/template/crash83.C: Accept any error string.
* g++.dg/cpp0x/variadic18.C: Adjust to avoid shadowing template
parameters.
* g++.dg/cpp0x/variadic18.C: Likewise
* g++.dg/template/canon-type-13.C: Likewise.
* g++.old-deja/g++.pt/ttp42.C: Likewise.
* g++.dg/torture/20070621-1.C: Likewise.
H.J. Lu [Fri, 10 Jul 2015 20:30:10 +0000 (20:30 +0000)]
Allow indirect sibcall with register arguments
Indirect sibcall with register arguments is OK when there is register
available for argument passing.
gcc/
PR target/66819
* config/i386/i386.c (ix86_function_ok_for_sibcall): Allow
indirect sibcall with register arguments if register available
for argument passing.
(init_cumulative_args): Set cfun->machine->arg_reg_available
to (cum->nregs > 0) or to true if function has a variable
argument list.
(function_arg_advance_32): Set cfun->machine->arg_reg_available
to false if cum->nregs <= 0.
* config/i386/i386.h (machine_function): Add arg_reg_available.
sse.md (movdi_to_sse): Use gen_lowpart and gen_higpart instead of gen_rtx_SUBREG.
* config/i386/sse.md (movdi_to_sse): Use gen_lowpart
and gen_higpart instead of gen_rtx_SUBREG.
* config/i386/i386.md
(floatdi<X87MODEF:mode>2_i387_with_xmm splitter): Ditto.
(read-modify peephole2): Use gen_lowpart instead of
gen_rtx_SUBREG for operand 5.
re PR target/66703 ([4.9/5/6] gcc.target/i386/readeflags-1.c aborts on -march=i586 or on -miamcu)
PR target/66703
* gcc.target/i386/readeflags-1.c (readeflags_test): Declare with
__attribute__((noinline, noclone)). Change "x" to "volatile char"
type to prevent possible flag-clobbering zero-extensions.