Remove Cilk Plus support.

* Makefile.def (target_modules): Remove libcilkrts.
	* Makefile.in: Ditto.
	* configure: Ditto.
	* configure.ac: Ditto.

contrib/
	* contrib/gcc_update: Ditto.

gcc/
	* Makefile.in (cilkplus.def, cilk-builtins.def, c-family/cilk.o, 
	c-family/c-cilkplus.o, c-family/array-notation-common.o,
	cilk-common.o, cilk.h, cilk-common.c): Remove.
	* builtin-types.def
	(BT_FN_INT_PTR_PTR_PTR_FTYPE_BT_INT_BT_PTR_BT_PTR_BT_PTR): Remove.
	* builtins.c (is_builtin_name): Remove cilkplus condition.
	(BUILT_IN_CILK_DETACH, BUILT_IN_CILK_POP_FRAME): Remove.
	* builtins.def (DEF_CILK_BUILTIN_STUB, DEF_CILKPLUS_BUILTIN,
	cilk-builtins.def, cilkplus.def): Remove.
	* cif-code.def (CILK_SPAWN): Remove.
	* cilk-builtins.def: Delete.
	* cilk-common.c: Ditto.
	* cilk.h: Ditto.
	* cilkplus.def: Ditto.
	* config/darwin.h (fcilkplus): Delete.
	* cppbuiltin.c: Ditto.
	* doc/extend.texi: Remove cilkplus doc.
	* doc/generic.texi: Ditto.
	* doc/invoke.texi: Ditto.
	* doc/passes.texi: Ditto.
	* gcc.c (fcilkplus): Remove.
	* gengtype.c (cilk.h): Remove.
	* gimple-pretty-print.c (dump_gimple_omp_for): Remove cilkplus support.
	* gimple.h (GF_OMP_FOR_KIND_CILKFOR, GF_OMP_FOR_KIND_CILKSIMD): Remove.
	* gimplify.c (gimplify_return_expr, maybe_fold_stmt,
	gimplify_call_expr, is_gimple_stmt, gimplify_modify_expr,
	gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses,
	gimplify_omp_for, gimplify_expr): Remove cilkplus conditions.
	* ipa-fnsummary.c (ipa_dump_fn_summary, compute_fn_summary,
	inline_read_section): Ditto.
	* ipa-inline-analysis.c (cilk.h): Remove.
	* ira.c (ira_setup_eliminable_regset): Remove cilkplus support.
	* lto-wrapper.c (merge_and_complain, append_compiler_options,
	append_linker_options): Remove condition for fcilkplus.
	* lto/lto-lang.c (cilk.h): Remove.
	(lto_init): Remove condition for fcilkplus.
	* omp-expand.c (expand_cilk_for_call): Delete.
	(expand_omp_taskreg, expand_omp_for_static_chunk,
	expand_omp_for): Remove cilkplus
	conditions.
	(expand_cilk_for): Delete.
	* omp-general.c (omp_extract_for_data): Remove cilkplus support.
	* omp-low.c (scan_sharing_clauses, create_omp_child_function,
	execute_lower_omp, diagnose_sb_0): Ditto.
	* omp-simd-clone.c (simd_clone_clauses_extract): Ditto.
	* tree-core.h (OMP_CLAUSE__CILK_FOR_COUNT_): Delete.
	* tree-nested.c: Ditto.
	* tree-pretty-print.c (dump_omp_clause): Remove cilkplus support.
	(dump_generic_node): Ditto.
	* tree.c (OMP_CLAUSE__CILK_FOR_COUNT_): Delete.
	* tree.def (cilk_simd, cilk_for, cilk_spawn_stmt,
	cilk_sync_stmt): Delete.
	* tree.h (CILK_SPAWN_FN, EXPR_CILK_SPAWN): Delete.

gcc/c-family/
	* array-notation-common.c: Delete.
	* c-cilkplus.c: Ditto.
	* c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
	* c-common.def (ARRAY_NOTATION_REF): Remove.
	* c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
	build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
	c_validate_cilk_plus_loop, cilkplus_an_parts,
	cilk_ignorable_spawn_rhs_op,
	cilk_recognize_spawn): Remove.
	* c-gimplify.c (CILK_SPAWN_STMT): Remove.
	* c-omp.c: Remove CILK_SIMD check.
	* c-pragma.c: Ditto.
	* c-pragma.h: Remove CILK related pragmas.
	* c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
	ARRAY_NOTATION_REF condition.
	(c_pretty_printer::expression): Ditto.
	* c.opt (fcilkplus): Remove.
	* cilk.c: Delete.

gcc/c/
	* Make-lang.in (c/c-array-notation.o): Remove.
	* c-array-notation.c: Delete.
	* c-decl.c: Remove cilkplus condition.
	* c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
	c_parser_cilk_verify_simd, c_parser_array_notation,
	c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
	c_parser_cilk_simd_fn_vector_attrs,
	c_finish_cilk_simd_fn_tokens): Delete.
	(c_parser_declaration_or_fndef): Remove cilkplus condition.
	(c_parser_direct_declarator_inner): Ditto.
	(CILK_SIMD_FN_CLAUSE_MASK): Delete.
	(c_parser_attributes, c_parser_compound_statement,
	c_parser_statement_after_labels, c_parser_if_statement,
	c_parser_switch_statement, c_parser_while_statement,
	c_parser_do_statement, c_parser_for_statement,
	c_parser_unary_expression, c_parser_postfix_expression,
	c_parser_postfix_expression_after_primary,
	c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
	c_parser_omp_for_loop,
	c_finish_omp_declare_simd): Remove cilkplus support.
	* c-typeck.c (build_array_ref, build_function_call_vec,
	convert_arguments, lvalue_p, build_compound_expr, c_finish_return,
	c_finish_if_stmt, c_finish_loop,
	build_binary_op): Remove cilkplus support.
	
gcc/cp/
	* Make-lang.in (cp/cp-array-notation.o, cp/cp-cilkplus.o): Delete.
	* call.c (convert_for_arg_passing, build_cxx_call): Remove cilkplus.
	* constexpr.c (potential_constant_expression_1): Ditto.
	* cp-array-notation.c: Delete.
	* cp-cilkplus.c: Ditto.
	* cp-cilkplus.h: Ditto.
	* cp-gimplify.c (cp_gimplify_expr, cp_fold_r, cp_genericize): Remove
	cilkplus condition.
	* cp-objcp-common.c (ARRAY_NOTATION_REF): Delete.
	* cp-tree.h (cilkplus_an_triplet_types_ok_p): Delete.
	* decl.c (grokfndecl, finish_function): Remove cilkplus condition.
	* error.c (dump_decl, dump_expr): Remove ARRAY_NOTATION_REF condition.
	* lambda.c (cp-cilkplus.h): Remove.
	* parser.c (cp_parser_cilk_simd, cp_parser_cilk_for,
	cp_parser_cilk_simd_vectorlength): Delete.
	(cp_debug_parser, cp_parser_ctor_initializer_opt_and_function_body,
	cp_parser_postfix_expression, cp_parser_postfix_open_square_expression,
	cp_parser_statement, cp_parser_jump_statement,
	cp_parser_direct_declarator,
	cp_parser_late_return_type_opt, cp_parser_gnu_attribute_list,
	cp_parser_omp_clause_name, cp_parser_omp_clause_aligned,
	cp_parser_omp_clause_linear, cp_parser_omp_all_clauses,
	cp_parser_omp_flush, cp_parser_omp_for_cond, cp_parser_omp_for_incr,
	cp_parser_omp_for_loop_init, cp_parser_omp_for_loop,
	cp_parser_omp_declare_simd): Remove cilkplus support.
	(CILK_SIMD_FN_CLAUSE_MASK, cp_parser_late_parsing_cilk_simd_fn_info,
	cp_parser_cilk_grainsize): Remove.
	(cp_parser_pragma, c_parse_file): Remove cilkplus support.
	(cp_parser_cilk_simd_vectorlength, cp_parser_cilk_simd_linear,
	cp_parser_cilk_simd_clause_name, cp_parser_cilk_simd_all_clauses,
	cp_parser_cilk_simd, cp_parser_cilk_for): Remove.
	* parser.h (IN_CILK_SIMD_FOR, IN_CILK_SPAWN): Remove.
	* pt.c (tsubst_attribute, tsubst_expr, tsubst_copy_and_build): Remove
	cilkplus support.
	* semantics.c (finish_goto_stmt, begin_while_stmt, finish_do_body,
	finish_init_stmt, finish_switch_cond, simplify_aggr_init_expr,
	finish_omp_clauses, finish_omp_clauses,
	finish_omp_for): Remove cilkplus support.
	* tree.c (lvalue_kind): Remove ARRAY_NOTATION_REF conditon.
	* typeck.c (cp_build_array_ref, cp_build_compound_expr,
	check_return_expr): Remove cilkplus support.

gcc/testsuite/
	* c-c++-common/attr-simd-3.c: Delete.
	* c-c++-common/cilk-plus/AN/an-if.c: Delete.
	* c-c++-common/cilk-plus/AN/array_test1.c: Delete.
	* c-c++-common/cilk-plus/AN/array_test2.c: Delete.
	* c-c++-common/cilk-plus/AN/array_test_ND.c: Delete.
	* c-c++-common/cilk-plus/AN/builtin_fn_custom.c: Delete.
	* c-c++-common/cilk-plus/AN/builtin_fn_mutating.c: Delete.
	* c-c++-common/cilk-plus/AN/builtin_func_double.c: Delete.
	* c-c++-common/cilk-plus/AN/builtin_func_double2.c: Delete.
	* c-c++-common/cilk-plus/AN/comma_exp.c: Delete.
	* c-c++-common/cilk-plus/AN/conditional.c: Delete.
	* c-c++-common/cilk-plus/AN/decl-ptr-colon.c: Delete.
	* c-c++-common/cilk-plus/AN/dimensionless-arrays.c: Delete.
	* c-c++-common/cilk-plus/AN/exec-once.c: Delete.
	* c-c++-common/cilk-plus/AN/exec-once2.c: Delete.
	* c-c++-common/cilk-plus/AN/fn_ptr-2.c: Delete.
	* c-c++-common/cilk-plus/AN/fn_ptr.c: Delete.
	* c-c++-common/cilk-plus/AN/fp_triplet_values.c: Delete.
	* c-c++-common/cilk-plus/AN/gather-scatter-errors.c: Delete.
	* c-c++-common/cilk-plus/AN/gather_scatter.c: Delete.
	* c-c++-common/cilk-plus/AN/if_test.c: Delete.
	* c-c++-common/cilk-plus/AN/if_test_errors.c: Delete.
	* c-c++-common/cilk-plus/AN/misc.c: Delete.
	* c-c++-common/cilk-plus/AN/n-ptr-test.c: Delete.
	* c-c++-common/cilk-plus/AN/parser_errors.c: Delete.
	* c-c++-common/cilk-plus/AN/parser_errors2.c: Delete.
	* c-c++-common/cilk-plus/AN/parser_errors3.c: Delete.
	* c-c++-common/cilk-plus/AN/parser_errors4.c: Delete.
	* c-c++-common/cilk-plus/AN/pr57457-2.c: Delete.
	* c-c++-common/cilk-plus/AN/pr57457.c: Delete.
	* c-c++-common/cilk-plus/AN/pr57490.c: Delete.
	* c-c++-common/cilk-plus/AN/pr57541-2.c: Delete.
	* c-c++-common/cilk-plus/AN/pr57541.c: Delete.
	* c-c++-common/cilk-plus/AN/pr57577.c: Delete.
	* c-c++-common/cilk-plus/AN/pr58942.c: Delete.
	* c-c++-common/cilk-plus/AN/pr61191.c: Delete.
	* c-c++-common/cilk-plus/AN/pr61455-2.c: Delete.
	* c-c++-common/cilk-plus/AN/pr61455.c: Delete.
	* c-c++-common/cilk-plus/AN/pr61962.c: Delete.
	* c-c++-common/cilk-plus/AN/pr61963.c: Delete.
	* c-c++-common/cilk-plus/AN/pr62008.c: Delete.
	* c-c++-common/cilk-plus/AN/pr63884.c: Delete.
	* c-c++-common/cilk-plus/AN/rank_mismatch.c: Delete.
	* c-c++-common/cilk-plus/AN/rank_mismatch2.c: Delete.
	* c-c++-common/cilk-plus/AN/rank_mismatch3.c: Delete.
	* c-c++-common/cilk-plus/AN/sec_implicit.c: Delete.
	* c-c++-common/cilk-plus/AN/sec_implicit2.c: Delete.
	* c-c++-common/cilk-plus/AN/sec_implicit_ex.c: Delete.
	* c-c++-common/cilk-plus/AN/sec_reduce_ind_same_value.c: Delete.
	* c-c++-common/cilk-plus/AN/sec_reduce_max_min_ind.c: Delete.
	* c-c++-common/cilk-plus/AN/sec_reduce_return.c: Delete.
	* c-c++-common/cilk-plus/AN/side-effects-1.c: Delete.
	* c-c++-common/cilk-plus/AN/test_builtin_return.c: Delete.
	* c-c++-common/cilk-plus/AN/test_sec_limits.c: Delete.
	* c-c++-common/cilk-plus/AN/tst_lngth.c: Delete.
	* c-c++-common/cilk-plus/AN/vla.c: Delete.
	* c-c++-common/cilk-plus/CK/Wparentheses-1.c: Delete.
	* c-c++-common/cilk-plus/CK/cilk-for-2.c: Delete.
	* c-c++-common/cilk-plus/CK/cilk-for-3.c: Delete.
	* c-c++-common/cilk-plus/CK/cilk-fors.c: Delete.
	* c-c++-common/cilk-plus/CK/cilk_for_errors.c: Delete.
	* c-c++-common/cilk-plus/CK/cilk_for_grain.c: Delete.
	* c-c++-common/cilk-plus/CK/cilk_for_grain_errors.c: Delete.
	* c-c++-common/cilk-plus/CK/cilk_for_ptr_iter.c: Delete.
	* c-c++-common/cilk-plus/CK/compound_cilk_spawn.c: Delete.
	* c-c++-common/cilk-plus/CK/concec_cilk_spawn.c: Delete.
	* c-c++-common/cilk-plus/CK/errors.c: Delete.
	* c-c++-common/cilk-plus/CK/fib.c: Delete.
	* c-c++-common/cilk-plus/CK/fib_init_expr_xy.c: Delete.
	* c-c++-common/cilk-plus/CK/fib_no_return.c: Delete.
	* c-c++-common/cilk-plus/CK/fib_no_sync.c: Delete.
	* c-c++-common/cilk-plus/CK/invalid_spawns.c: Delete.
	* c-c++-common/cilk-plus/CK/invalid_sync.c: Delete.c
	* c-c++-common/cilk-plus/CK/nested_cilk_for.c: Delete.
	* c-c++-common/cilk-plus/CK/no_args_error.c: Delete.
	* c-c++-common/cilk-plus/CK/pr59631.c: Delete.
	* c-c++-common/cilk-plus/CK/pr60197-2.c: Delete.
	* c-c++-common/cilk-plus/CK/pr60197.c: Delete.
	* c-c++-common/cilk-plus/CK/pr60469.c: Delete.
	* c-c++-common/cilk-plus/CK/pr60586.c: Delete.
	* c-c++-common/cilk-plus/CK/pr63307.c: Delete.
	* c-c++-common/cilk-plus/CK/pr69826-1.c: Delete.
	* c-c++-common/cilk-plus/CK/pr69826-2.c: Delete.
	* c-c++-common/cilk-plus/CK/pr79428-4.c: Delete.
	* c-c++-common/cilk-plus/CK/pr79428-7.c: Delete.
	* c-c++-common/cilk-plus/CK/spawn_in_return.c: Delete.
	* c-c++-common/cilk-plus/CK/spawnee_inline.c: Delete.
	* c-c++-common/cilk-plus/CK/spawner_inline.c: Delete.
	* c-c++-common/cilk-plus/CK/spawning_arg.c: Delete.
	* c-c++-common/cilk-plus/CK/steal_check.c: Delete.
	* c-c++-common/cilk-plus/CK/sync_wo_spawn.c: Delete.
	* c-c++-common/cilk-plus/CK/test__cilk.c: Delete.
	* c-c++-common/cilk-plus/CK/varargs_test.c: Delete.
	* c-c++-common/cilk-plus/PS/Wparentheses-1.c: Delete.
	* c-c++-common/cilk-plus/PS/body.c: Delete.
	* c-c++-common/cilk-plus/PS/clauses1.c: Delete.
	* c-c++-common/cilk-plus/PS/clauses2.c: Delete.
	* c-c++-common/cilk-plus/PS/clauses3.c: Delete.
	* c-c++-common/cilk-plus/PS/clauses4.c: Delete.
	* c-c++-common/cilk-plus/PS/for1.c: Delete.
	* c-c++-common/cilk-plus/PS/for2.c: Delete.
	* c-c++-common/cilk-plus/PS/for3.c: Delete.
	* c-c++-common/cilk-plus/PS/pr69363.c: Delete.
	* c-c++-common/cilk-plus/PS/reduction-1.c: Delete.
	* c-c++-common/cilk-plus/PS/reduction-2.c: Delete.
	* c-c++-common/cilk-plus/PS/reduction-3.c: Delete.
	* c-c++-common/cilk-plus/PS/run-1.c: Delete.
	* c-c++-common/cilk-plus/PS/safelen.c: Delete.
	* c-c++-common/cilk-plus/PS/vectorlength-2.c: Delete.
	* c-c++-common/cilk-plus/PS/vectorlength-3.c: Delete.
	* c-c++-common/cilk-plus/PS/vectorlength.c: Delete.
	* c-c++-common/cilk-plus/SE/ef_error.c: Delete.
	* c-c++-common/cilk-plus/SE/ef_error2.c: Delete.
	* c-c++-common/cilk-plus/SE/ef_error3.c: Delete.
	* c-c++-common/cilk-plus/SE/ef_test.c: Delete.
	* c-c++-common/cilk-plus/SE/ef_test2.c: Delete.
	* c-c++-common/cilk-plus/SE/vlength_errors.c: Delete.
	* g++.dg/cilk-plus/AN/array_function.c: Delete.
	* g++.dg/cilk-plus/AN/array_test1_tplt.c: Delete.
	* g++.dg/cilk-plus/AN/array_test2_tplt.c: Delete.
	* g++.dg/cilk-plus/AN/array_test_ND_tplt.c: Delete.
	* g++.dg/cilk-plus/AN/braced_list.c: Delete.
	* g++.dg/cilk-plus/AN/builtin_fn_custom_tplt.c: Delete.
	* g++.dg/cilk-plus/AN/builtin_fn_mutating_tplt.c: Delete.
	* g++.dg/cilk-plus/AN/fp_triplet_values_tplt.c: Delete.
	* g++.dg/cilk-plus/AN/postincr_test.c: Delete.
	* g++.dg/cilk-plus/AN/preincr_test.c: Delete.
	* g++.dg/cilk-plus/CK/catch_exc.c: Delete.
	* g++.dg/cilk-plus/CK/cf3.c: Delete.
	* g++.dg/cilk-plus/CK/cilk-for-tplt.c: Delete.
	* g++.dg/cilk-plus/CK/const_spawn.c: Delete.
	* g++.dg/cilk-plus/CK/fib-opr-overload.c: Delete.
	* g++.dg/cilk-plus/CK/fib-tplt.c: Delete.
	* g++.dg/cilk-plus/CK/for1.c: Delete.
	* g++.dg/cilk-plus/CK/lambda_spawns.c: Delete.
	* g++.dg/cilk-plus/CK/lambda_spawns_tplt.c: Delete.
	* g++.dg/cilk-plus/CK/pr60586.c: Delete.
	* g++.dg/cilk-plus/CK/pr66326.c: Delete.
	* g++.dg/cilk-plus/CK/pr68001.c: Delete.
	* g++.dg/cilk-plus/CK/pr68997.c: Delete.
	* g++.dg/cilk-plus/CK/pr69024.c: Delete.
	* g++.dg/cilk-plus/CK/pr69048.c: Delete.
	* g++.dg/cilk-plus/CK/pr69267.c: Delete.
	* g++.dg/cilk-plus/CK/pr80038.c: Delete.
	* g++.dg/cilk-plus/CK/stl_iter.c: Delete.
	* g++.dg/cilk-plus/CK/stl_rev_iter.c: Delete.
	* g++.dg/cilk-plus/CK/stl_test.c: Delete.
	* g++.dg/cilk-plus/cilk-plus.exp
	* g++.dg/cilk-plus/ef_test.C: Delete.
	* g++.dg/cilk-plus/for.C: Delete.
	* g++.dg/cilk-plus/for2.C: Delete.
	* g++.dg/cilk-plus/for3.C: Delete.
	* g++.dg/cilk-plus/for4.C: Delete.
	* g++.dg/cilk-plus/pr60967.C: Delete.
	* g++.dg/cilk-plus/pr69028.C: Delete.
	* g++.dg/cilk-plus/pr70565.C: Delete.
	* g++.dg/pr57662.C: Delete.
	* gcc.dg/cilk-plus/cilk-plus.exp
	* gcc.dg/cilk-plus/for1.c: Delete.
	* gcc.dg/cilk-plus/for2.c: Delete.
	* gcc.dg/cilk-plus/jump-openmp.c: Delete.
	* gcc.dg/cilk-plus/jump.c: Delete.
	* gcc.dg/cilk-plus/pr69798-1.c: Delete.
	* gcc.dg/cilk-plus/pr69798-2.c: Delete.
	* gcc.dg/cilk-plus/pr78306.c: Delete.
	* gcc.dg/cilk-plus/pr79116.c: Delete.
	* gcc.dg/graphite/id-28.c: Delete.
	* lib/cilk-plus-dg.exp: Delete.
	* lib/target-supports.exp (cilkplus_runtime): Delete.

Co-Authored-By: Sebastian Peryt <sebastian.peryt@intel.com>

From-SVN: r255195
This commit is contained in:
Julia Koval 2017-11-28 11:35:37 +01:00 committed by Julia Koval
parent 1be49a38e4
commit 5e9d6aa4c2
382 changed files with 472 additions and 82705 deletions

View File

@ -1,3 +1,11 @@
2017-11-28 Julia Koval <julia.koval@intel.com>
Sebastian Peryt <sebastian.peryt@intel.com>
* Makefile.def (target_modules): Remove libcilkrts.
* Makefile.in: Ditto.
* configure: Ditto.
* configure.ac: Ditto.
2017-11-28 Julia Koval <julia.koval@intel.com>
* MAINTAINERS (Write After Approval): Add myself.

View File

@ -144,8 +144,6 @@ target_modules = { module= libvtv;
bootstrap=true;
lib_path=.libs;
raw_cxx=true; };
target_modules = { module= libcilkrts;
lib_path=.libs; };
target_modules = { module= liboffloadmic;
lib_path=.libs;
extra_configure_flags='@extra_liboffloadmic_configure_flags@'; };
@ -533,7 +531,6 @@ dependencies = { module=all-m4; on=all-build-texinfo; };
// on libgcc and newlib/libgloss.
lang_env_dependencies = { module=libitm; cxx=true; };
lang_env_dependencies = { module=libffi; cxx=true; };
lang_env_dependencies = { module=libcilkrts; cxx=true; };
lang_env_dependencies = { module=liboffloadmic; cxx=true; };
lang_env_dependencies = { module=newlib; no_c=true; };
lang_env_dependencies = { module=libgloss; no_c=true; };
@ -567,8 +564,6 @@ dependencies = { module=install-target-libsanitizer; on=install-target-libstdc++
dependencies = { module=install-target-libsanitizer; on=install-target-libgcc; };
dependencies = { module=install-target-libvtv; on=install-target-libstdc++-v3; };
dependencies = { module=install-target-libvtv; on=install-target-libgcc; };
dependencies = { module=install-target-libcilkrts; on=install-target-libstdc++-v3; };
dependencies = { module=install-target-libcilkrts; on=install-target-libgcc; };
dependencies = { module=install-target-liboffloadmic; on=install-target-libstdc++-v3; };
dependencies = { module=install-target-liboffloadmic; on=install-target-libgcc; };
dependencies = { module=install-target-libitm; on=install-target-libgcc; };

View File

@ -612,7 +612,7 @@ all:
# This is the list of directories that may be needed in RPATH_ENVVAR
# so that programs built for the target machine work.
TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libsanitizer)$(TARGET_LIB_PATH_libmpx)$(TARGET_LIB_PATH_libvtv)$(TARGET_LIB_PATH_libcilkrts)$(TARGET_LIB_PATH_liboffloadmic)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libgomp)$(TARGET_LIB_PATH_libitm)$(TARGET_LIB_PATH_libatomic)$(HOST_LIB_PATH_gcc)
TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libsanitizer)$(TARGET_LIB_PATH_libmpx)$(TARGET_LIB_PATH_libvtv)$(TARGET_LIB_PATH_liboffloadmic)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libgomp)$(TARGET_LIB_PATH_libitm)$(TARGET_LIB_PATH_libatomic)$(HOST_LIB_PATH_gcc)
@if target-libstdc++-v3
TARGET_LIB_PATH_libstdc++-v3 = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:
@ -630,10 +630,6 @@ TARGET_LIB_PATH_libmpx = $$r/$(TARGET_SUBDIR)/libmpx/.libs:
TARGET_LIB_PATH_libvtv = $$r/$(TARGET_SUBDIR)/libvtv/.libs:
@endif target-libvtv
@if target-libcilkrts
TARGET_LIB_PATH_libcilkrts = $$r/$(TARGET_SUBDIR)/libcilkrts/.libs:
@endif target-libcilkrts
@if target-liboffloadmic
TARGET_LIB_PATH_liboffloadmic = $$r/$(TARGET_SUBDIR)/liboffloadmic/.libs:
@endif target-liboffloadmic
@ -997,7 +993,6 @@ configure-target: \
maybe-configure-target-libsanitizer \
maybe-configure-target-libmpx \
maybe-configure-target-libvtv \
maybe-configure-target-libcilkrts \
maybe-configure-target-liboffloadmic \
maybe-configure-target-libssp \
maybe-configure-target-newlib \
@ -1161,7 +1156,6 @@ all-target: maybe-all-target-libmpx
@if target-libvtv-no-bootstrap
all-target: maybe-all-target-libvtv
@endif target-libvtv-no-bootstrap
all-target: maybe-all-target-libcilkrts
all-target: maybe-all-target-liboffloadmic
all-target: maybe-all-target-libssp
all-target: maybe-all-target-newlib
@ -1256,7 +1250,6 @@ info-target: maybe-info-target-libstdc++-v3
info-target: maybe-info-target-libsanitizer
info-target: maybe-info-target-libmpx
info-target: maybe-info-target-libvtv
info-target: maybe-info-target-libcilkrts
info-target: maybe-info-target-liboffloadmic
info-target: maybe-info-target-libssp
info-target: maybe-info-target-newlib
@ -1342,7 +1335,6 @@ dvi-target: maybe-dvi-target-libstdc++-v3
dvi-target: maybe-dvi-target-libsanitizer
dvi-target: maybe-dvi-target-libmpx
dvi-target: maybe-dvi-target-libvtv
dvi-target: maybe-dvi-target-libcilkrts
dvi-target: maybe-dvi-target-liboffloadmic
dvi-target: maybe-dvi-target-libssp
dvi-target: maybe-dvi-target-newlib
@ -1428,7 +1420,6 @@ pdf-target: maybe-pdf-target-libstdc++-v3
pdf-target: maybe-pdf-target-libsanitizer
pdf-target: maybe-pdf-target-libmpx
pdf-target: maybe-pdf-target-libvtv
pdf-target: maybe-pdf-target-libcilkrts
pdf-target: maybe-pdf-target-liboffloadmic
pdf-target: maybe-pdf-target-libssp
pdf-target: maybe-pdf-target-newlib
@ -1514,7 +1505,6 @@ html-target: maybe-html-target-libstdc++-v3
html-target: maybe-html-target-libsanitizer
html-target: maybe-html-target-libmpx
html-target: maybe-html-target-libvtv
html-target: maybe-html-target-libcilkrts
html-target: maybe-html-target-liboffloadmic
html-target: maybe-html-target-libssp
html-target: maybe-html-target-newlib
@ -1600,7 +1590,6 @@ TAGS-target: maybe-TAGS-target-libstdc++-v3
TAGS-target: maybe-TAGS-target-libsanitizer
TAGS-target: maybe-TAGS-target-libmpx
TAGS-target: maybe-TAGS-target-libvtv
TAGS-target: maybe-TAGS-target-libcilkrts
TAGS-target: maybe-TAGS-target-liboffloadmic
TAGS-target: maybe-TAGS-target-libssp
TAGS-target: maybe-TAGS-target-newlib
@ -1686,7 +1675,6 @@ install-info-target: maybe-install-info-target-libstdc++-v3
install-info-target: maybe-install-info-target-libsanitizer
install-info-target: maybe-install-info-target-libmpx
install-info-target: maybe-install-info-target-libvtv
install-info-target: maybe-install-info-target-libcilkrts
install-info-target: maybe-install-info-target-liboffloadmic
install-info-target: maybe-install-info-target-libssp
install-info-target: maybe-install-info-target-newlib
@ -1772,7 +1760,6 @@ install-pdf-target: maybe-install-pdf-target-libstdc++-v3
install-pdf-target: maybe-install-pdf-target-libsanitizer
install-pdf-target: maybe-install-pdf-target-libmpx
install-pdf-target: maybe-install-pdf-target-libvtv
install-pdf-target: maybe-install-pdf-target-libcilkrts
install-pdf-target: maybe-install-pdf-target-liboffloadmic
install-pdf-target: maybe-install-pdf-target-libssp
install-pdf-target: maybe-install-pdf-target-newlib
@ -1858,7 +1845,6 @@ install-html-target: maybe-install-html-target-libstdc++-v3
install-html-target: maybe-install-html-target-libsanitizer
install-html-target: maybe-install-html-target-libmpx
install-html-target: maybe-install-html-target-libvtv
install-html-target: maybe-install-html-target-libcilkrts
install-html-target: maybe-install-html-target-liboffloadmic
install-html-target: maybe-install-html-target-libssp
install-html-target: maybe-install-html-target-newlib
@ -1944,7 +1930,6 @@ installcheck-target: maybe-installcheck-target-libstdc++-v3
installcheck-target: maybe-installcheck-target-libsanitizer
installcheck-target: maybe-installcheck-target-libmpx
installcheck-target: maybe-installcheck-target-libvtv
installcheck-target: maybe-installcheck-target-libcilkrts
installcheck-target: maybe-installcheck-target-liboffloadmic
installcheck-target: maybe-installcheck-target-libssp
installcheck-target: maybe-installcheck-target-newlib
@ -2030,7 +2015,6 @@ mostlyclean-target: maybe-mostlyclean-target-libstdc++-v3
mostlyclean-target: maybe-mostlyclean-target-libsanitizer
mostlyclean-target: maybe-mostlyclean-target-libmpx
mostlyclean-target: maybe-mostlyclean-target-libvtv
mostlyclean-target: maybe-mostlyclean-target-libcilkrts
mostlyclean-target: maybe-mostlyclean-target-liboffloadmic
mostlyclean-target: maybe-mostlyclean-target-libssp
mostlyclean-target: maybe-mostlyclean-target-newlib
@ -2116,7 +2100,6 @@ clean-target: maybe-clean-target-libstdc++-v3
clean-target: maybe-clean-target-libsanitizer
clean-target: maybe-clean-target-libmpx
clean-target: maybe-clean-target-libvtv
clean-target: maybe-clean-target-libcilkrts
clean-target: maybe-clean-target-liboffloadmic
clean-target: maybe-clean-target-libssp
clean-target: maybe-clean-target-newlib
@ -2202,7 +2185,6 @@ distclean-target: maybe-distclean-target-libstdc++-v3
distclean-target: maybe-distclean-target-libsanitizer
distclean-target: maybe-distclean-target-libmpx
distclean-target: maybe-distclean-target-libvtv
distclean-target: maybe-distclean-target-libcilkrts
distclean-target: maybe-distclean-target-liboffloadmic
distclean-target: maybe-distclean-target-libssp
distclean-target: maybe-distclean-target-newlib
@ -2288,7 +2270,6 @@ maintainer-clean-target: maybe-maintainer-clean-target-libstdc++-v3
maintainer-clean-target: maybe-maintainer-clean-target-libsanitizer
maintainer-clean-target: maybe-maintainer-clean-target-libmpx
maintainer-clean-target: maybe-maintainer-clean-target-libvtv
maintainer-clean-target: maybe-maintainer-clean-target-libcilkrts
maintainer-clean-target: maybe-maintainer-clean-target-liboffloadmic
maintainer-clean-target: maybe-maintainer-clean-target-libssp
maintainer-clean-target: maybe-maintainer-clean-target-newlib
@ -2430,7 +2411,6 @@ check-target: \
maybe-check-target-libsanitizer \
maybe-check-target-libmpx \
maybe-check-target-libvtv \
maybe-check-target-libcilkrts \
maybe-check-target-liboffloadmic \
maybe-check-target-libssp \
maybe-check-target-newlib \
@ -2612,7 +2592,6 @@ install-target: \
maybe-install-target-libsanitizer \
maybe-install-target-libmpx \
maybe-install-target-libvtv \
maybe-install-target-libcilkrts \
maybe-install-target-liboffloadmic \
maybe-install-target-libssp \
maybe-install-target-newlib \
@ -2718,7 +2697,6 @@ install-strip-target: \
maybe-install-strip-target-libsanitizer \
maybe-install-strip-target-libmpx \
maybe-install-strip-target-libvtv \
maybe-install-strip-target-libcilkrts \
maybe-install-strip-target-liboffloadmic \
maybe-install-strip-target-libssp \
maybe-install-strip-target-newlib \
@ -42863,464 +42841,6 @@ maintainer-clean-target-libvtv:
.PHONY: configure-target-libcilkrts maybe-configure-target-libcilkrts
maybe-configure-target-libcilkrts:
@if gcc-bootstrap
configure-target-libcilkrts: stage_current
@endif gcc-bootstrap
@if target-libcilkrts
maybe-configure-target-libcilkrts: configure-target-libcilkrts
configure-target-libcilkrts:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Checking multilib configuration for libcilkrts..."; \
$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libcilkrts; \
$(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libcilkrts/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libcilkrts/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libcilkrts/multilib.tmp $(TARGET_SUBDIR)/libcilkrts/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libcilkrts/multilib.tmp; \
else \
rm -f $(TARGET_SUBDIR)/libcilkrts/Makefile; \
mv $(TARGET_SUBDIR)/libcilkrts/multilib.tmp $(TARGET_SUBDIR)/libcilkrts/multilib.out; \
fi; \
else \
mv $(TARGET_SUBDIR)/libcilkrts/multilib.tmp $(TARGET_SUBDIR)/libcilkrts/multilib.out; \
fi; \
test ! -f $(TARGET_SUBDIR)/libcilkrts/Makefile || exit 0; \
$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libcilkrts; \
$(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/libcilkrts; \
cd "$(TARGET_SUBDIR)/libcilkrts" || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libcilkrts/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
module_srcdir=libcilkrts; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) \
$$s/$$module_srcdir/configure \
--srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
--target=${target_alias} \
|| exit 1
@endif target-libcilkrts
.PHONY: all-target-libcilkrts maybe-all-target-libcilkrts
maybe-all-target-libcilkrts:
@if gcc-bootstrap
all-target-libcilkrts: stage_current
@endif gcc-bootstrap
@if target-libcilkrts
TARGET-target-libcilkrts=all
maybe-all-target-libcilkrts: all-target-libcilkrts
all-target-libcilkrts: configure-target-libcilkrts
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libcilkrts && \
$(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
$(TARGET-target-libcilkrts))
@endif target-libcilkrts
.PHONY: check-target-libcilkrts maybe-check-target-libcilkrts
maybe-check-target-libcilkrts:
@if target-libcilkrts
maybe-check-target-libcilkrts: check-target-libcilkrts
check-target-libcilkrts:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libcilkrts && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) check)
@endif target-libcilkrts
.PHONY: install-target-libcilkrts maybe-install-target-libcilkrts
maybe-install-target-libcilkrts:
@if target-libcilkrts
maybe-install-target-libcilkrts: install-target-libcilkrts
install-target-libcilkrts: installdirs
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libcilkrts && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) install)
@endif target-libcilkrts
.PHONY: install-strip-target-libcilkrts maybe-install-strip-target-libcilkrts
maybe-install-strip-target-libcilkrts:
@if target-libcilkrts
maybe-install-strip-target-libcilkrts: install-strip-target-libcilkrts
install-strip-target-libcilkrts: installdirs
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libcilkrts && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) install-strip)
@endif target-libcilkrts
# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-target-libcilkrts info-target-libcilkrts
maybe-info-target-libcilkrts:
@if target-libcilkrts
maybe-info-target-libcilkrts: info-target-libcilkrts
info-target-libcilkrts: \
configure-target-libcilkrts
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libcilkrts/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing info in $(TARGET_SUBDIR)/libcilkrts"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libcilkrts && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
info) \
|| exit 1
@endif target-libcilkrts
.PHONY: maybe-dvi-target-libcilkrts dvi-target-libcilkrts
maybe-dvi-target-libcilkrts:
@if target-libcilkrts
maybe-dvi-target-libcilkrts: dvi-target-libcilkrts
dvi-target-libcilkrts: \
configure-target-libcilkrts
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libcilkrts/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing dvi in $(TARGET_SUBDIR)/libcilkrts"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libcilkrts && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
dvi) \
|| exit 1
@endif target-libcilkrts
.PHONY: maybe-pdf-target-libcilkrts pdf-target-libcilkrts
maybe-pdf-target-libcilkrts:
@if target-libcilkrts
maybe-pdf-target-libcilkrts: pdf-target-libcilkrts
pdf-target-libcilkrts: \
configure-target-libcilkrts
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libcilkrts/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing pdf in $(TARGET_SUBDIR)/libcilkrts"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libcilkrts && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
pdf) \
|| exit 1
@endif target-libcilkrts
.PHONY: maybe-html-target-libcilkrts html-target-libcilkrts
maybe-html-target-libcilkrts:
@if target-libcilkrts
maybe-html-target-libcilkrts: html-target-libcilkrts
html-target-libcilkrts: \
configure-target-libcilkrts
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libcilkrts/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing html in $(TARGET_SUBDIR)/libcilkrts"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libcilkrts && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
html) \
|| exit 1
@endif target-libcilkrts
.PHONY: maybe-TAGS-target-libcilkrts TAGS-target-libcilkrts
maybe-TAGS-target-libcilkrts:
@if target-libcilkrts
maybe-TAGS-target-libcilkrts: TAGS-target-libcilkrts
TAGS-target-libcilkrts: \
configure-target-libcilkrts
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libcilkrts/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing TAGS in $(TARGET_SUBDIR)/libcilkrts"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libcilkrts && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
TAGS) \
|| exit 1
@endif target-libcilkrts
.PHONY: maybe-install-info-target-libcilkrts install-info-target-libcilkrts
maybe-install-info-target-libcilkrts:
@if target-libcilkrts
maybe-install-info-target-libcilkrts: install-info-target-libcilkrts
install-info-target-libcilkrts: \
configure-target-libcilkrts \
info-target-libcilkrts
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libcilkrts/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing install-info in $(TARGET_SUBDIR)/libcilkrts"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libcilkrts && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
install-info) \
|| exit 1
@endif target-libcilkrts
.PHONY: maybe-install-pdf-target-libcilkrts install-pdf-target-libcilkrts
maybe-install-pdf-target-libcilkrts:
@if target-libcilkrts
maybe-install-pdf-target-libcilkrts: install-pdf-target-libcilkrts
install-pdf-target-libcilkrts: \
configure-target-libcilkrts \
pdf-target-libcilkrts
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libcilkrts/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing install-pdf in $(TARGET_SUBDIR)/libcilkrts"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libcilkrts && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
install-pdf) \
|| exit 1
@endif target-libcilkrts
.PHONY: maybe-install-html-target-libcilkrts install-html-target-libcilkrts
maybe-install-html-target-libcilkrts:
@if target-libcilkrts
maybe-install-html-target-libcilkrts: install-html-target-libcilkrts
install-html-target-libcilkrts: \
configure-target-libcilkrts \
html-target-libcilkrts
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libcilkrts/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing install-html in $(TARGET_SUBDIR)/libcilkrts"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libcilkrts && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
install-html) \
|| exit 1
@endif target-libcilkrts
.PHONY: maybe-installcheck-target-libcilkrts installcheck-target-libcilkrts
maybe-installcheck-target-libcilkrts:
@if target-libcilkrts
maybe-installcheck-target-libcilkrts: installcheck-target-libcilkrts
installcheck-target-libcilkrts: \
configure-target-libcilkrts
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libcilkrts/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing installcheck in $(TARGET_SUBDIR)/libcilkrts"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libcilkrts && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
installcheck) \
|| exit 1
@endif target-libcilkrts
.PHONY: maybe-mostlyclean-target-libcilkrts mostlyclean-target-libcilkrts
maybe-mostlyclean-target-libcilkrts:
@if target-libcilkrts
maybe-mostlyclean-target-libcilkrts: mostlyclean-target-libcilkrts
mostlyclean-target-libcilkrts:
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libcilkrts/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing mostlyclean in $(TARGET_SUBDIR)/libcilkrts"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libcilkrts && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
mostlyclean) \
|| exit 1
@endif target-libcilkrts
.PHONY: maybe-clean-target-libcilkrts clean-target-libcilkrts
maybe-clean-target-libcilkrts:
@if target-libcilkrts
maybe-clean-target-libcilkrts: clean-target-libcilkrts
clean-target-libcilkrts:
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libcilkrts/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing clean in $(TARGET_SUBDIR)/libcilkrts"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libcilkrts && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
clean) \
|| exit 1
@endif target-libcilkrts
.PHONY: maybe-distclean-target-libcilkrts distclean-target-libcilkrts
maybe-distclean-target-libcilkrts:
@if target-libcilkrts
maybe-distclean-target-libcilkrts: distclean-target-libcilkrts
distclean-target-libcilkrts:
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libcilkrts/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing distclean in $(TARGET_SUBDIR)/libcilkrts"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libcilkrts && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
distclean) \
|| exit 1
@endif target-libcilkrts
.PHONY: maybe-maintainer-clean-target-libcilkrts maintainer-clean-target-libcilkrts
maybe-maintainer-clean-target-libcilkrts:
@if target-libcilkrts
maybe-maintainer-clean-target-libcilkrts: maintainer-clean-target-libcilkrts
maintainer-clean-target-libcilkrts:
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libcilkrts/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libcilkrts"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libcilkrts && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
maintainer-clean) \
|| exit 1
@endif target-libcilkrts
.PHONY: configure-target-liboffloadmic maybe-configure-target-liboffloadmic
maybe-configure-target-liboffloadmic:
@if gcc-bootstrap
@ -57245,7 +56765,6 @@ configure-stagetrain-target-libvtv: maybe-all-stagetrain-gcc
configure-stagefeedback-target-libvtv: maybe-all-stagefeedback-gcc
configure-stageautoprofile-target-libvtv: maybe-all-stageautoprofile-gcc
configure-stageautofeedback-target-libvtv: maybe-all-stageautofeedback-gcc
configure-target-libcilkrts: stage_last
configure-target-liboffloadmic: stage_last
configure-target-libssp: stage_last
configure-target-newlib: stage_last
@ -57289,7 +56808,6 @@ configure-target-libstdc++-v3: maybe-all-gcc
configure-target-libsanitizer: maybe-all-gcc
configure-target-libmpx: maybe-all-gcc
configure-target-libvtv: maybe-all-gcc
configure-target-libcilkrts: maybe-all-gcc
configure-target-liboffloadmic: maybe-all-gcc
configure-target-libssp: maybe-all-gcc
configure-target-newlib: maybe-all-gcc
@ -58469,8 +57987,6 @@ install-target-libsanitizer: maybe-install-target-libstdc++-v3
install-target-libsanitizer: maybe-install-target-libgcc
install-target-libvtv: maybe-install-target-libstdc++-v3
install-target-libvtv: maybe-install-target-libgcc
install-target-libcilkrts: maybe-install-target-libstdc++-v3
install-target-libcilkrts: maybe-install-target-libgcc
install-target-liboffloadmic: maybe-install-target-libstdc++-v3
install-target-liboffloadmic: maybe-install-target-libgcc
install-target-libitm: maybe-install-target-libgcc
@ -58542,7 +58058,6 @@ configure-target-libstdc++-v3: maybe-all-target-libgcc
configure-target-libsanitizer: maybe-all-target-libgcc
configure-target-libmpx: maybe-all-target-libgcc
configure-target-libvtv: maybe-all-target-libgcc
configure-target-libcilkrts: maybe-all-target-libgcc
configure-target-liboffloadmic: maybe-all-target-libgcc
configure-target-libssp: maybe-all-target-libgcc
configure-target-newlib: maybe-all-target-libgcc
@ -58573,9 +58088,6 @@ configure-target-libmpx: maybe-all-target-newlib maybe-all-target-libgloss
configure-target-libvtv: maybe-all-target-newlib maybe-all-target-libgloss
configure-target-libcilkrts: maybe-all-target-newlib maybe-all-target-libgloss
configure-target-libcilkrts: maybe-all-target-libstdc++-v3
configure-target-liboffloadmic: maybe-all-target-newlib maybe-all-target-libgloss
configure-target-liboffloadmic: maybe-all-target-libstdc++-v3

28
configure vendored
View File

@ -2751,7 +2751,6 @@ target_libraries="target-libgcc \
target-libgloss \
target-newlib \
target-libgomp \
target-libcilkrts \
target-liboffloadmic \
target-libhsail-rt \
target-libatomic \
@ -3188,25 +3187,6 @@ $as_echo "yes" >&6; }
fi
fi
# Disable libcilkrts on unsupported systems.
if test -d ${srcdir}/libcilkrts; then
if test x$enable_libcilkrts = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcilkrts support" >&5
$as_echo_n "checking for libcilkrts support... " >&6; }
if (srcdir=${srcdir}/libcilkrts; \
. ${srcdir}/configure.tgt; \
test -n "$UNSUPPORTED")
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
noconfigdirs="$noconfigdirs target-libcilkrts"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
fi
fi
# Disable liboffloadmic on unsupported systems.
if test -d ${srcdir}/liboffloadmic; then
if test x$enable_liboffloadmic != xno; then
@ -6496,19 +6476,19 @@ $as_echo "using paths configured with --with-target-bdw-gc options" >&6; }
fi
esac
# Disable libcilkrts, libitm, libsanitizer, libvtv, liboffloadmic if we're not building C++
# Disable libitm, libsanitizer, libvtv, liboffloadmic if we're not building C++
case ,${enable_languages}, in
*,c++,*)
# Disable libcilkrts, libitm, libsanitizer if we're not building libstdc++
# Disable libitm, libsanitizer if we're not building libstdc++
case "${noconfigdirs}" in
*target-libstdc++-v3*)
noconfigdirs="$noconfigdirs target-libcilkrts target-libitm target-libsanitizer"
noconfigdirs="$noconfigdirs target-libitm target-libsanitizer"
;;
*) ;;
esac
;;
*)
noconfigdirs="$noconfigdirs target-libcilkrts target-liboffloadmic target-libitm target-libsanitizer target-libvtv"
noconfigdirs="$noconfigdirs target-liboffloadmic target-libitm target-libsanitizer target-libvtv"
;;
esac

View File

@ -150,7 +150,6 @@ target_libraries="target-libgcc \
target-libgloss \
target-newlib \
target-libgomp \
target-libcilkrts \
target-liboffloadmic \
target-libhsail-rt \
target-libatomic \
@ -537,22 +536,6 @@ if test -d ${srcdir}/libatomic; then
fi
fi
# Disable libcilkrts on unsupported systems.
if test -d ${srcdir}/libcilkrts; then
if test x$enable_libcilkrts = x; then
AC_MSG_CHECKING([for libcilkrts support])
if (srcdir=${srcdir}/libcilkrts; \
. ${srcdir}/configure.tgt; \
test -n "$UNSUPPORTED")
then
AC_MSG_RESULT([no])
noconfigdirs="$noconfigdirs target-libcilkrts"
else
AC_MSG_RESULT([yes])
fi
fi
fi
# Disable liboffloadmic on unsupported systems.
if test -d ${srcdir}/liboffloadmic; then
if test x$enable_liboffloadmic != xno; then
@ -2156,19 +2139,19 @@ case ,${enable_languages},:${enable_objc_gc} in *,objc,*:yes|*,objc,*:auto)
fi
esac
# Disable libcilkrts, libitm, libsanitizer, libvtv, liboffloadmic if we're not building C++
# Disable libitm, libsanitizer, libvtv, liboffloadmic if we're not building C++
case ,${enable_languages}, in
*,c++,*)
# Disable libcilkrts, libitm, libsanitizer if we're not building libstdc++
# Disable libitm, libsanitizer if we're not building libstdc++
case "${noconfigdirs}" in
*target-libstdc++-v3*)
noconfigdirs="$noconfigdirs target-libcilkrts target-libitm target-libsanitizer"
noconfigdirs="$noconfigdirs target-libitm target-libsanitizer"
;;
*) ;;
esac
;;
*)
noconfigdirs="$noconfigdirs target-libcilkrts target-liboffloadmic target-libitm target-libsanitizer target-libvtv"
noconfigdirs="$noconfigdirs target-liboffloadmic target-libitm target-libsanitizer target-libvtv"
;;
esac

View File

@ -1,3 +1,8 @@
2017-11-28 Julia Koval <julia.koval@intel.com>
Sebastian Peryt <sebastian.peryt@intel.com>
* contrib/gcc_update: Ditto.
2017-11-08 Martin Liska <mliska@suse.cz>
* analyze_brprob.py: Fix abbreviations for SI units.

View File

@ -159,9 +159,6 @@ libsanitizer/sanitizer_common/Makefile.in: libsanitizer/sanitizer_common/Makefil
libvtv/aclocal.m4: libvtv/configure.ac libvtv/acinclude.m4
libvtv/Makefile.in: libvtv/Makefile.am libvtv/aclocal.m4
libvtv/configure: libvtv/configure.ac libvtv/aclocal.m4
libcilkrts/aclocal.m4: libcilkrts/configure.ac
libcilkrts/Makefile.in: libcilkrts/Makefile.am
libcilkrts/configure: libcilkrts/configure.ac
liboffloadmic/aclocal.m4: liboffloadmic/configure.ac
liboffloadmic/Makefile.in: liboffloadmic/Makefile.am
liboffloadmic/configure: liboffloadmic/configure.ac

View File

@ -1,3 +1,63 @@
2017-11-28 Julia Koval <julia.koval@intel.com>
Sebastian Peryt <sebastian.peryt@intel.com>
* Makefile.in (cilkplus.def, cilk-builtins.def, c-family/cilk.o,
c-family/c-cilkplus.o, c-family/array-notation-common.o,
cilk-common.o, cilk.h, cilk-common.c): Remove.
* builtin-types.def
(BT_FN_INT_PTR_PTR_PTR_FTYPE_BT_INT_BT_PTR_BT_PTR_BT_PTR): Remove.
* builtins.c (is_builtin_name): Remove cilkplus condition.
(BUILT_IN_CILK_DETACH, BUILT_IN_CILK_POP_FRAME): Remove.
* builtins.def (DEF_CILK_BUILTIN_STUB, DEF_CILKPLUS_BUILTIN,
cilk-builtins.def, cilkplus.def): Remove.
* cif-code.def (CILK_SPAWN): Remove.
* cilk-builtins.def: Delete.
* cilk-common.c: Ditto.
* cilk.h: Ditto.
* cilkplus.def: Ditto.
* config/darwin.h (fcilkplus): Delete.
* cppbuiltin.c: Ditto.
* doc/extend.texi: Remove cilkplus doc.
* doc/generic.texi: Ditto.
* doc/invoke.texi: Ditto.
* doc/passes.texi: Ditto.
* gcc.c (fcilkplus): Remove.
* gengtype.c (cilk.h): Remove.
* gimple-pretty-print.c (dump_gimple_omp_for): Remove cilkplus
support.
* gimple.h (GF_OMP_FOR_KIND_CILKFOR, GF_OMP_FOR_KIND_CILKSIMD):
Remove.
* gimplify.c (gimplify_return_expr, maybe_fold_stmt,
gimplify_call_expr,
is_gimple_stmt, gimplify_modify_expr, gimplify_scan_omp_clauses,
gimplify_adjust_omp_clauses, gimplify_omp_for, gimplify_expr): Remove
cilkplus conditions.
* ipa-fnsummary.c (ipa_dump_fn_summary, compute_fn_summary,
inline_read_section): Ditto.
* ipa-inline-analysis.c (cilk.h): Remove.
* ira.c (ira_setup_eliminable_regset): Remove cilkplus support.
* lto-wrapper.c (merge_and_complain, append_compiler_options,
append_linker_options): Remove condition for fcilkplus.
* lto/lto-lang.c (cilk.h): Remove.
(lto_init): Remove condition for fcilkplus.
* omp-expand.c (expand_cilk_for_call): Delete.
(expand_omp_taskreg, expand_omp_for_static_chunk,
expand_omp_for): Remove cilkplus
conditions.
(expand_cilk_for): Delete.
* omp-general.c (omp_extract_for_data): Remove cilkplus support.
* omp-low.c (scan_sharing_clauses, create_omp_child_function,
execute_lower_omp, diagnose_sb_0): Ditto.
* omp-simd-clone.c (simd_clone_clauses_extract): Ditto.
* tree-core.h (OMP_CLAUSE__CILK_FOR_COUNT_): Delete.
* tree-nested.c: Ditto.
* tree-pretty-print.c (dump_omp_clause): Remove cilkplus support.
(dump_generic_node): Ditto.
* tree.c (OMP_CLAUSE__CILK_FOR_COUNT_): Delete.
* tree.def (cilk_simd, cilk_for, cilk_spawn_stmt, cilk_sync_stmt):
Delete.
* tree.h (CILK_SPAWN_FN, EXPR_CILK_SPAWN): Delete.
2017-11-28 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
* config/aarch64/aarch64.md (div<mode>3): Change check to TARGET_FLOAT.

View File

@ -923,7 +923,7 @@ RTL_H = $(RTL_BASE_H) $(FLAGS_H) genrtl.h
READ_MD_H = $(OBSTACK_H) $(HASHTAB_H) read-md.h
PARAMS_H = params.h params-enum.h params.def
BUILTINS_DEF = builtins.def sync-builtins.def omp-builtins.def \
gtm-builtins.def sanitizer.def cilkplus.def cilk-builtins.def \
gtm-builtins.def sanitizer.def \
hsa-builtins.def
INTERNAL_FN_DEF = internal-fn.def
INTERNAL_FN_H = internal-fn.h $(INTERNAL_FN_DEF)
@ -1195,9 +1195,8 @@ C_COMMON_OBJS = c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o \
c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o \
c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o \
c-family/c-semantics.o c-family/c-ada-spec.o \
c-family/c-cilkplus.o \
c-family/array-notation-common.o c-family/cilk.o c-family/c-ubsan.o \
c-family/c-attribs.o c-family/c-warn.o c-family/known-headers.o
c-family/c-ubsan.o c-family/known-headers.o \
c-family/c-attribs.o c-family/c-warn.o
# Language-independent object files.
# We put the *-match.o and insn-*.o files first so that a parallel make
@ -1246,7 +1245,6 @@ OBJS = \
cgraphbuild.o \
cgraphunit.o \
cgraphclones.o \
cilk-common.o \
combine.o \
combine-stack-adj.o \
compare-elim.o \
@ -2508,8 +2506,8 @@ s-match: build/genmatch$(build_exeext) $(srcdir)/match.pd cfn-operators.pd
GTFILES = $(CPP_ID_DATA_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
$(host_xm_file_list) \
$(tm_file_list) $(HASHTAB_H) $(SPLAY_TREE_H) $(srcdir)/bitmap.h \
$(srcdir)/wide-int.h $(srcdir)/alias.h $(srcdir)/cilk.h \
$(srcdir)/cilk-common.c $(srcdir)/coverage.c $(srcdir)/rtl.h \
$(srcdir)/wide-int.h $(srcdir)/alias.h \
$(srcdir)/coverage.c $(srcdir)/rtl.h \
$(srcdir)/optabs.h $(srcdir)/tree.h $(srcdir)/tree-core.h \
$(srcdir)/libfuncs.h $(SYMTAB_H) \
$(srcdir)/real.h $(srcdir)/function.h $(srcdir)/insn-addr.h $(srcdir)/hwint.h \

View File

@ -520,8 +520,6 @@ DEF_FUNCTION_TYPE_3 (BT_FN_INT_CONST_STRING_CONST_STRING_VALIST_ARG,
BT_INT, BT_CONST_STRING, BT_CONST_STRING, BT_VALIST_ARG)
DEF_FUNCTION_TYPE_3 (BT_FN_INT_FILEPTR_CONST_STRING_VALIST_ARG,
BT_INT, BT_FILEPTR, BT_CONST_STRING, BT_VALIST_ARG)
DEF_FUNCTION_TYPE_3 (BT_FN_INT_PTR_PTR_PTR,
BT_INT, BT_PTR, BT_PTR, BT_PTR)
DEF_FUNCTION_TYPE_3 (BT_FN_INT_INT_UINT_UINT,
BT_INT, BT_INT, BT_UINT, BT_UINT)
DEF_FUNCTION_TYPE_3 (BT_FN_UINT_UINT_UINT_UINT,

View File

@ -63,7 +63,6 @@ along with GCC; see the file COPYING3. If not see
#include "stringpool.h"
#include "attribs.h"
#include "asan.h"
#include "cilk.h"
#include "tree-chkp.h"
#include "rtl-chkp.h"
#include "internal-fn.h"
@ -203,10 +202,6 @@ is_builtin_name (const char *name)
return true;
if (strncmp (name, "__atomic_", 9) == 0)
return true;
if (flag_cilkplus
&& (!strcmp (name, "__cilkrts_detach")
|| !strcmp (name, "__cilkrts_pop_frame")))
return true;
return false;
}
@ -7626,14 +7621,6 @@ expand_builtin (tree exp, rtx target, rtx subtarget, machine_mode mode,
expand_builtin_set_thread_pointer (exp);
return const0_rtx;
case BUILT_IN_CILK_DETACH:
expand_builtin_cilk_detach (exp);
return const0_rtx;
case BUILT_IN_CILK_POP_FRAME:
expand_builtin_cilk_pop_frame (exp);
return const0_rtx;
case BUILT_IN_CHKP_INIT_PTR_BOUNDS:
case BUILT_IN_CHKP_NULL_PTR_BOUNDS:
case BUILT_IN_CHKP_COPY_PTR_BOUNDS:

View File

@ -221,7 +221,6 @@ along with GCC; see the file COPYING3. If not see
(flag_openacc \
|| flag_openmp \
|| flag_tree_parallelize_loops > 1 \
|| flag_cilkplus \
|| flag_offload_abi != OFFLOAD_ABI_UNSET))
#undef DEF_HSA_BUILTIN
@ -237,13 +236,6 @@ along with GCC; see the file COPYING3. If not see
(false))
#endif
/* Builtin used by implementation of Cilk Plus. Most of these are decomposed
by the compiler but a few are implemented in libcilkrts. */
#undef DEF_CILK_BUILTIN_STUB
#define DEF_CILK_BUILTIN_STUB(ENUM, NAME) \
DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, BT_LAST, BT_LAST, false, false, \
false, ATTR_LAST, false, false)
/* Builtin used by the implementation of GNU TM. These
functions are mapped to the actual implementation of the STM library. */
#undef DEF_TM_BUILTIN
@ -263,11 +255,6 @@ along with GCC; see the file COPYING3. If not see
| SANITIZE_UNDEFINED_NONDEFAULT) \
|| flag_sanitize_coverage))
#undef DEF_CILKPLUS_BUILTIN
#define DEF_CILKPLUS_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, BT_FN_INT_VAR, BT_LAST, \
false, false, false, ATTRS, false, flag_cilkplus)
/* Builtin used by the implementation of Pointer Bounds Checker. */
#undef DEF_CHKP_BUILTIN
#define DEF_CHKP_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
@ -1033,18 +1020,12 @@ DEF_GCC_BUILTIN (BUILT_IN_LINE, "LINE", BT_FN_INT, ATTR_NOTHROW_LEAF_LIST)
/* Heterogeneous Systems Architecture. */
#include "hsa-builtins.def"
/* Cilk keywords builtins. */
#include "cilk-builtins.def"
/* GTM builtins. */
#include "gtm-builtins.def"
/* Sanitizer builtins. */
#include "sanitizer.def"
/* Cilk Plus builtins. */
#include "cilkplus.def"
/* Pointer Bounds Checker builtins. */
#include "chkp-builtins.def"

View File

@ -1,3 +1,25 @@
2017-11-28 Julia Koval <julia.koval@intel.com>
Sebastian Peryt <sebastian.peryt@intel.com>
* array-notation-common.c: Delete.
* c-cilkplus.c: Ditto.
* c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
* c-common.def (ARRAY_NOTATION_REF): Remove.
* c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
c_validate_cilk_plus_loop, cilkplus_an_parts,
cilk_ignorable_spawn_rhs_op,
cilk_recognize_spawn): Remove.
* c-gimplify.c (CILK_SPAWN_STMT): Remove.
* c-omp.c: Remove CILK_SIMD check.
* c-pragma.c: Ditto.
* c-pragma.h: Remove CILK related pragmas.
* c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
ARRAY_NOTATION_REF condition.
(c_pretty_printer::expression): Ditto.
* c.opt (fcilkplus): Remove.
* cilk.c: Delete.
2017-11-21 Marc Glisse <marc.glisse@inria.fr>
* c-pretty-print.c (pp_c_additive_expression,

View File

@ -1,689 +0,0 @@
/* This file is part of the Intel(R) Cilk(TM) Plus support
This file contains the builtin functions for Array
notations.
Copyright (C) 2013-2017 Free Software Foundation, Inc.
Contributed by Balaji V. Iyer <balaji.v.iyer@intel.com>,
Intel Corporation
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "options.h"
#include "c-family/c-common.h"
#include "tree-iterator.h"
#include "stringpool.h"
#include "attribs.h"
/* Returns true if the function call in FNDECL is __sec_implicit_index. */
bool
is_sec_implicit_index_fn (tree fndecl)
{
if (!fndecl)
return false;
if (TREE_CODE (fndecl) == ADDR_EXPR)
fndecl = TREE_OPERAND (fndecl, 0);
return
(TREE_CODE (fndecl) == FUNCTION_DECL
&& DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL
&& DECL_FUNCTION_CODE (fndecl) == BUILT_IN_CILKPLUS_SEC_IMPLICIT_INDEX);
}
/* Returns the first and only argument for FN, which should be a
sec_implicit_index function. FN's location in the source file is as
indicated by LOCATION. The argument to FN must be a constant integer
expression, otherwise returns -1. */
HOST_WIDE_INT
extract_sec_implicit_index_arg (location_t location, tree fn)
{
tree fn_arg;
HOST_WIDE_INT return_int = 0;
if (TREE_CODE (fn) == CALL_EXPR)
{
fn_arg = CALL_EXPR_ARG (fn, 0);
if (TREE_CODE (fn_arg) == INTEGER_CST)
return_int = int_cst_value (fn_arg);
else
{
/* If the location is unknown, and if fn has a location, then use that
information so that the user has a better idea where the error
could be. */
if (location == UNKNOWN_LOCATION && EXPR_HAS_LOCATION (fn))
location = EXPR_LOCATION (fn);
error_at (location, "__sec_implicit_index parameter must be an "
"integer constant expression");
return -1;
}
}
return return_int;
}
/* Returns true if there is a length mismatch among exprssions that are at the
same dimension and one the same side of the equal sign. The Array notation
lengths (LIST->LENGTH) is passed in as a 2D vector of trees. */
bool
length_mismatch_in_expr_p (location_t loc, vec<vec<an_parts> >list)
{
size_t ii, jj;
tree length = NULL_TREE;
size_t x = list.length ();
size_t y = list[0].length ();
for (jj = 0; jj < y; jj++)
{
length = NULL_TREE;
for (ii = 0; ii < x; ii++)
{
if (!length)
length = list[ii][jj].length;
else if (TREE_CODE (length) == INTEGER_CST)
{
/* If length is a INTEGER, and list[ii][jj] is an integer then
check if they are equal. If they are not equal then return
true. */
if (TREE_CODE (list[ii][jj].length) == INTEGER_CST
&& !tree_int_cst_equal (list[ii][jj].length, length))
{
error_at (loc, "length mismatch in expression");
return true;
}
}
else
/* We set the length node as the current node just in case it turns
out to be an integer. */
length = list[ii][jj].length;
}
}
return false;
}
/* Given an FNDECL of type FUNCTION_DECL or ADDR_EXPR, return the corresponding
BUILT_IN_CILKPLUS_SEC_REDUCE_* being called. If none, return
BUILT_IN_NONE. */
enum built_in_function
is_cilkplus_reduce_builtin (tree fndecl)
{
if (!fndecl)
return BUILT_IN_NONE;
if (TREE_CODE (fndecl) == ADDR_EXPR)
fndecl = TREE_OPERAND (fndecl, 0);
if (TREE_CODE (fndecl) == FUNCTION_DECL
&& DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL)
switch (DECL_FUNCTION_CODE (fndecl))
{
case BUILT_IN_CILKPLUS_SEC_REDUCE_ADD:
case BUILT_IN_CILKPLUS_SEC_REDUCE_MUL:
case BUILT_IN_CILKPLUS_SEC_REDUCE_ALL_ZERO:
case BUILT_IN_CILKPLUS_SEC_REDUCE_ANY_ZERO:
case BUILT_IN_CILKPLUS_SEC_REDUCE_MAX:
case BUILT_IN_CILKPLUS_SEC_REDUCE_MIN:
case BUILT_IN_CILKPLUS_SEC_REDUCE_MIN_IND:
case BUILT_IN_CILKPLUS_SEC_REDUCE_MAX_IND:
case BUILT_IN_CILKPLUS_SEC_REDUCE_ANY_NONZERO:
case BUILT_IN_CILKPLUS_SEC_REDUCE_ALL_NONZERO:
case BUILT_IN_CILKPLUS_SEC_REDUCE:
case BUILT_IN_CILKPLUS_SEC_REDUCE_MUTATING:
return DECL_FUNCTION_CODE (fndecl);
default:
break;
}
return BUILT_IN_NONE;
}
/* This function will recurse into EXPR finding any
ARRAY_NOTATION_EXPRs and calculate the overall rank of EXPR,
storing it in *RANK. LOC is the location of the original expression.
ORIG_EXPR is the original expression used to display if any rank
mismatch errors are found.
Upon entry, *RANK must be either 0, or the rank of a parent
expression that must have the same rank as the one being
calculated. It is illegal to have multiple array notation with different
rank in the same expression (see examples below for clarification).
If there were any rank mismatches while calculating the rank, an
error will be issued, and FALSE will be returned. Otherwise, TRUE
is returned.
If IGNORE_BUILTIN_FN is TRUE, ignore array notation specific
built-in functions (__sec_reduce_*, etc).
Here are some examples of array notations and their rank:
Expression RANK
5 0
X (a variable) 0
*Y (a pointer) 0
A[5] 0
B[5][10] 0
A[:] 1
B[0:10] 1
C[0:10:2] 1
D[5][0:10:2] 1 (since D[5] is considered "scalar")
D[5][:][10] 1
E[:] + 5 1
F[:][:][:] + 5 + X 3
F[:][:][:] + E[:] + 5 + X RANKMISMATCH-ERROR since rank (E[:]) = 1 and
rank (F[:][:][:]) = 3. They must be equal
or have a rank of zero.
F[:][5][10] + E[:] * 5 + *Y 1
int func (int);
func (A[:]) 1
func (B[:][:][:][:]) 4
int func2 (int, int)
func2 (A[:], B[:][:][:][:]) RANKMISMATCH-ERROR -- Since Rank (A[:]) = 1
and Rank (B[:][:][:][:]) = 4
A[:] + func (B[:][:][:][:]) RANKMISMATCH-ERROR
func2 (A[:], B[:]) + func (A) 1
*/
bool
find_rank (location_t loc, tree orig_expr, tree expr, bool ignore_builtin_fn,
size_t *rank)
{
tree ii_tree;
size_t ii = 0, current_rank = 0;
if (TREE_CODE (expr) == ARRAY_NOTATION_REF)
{
ii_tree = expr;
while (ii_tree)
{
if (TREE_CODE (ii_tree) == ARRAY_NOTATION_REF)
{
current_rank++;
ii_tree = ARRAY_NOTATION_ARRAY (ii_tree);
}
else if (handled_component_p (ii_tree)
|| INDIRECT_REF_P (ii_tree))
ii_tree = TREE_OPERAND (ii_tree, 0);
else if (TREE_CODE (ii_tree) == PARM_DECL
|| VAR_P (ii_tree))
break;
else
gcc_unreachable ();
}
if (*rank == 0)
/* In this case, all the expressions this function has encountered thus
far have been scalars or expressions with zero rank. Please see
header comment for examples of such expression. */
*rank = current_rank;
else if (*rank != current_rank)
{
/* In this case, find rank is being recursed through a set of
expression of the form A <OPERATION> B, where A and B both have
array notations in them and the rank of A is not equal to rank of
B.
A simple example of such case is the following: X[:] + Y[:][:] */
*rank = current_rank;
return false;
}
}
else if (TREE_CODE (expr) == STATEMENT_LIST)
{
tree_stmt_iterator ii_tsi;
for (ii_tsi = tsi_start (expr); !tsi_end_p (ii_tsi);
tsi_next (&ii_tsi))
if (!find_rank (loc, orig_expr, *tsi_stmt_ptr (ii_tsi),
ignore_builtin_fn, rank))
return false;
}
else
{
if (TREE_CODE (expr) == CALL_EXPR)
{
tree func_name = CALL_EXPR_FN (expr);
tree prev_arg = NULL_TREE, arg;
call_expr_arg_iterator iter;
size_t prev_rank = 0;
if (TREE_CODE (func_name) == ADDR_EXPR)
if (!ignore_builtin_fn)
if (is_cilkplus_reduce_builtin (func_name))
/* If it is a built-in function, then we know it returns a
scalar. */
return true;
if (!find_rank (loc, orig_expr, func_name, ignore_builtin_fn, rank))
return false;
FOR_EACH_CALL_EXPR_ARG (arg, iter, expr)
{
if (!find_rank (loc, orig_expr, arg, ignore_builtin_fn, rank))
{
if (prev_arg && EXPR_HAS_LOCATION (prev_arg)
&& prev_rank != *rank)
error_at (EXPR_LOCATION (prev_arg),
"rank mismatch between %qE and %qE", prev_arg,
arg);
else if (prev_arg && prev_rank != *rank)
/* Here the original expression is printed as a "heads-up"
to the programmer. This is because since there is no
location information for the offending argument, the
error could be in some internally generated code that is
not visible for the programmer. Thus, the correct fix
may lie in the original expression. */
error_at (loc, "rank mismatch in expression %qE",
orig_expr);
return false;
}
prev_arg = arg;
prev_rank = *rank;
}
}
else
{
tree prev_arg = NULL_TREE;
for (ii = 0; ii < TREE_CODE_LENGTH (TREE_CODE (expr)); ii++)
{
if (TREE_OPERAND (expr, ii)
&& !find_rank (loc, orig_expr, TREE_OPERAND (expr, ii),
ignore_builtin_fn, rank))
{
if (prev_arg && EXPR_HAS_LOCATION (prev_arg))
error_at (EXPR_LOCATION (prev_arg),
"rank mismatch between %qE and %qE", prev_arg,
TREE_OPERAND (expr, ii));
return false;
}
prev_arg = TREE_OPERAND (expr, ii);
}
}
}
return true;
}
/* Extracts all array notations in NODE and stores them in ARRAY_LIST. If
IGNORE_BUILTIN_FN is set, then array notations inside array notation
specific built-in functions are ignored. The NODE can be constants,
VAR_DECL, PARM_DECLS, STATEMENT_LISTS or full expressions. */
void
extract_array_notation_exprs (tree node, bool ignore_builtin_fn,
vec<tree, va_gc> **array_list)
{
size_t ii = 0;
if (!node)
return;
if (TREE_CODE (node) == ARRAY_NOTATION_REF)
{
vec_safe_push (*array_list, node);
return;
}
if (TREE_CODE (node) == DECL_EXPR)
{
tree x = DECL_EXPR_DECL (node);
if (DECL_INITIAL (x))
extract_array_notation_exprs (DECL_INITIAL (x),
ignore_builtin_fn,
array_list);
}
else if (TREE_CODE (node) == STATEMENT_LIST)
{
tree_stmt_iterator ii_tsi;
for (ii_tsi = tsi_start (node); !tsi_end_p (ii_tsi); tsi_next (&ii_tsi))
extract_array_notation_exprs (*tsi_stmt_ptr (ii_tsi),
ignore_builtin_fn, array_list);
}
else if (TREE_CODE (node) == CALL_EXPR)
{
tree arg;
call_expr_arg_iterator iter;
if (is_cilkplus_reduce_builtin (CALL_EXPR_FN (node)))
{
if (ignore_builtin_fn)
return;
else
{
vec_safe_push (*array_list, node);
return;
}
}
if (is_sec_implicit_index_fn (CALL_EXPR_FN (node)))
{
vec_safe_push (*array_list, node);
return;
}
/* This will extract array notations in function pointers. */
extract_array_notation_exprs (CALL_EXPR_FN (node), ignore_builtin_fn,
array_list);
FOR_EACH_CALL_EXPR_ARG (arg, iter, node)
extract_array_notation_exprs (arg, ignore_builtin_fn, array_list);
}
else
for (ii = 0; ii < TREE_CODE_LENGTH (TREE_CODE (node)); ii++)
if (TREE_OPERAND (node, ii))
extract_array_notation_exprs (TREE_OPERAND (node, ii),
ignore_builtin_fn, array_list);
return;
}
/* LIST contains all the array notations found in *ORIG and ARRAY_OPERAND
contains the expanded ARRAY_REF. E.g., if LIST[<some_index>] contains
an array_notation expression, then ARRAY_OPERAND[<some_index>] contains its
expansion. If *ORIG matches LIST[<some_index>] then *ORIG is set to
ARRAY_OPERAND[<some_index>]. This function recursively steps through
all the sub-trees of *ORIG, if it is larger than a single
ARRAY_NOTATION_REF. */
void
replace_array_notations (tree *orig, bool ignore_builtin_fn,
vec<tree, va_gc> *list,
vec<tree, va_gc> *array_operand)
{
size_t ii = 0;
extern tree build_c_cast (location_t, tree, tree);
tree node = NULL_TREE, node_replacement = NULL_TREE;
if (vec_safe_length (list) == 0)
return;
if (TREE_CODE (*orig) == ARRAY_NOTATION_REF)
{
for (ii = 0; vec_safe_iterate (list, ii, &node); ii++)
if (*orig == node)
{
node_replacement = (*array_operand)[ii];
*orig = node_replacement;
}
}
else if (TREE_CODE (*orig) == STATEMENT_LIST)
{
tree_stmt_iterator ii_tsi;
for (ii_tsi = tsi_start (*orig); !tsi_end_p (ii_tsi); tsi_next (&ii_tsi))
replace_array_notations (tsi_stmt_ptr (ii_tsi), ignore_builtin_fn, list,
array_operand);
}
else if (TREE_CODE (*orig) == CALL_EXPR)
{
tree arg;
call_expr_arg_iterator iter;
if (is_cilkplus_reduce_builtin (CALL_EXPR_FN (*orig)))
{
if (!ignore_builtin_fn)
{
for (ii = 0; vec_safe_iterate (list, ii, &node); ii++)
if (*orig == node)
{
node_replacement = (*array_operand)[ii];
*orig = node_replacement;
}
}
return;
}
if (is_sec_implicit_index_fn (CALL_EXPR_FN (*orig)))
{
for (ii = 0; vec_safe_iterate (list, ii, &node); ii++)
if (*orig == node)
{
node_replacement = (*array_operand)[ii];
*orig = build_c_cast (EXPR_LOCATION (*orig),
TREE_TYPE (*orig), node_replacement);
}
return;
}
/* Fixes array notations in array notations in function pointers. */
replace_array_notations (&CALL_EXPR_FN (*orig), ignore_builtin_fn, list,
array_operand);
ii = 0;
FOR_EACH_CALL_EXPR_ARG (arg, iter, *orig)
{
replace_array_notations (&arg, ignore_builtin_fn, list,
array_operand);
CALL_EXPR_ARG (*orig, ii) = arg;
ii++;
}
}
else
{
for (ii = 0; ii < (size_t) TREE_CODE_LENGTH (TREE_CODE (*orig)); ii++)
if (TREE_OPERAND (*orig, ii))
replace_array_notations (&TREE_OPERAND (*orig, ii), ignore_builtin_fn,
list, array_operand);
}
return;
}
/* Callback for walk_tree. Find all the scalar expressions in *TP and push
them in DATA struct, typecasted to (void *). If *WALK_SUBTREES is set to 0
then do not go into the *TP's subtrees. Since this function steps through
all the subtrees, *TP and TP can be NULL_TREE and NULL, respectively. The
function returns NULL_TREE unconditionally. */
tree
find_inv_trees (tree *tp, int *walk_subtrees, void *data)
{
struct inv_list *i_list = (struct inv_list *) data;
unsigned int ii = 0;
if (!tp || !*tp)
return NULL_TREE;
if (TREE_CONSTANT (*tp))
return NULL_TREE; /* No need to save constant to a variable. */
if (TREE_CODE (*tp) != COMPOUND_EXPR && !contains_array_notation_expr (*tp))
{
vec_safe_push (i_list->list_values, *tp);
*walk_subtrees = 0;
}
else if (TREE_CODE (*tp) == ARRAY_NOTATION_REF
|| TREE_CODE (*tp) == ARRAY_REF
|| TREE_CODE (*tp) == CALL_EXPR)
/* No need to step through the internals of array notation. */
*walk_subtrees = 0;
else
{
*walk_subtrees = 1;
/* This function is used by C and C++ front-ends. In C++, additional
tree codes such as TARGET_EXPR must be eliminated. These codes are
passed into additional_tcodes and are walked through and checked. */
for (ii = 0; ii < vec_safe_length (i_list->additional_tcodes); ii++)
if (TREE_CODE (*tp) == (*(i_list->additional_tcodes))[ii])
*walk_subtrees = 0;
}
return NULL_TREE;
}
/* Callback for walk_tree. Replace all the scalar expressions in *TP with the
appropriate replacement stored in the struct *DATA (typecasted to void*).
The subtrees are not touched if *WALK_SUBTREES is set to zero. */
tree
replace_inv_trees (tree *tp, int *walk_subtrees, void *data)
{
size_t ii = 0;
tree t, r;
struct inv_list *i_list = (struct inv_list *) data;
if (vec_safe_length (i_list->list_values))
{
for (ii = 0; vec_safe_iterate (i_list->list_values, ii, &t); ii++)
if (simple_cst_equal (*tp, t) == 1)
{
vec_safe_iterate (i_list->replacement, ii, &r);
gcc_assert (r != NULL_TREE);
*tp = r;
*walk_subtrees = 0;
}
}
else
*walk_subtrees = 0;
return NULL_TREE;
}
/* Returns true if EXPR or any of its subtrees contain ARRAY_NOTATION_EXPR
node. */
bool
contains_array_notation_expr (tree expr)
{
vec<tree, va_gc> *array_list = NULL;
if (!expr)
return false;
if (TREE_CODE (expr) == FUNCTION_DECL)
if (is_cilkplus_reduce_builtin (expr))
return true;
extract_array_notation_exprs (expr, false, &array_list);
if (vec_safe_length (array_list) == 0)
return false;
else
return true;
}
/* This function will check if OP is a CALL_EXPR that is a built-in array
notation function. If so, then we will return its type to be the type of
the array notation inside. */
tree
find_correct_array_notation_type (tree op)
{
tree fn_arg, return_type = NULL_TREE;
if (op)
{
return_type = TREE_TYPE (op); /* This is the default case. */
if (TREE_CODE (op) == CALL_EXPR)
if (is_cilkplus_reduce_builtin (CALL_EXPR_FN (op)))
{
fn_arg = CALL_EXPR_ARG (op, 0);
if (fn_arg)
return_type = TREE_TYPE (fn_arg);
}
}
return return_type;
}
/* Extracts all the array notation triplet information from LIST and stores
them in the following fields of the 2-D array NODE(size x rank):
START, LENGTH and STRIDE, holding the starting index, length, and stride,
respectively. In addition, it also sets two bool fields, IS_VECTOR and
COUNT_DOWN, in NODE indicating whether a certain value at a certain field
is a vector and if the array is accessed from high to low. */
void
cilkplus_extract_an_triplets (vec<tree, va_gc> *list, size_t size, size_t rank,
vec<vec<struct cilkplus_an_parts> > *node)
{
vec<vec<tree> > array_exprs = vNULL;
node->safe_grow_cleared (size);
array_exprs.safe_grow_cleared (size);
if (rank > 0)
for (size_t ii = 0; ii < size; ii++)
{
(*node)[ii].safe_grow_cleared (rank);
array_exprs[ii].safe_grow_cleared (rank);
}
for (size_t ii = 0; ii < size; ii++)
{
size_t jj = 0;
tree ii_tree = (*list)[ii];
while (ii_tree)
{
if (TREE_CODE (ii_tree) == ARRAY_NOTATION_REF)
{
array_exprs[ii][jj] = ii_tree;
jj++;
ii_tree = ARRAY_NOTATION_ARRAY (ii_tree);
}
else if (TREE_CODE (ii_tree) == ARRAY_REF)
ii_tree = TREE_OPERAND (ii_tree, 0);
else
break;
}
}
for (size_t ii = 0; ii < size; ii++)
if (TREE_CODE ((*list)[ii]) == ARRAY_NOTATION_REF)
for (size_t jj = 0; jj < rank; jj++)
{
tree ii_tree = array_exprs[ii][jj];
(*node)[ii][jj].is_vector = true;
(*node)[ii][jj].value = ARRAY_NOTATION_ARRAY (ii_tree);
(*node)[ii][jj].start
= fold_build1 (CONVERT_EXPR, integer_type_node,
ARRAY_NOTATION_START (ii_tree));
(*node)[ii][jj].length
= fold_build1 (CONVERT_EXPR, integer_type_node,
ARRAY_NOTATION_LENGTH (ii_tree));
(*node)[ii][jj].stride
= fold_build1 (CONVERT_EXPR, integer_type_node,
ARRAY_NOTATION_STRIDE (ii_tree));
}
release_vec_vec (array_exprs);
}
/* Replaces all the __sec_implicit_arg functions in LIST with the induction
variable stored in VAR at the appropriate location pointed by the
__sec_implicit_arg's first parameter. Emits an error if the parameter is
not between 0 and RANK. */
vec <tree, va_gc> *
fix_sec_implicit_args (location_t loc, vec <tree, va_gc> *list,
vec<an_loop_parts> an_loop_info, size_t rank,
tree orig_stmt)
{
vec <tree, va_gc> *array_operand = NULL;
for (size_t ii = 0; ii < vec_safe_length (list); ii++)
if (TREE_CODE ((*list)[ii]) == CALL_EXPR
&& is_sec_implicit_index_fn (CALL_EXPR_FN ((*list)[ii])))
{
int idx = extract_sec_implicit_index_arg (loc, (*list)[ii]);
if (idx < 0)
/* In this case, the returning function would have emitted an
error thus it is not necessary to do so again. */
return NULL;
else if (idx < (int) rank)
vec_safe_push (array_operand, an_loop_info[idx].var);
else
{
error_at (loc, "__sec_implicit_index argument %d must be "
"less than the rank of %qE", idx, orig_stmt);
return NULL;
}
}
else
/* Save the existing value into the array operand. */
vec_safe_push (array_operand, (*list)[ii]);
return array_operand;
}
/* Returns true if NAME is an IDENTIFIER_NODE with identifier "vector",
"__vector", or "__vector__". */
bool
is_cilkplus_vector_p (tree name)
{
return flag_cilkplus && is_attribute_p ("vector", name);
}

View File

@ -1,175 +0,0 @@
/* This file contains routines to construct and validate Cilk Plus
constructs within the C and C++ front ends.
Copyright (C) 2013-2017 Free Software Foundation, Inc.
Contributed by Aldy Hernandez <aldyh@redhat.com>.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "c-common.h"
/* Validate the body of a _Cilk_for construct or a <#pragma simd> for
loop.
Returns true if there were no errors, false otherwise. */
bool
c_check_cilk_loop (location_t loc, tree decl)
{
if (TREE_THIS_VOLATILE (decl))
{
error_at (loc, "iteration variable cannot be volatile");
return false;
}
return true;
}
/* Calculate number of iterations of CILK_FOR. */
tree
cilk_for_number_of_iterations (tree cilk_for)
{
tree t, v, n1, n2, step, type, init, cond, incr, itype;
enum tree_code cond_code;
location_t loc = EXPR_LOCATION (cilk_for);
init = TREE_VEC_ELT (OMP_FOR_INIT (cilk_for), 0);
v = TREE_OPERAND (init, 0);
cond = TREE_VEC_ELT (OMP_FOR_COND (cilk_for), 0);
incr = TREE_VEC_ELT (OMP_FOR_INCR (cilk_for), 0);
type = TREE_TYPE (v);
gcc_assert (TREE_CODE (TREE_TYPE (v)) == INTEGER_TYPE
|| TREE_CODE (TREE_TYPE (v)) == POINTER_TYPE);
n1 = TREE_OPERAND (init, 1);
cond_code = TREE_CODE (cond);
n2 = TREE_OPERAND (cond, 1);
switch (cond_code)
{
case LT_EXPR:
case GT_EXPR:
case NE_EXPR:
break;
case LE_EXPR:
if (POINTER_TYPE_P (TREE_TYPE (n2)))
n2 = fold_build_pointer_plus_hwi_loc (loc, n2, 1);
else
n2 = fold_build2_loc (loc, PLUS_EXPR, TREE_TYPE (n2), n2,
build_int_cst (TREE_TYPE (n2), 1));
cond_code = LT_EXPR;
break;
case GE_EXPR:
if (POINTER_TYPE_P (TREE_TYPE (n2)))
n2 = fold_build_pointer_plus_hwi_loc (loc, n2, -1);
else
n2 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (n2), n2,
build_int_cst (TREE_TYPE (n2), 1));
cond_code = GT_EXPR;
break;
default:
gcc_unreachable ();
}
step = NULL_TREE;
switch (TREE_CODE (incr))
{
case PREINCREMENT_EXPR:
case POSTINCREMENT_EXPR:
step = build_int_cst (TREE_TYPE (v), 1);
break;
case PREDECREMENT_EXPR:
case POSTDECREMENT_EXPR:
step = build_int_cst (TREE_TYPE (v), -1);
break;
case MODIFY_EXPR:
t = TREE_OPERAND (incr, 1);
gcc_assert (TREE_OPERAND (t, 0) == v);
switch (TREE_CODE (t))
{
case PLUS_EXPR:
step = TREE_OPERAND (t, 1);
break;
case POINTER_PLUS_EXPR:
step = fold_convert (ssizetype, TREE_OPERAND (t, 1));
break;
case MINUS_EXPR:
step = TREE_OPERAND (t, 1);
step = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (step), step);
break;
default:
gcc_unreachable ();
}
break;
default:
gcc_unreachable ();
}
itype = type;
if (POINTER_TYPE_P (itype))
itype = signed_type_for (itype);
if (cond_code == NE_EXPR)
{
/* For NE_EXPR, we need to find out if the iterator increases
or decreases from whether step is positive or negative. */
tree stype = itype;
if (TYPE_UNSIGNED (stype))
stype = signed_type_for (stype);
cond = fold_build2_loc (loc, GE_EXPR, boolean_type_node,
fold_convert_loc (loc, stype, step),
build_int_cst (stype, 0));
t = fold_build3_loc (loc, COND_EXPR, itype, cond,
build_int_cst (itype, -1),
build_int_cst (itype, 1));
}
else
t = build_int_cst (itype, (cond_code == LT_EXPR ? -1 : 1));
t = fold_build2_loc (loc, PLUS_EXPR, itype,
fold_convert_loc (loc, itype, step), t);
t = fold_build2_loc (loc, PLUS_EXPR, itype, t,
fold_convert_loc (loc, itype, n2));
t = fold_build2_loc (loc, MINUS_EXPR, itype, t,
fold_convert_loc (loc, itype, n1));
if (TYPE_UNSIGNED (itype) && cond_code == GT_EXPR)
t = fold_build2_loc (loc, TRUNC_DIV_EXPR, itype,
fold_build1_loc (loc, NEGATE_EXPR, itype, t),
fold_build1_loc (loc, NEGATE_EXPR, itype,
fold_convert_loc (loc, itype,
step)));
else if (TYPE_UNSIGNED (itype) && cond_code == NE_EXPR)
{
tree t1
= fold_build2_loc (loc, TRUNC_DIV_EXPR, itype, t,
fold_convert_loc (loc, itype, step));
tree t2
= fold_build2_loc (loc, TRUNC_DIV_EXPR, itype,
fold_build1_loc (loc, NEGATE_EXPR, itype, t),
fold_build1_loc (loc, NEGATE_EXPR, itype,
fold_convert_loc (loc, itype,
step)));
t = fold_build3_loc (loc, COND_EXPR, itype, cond, t1, t2);
}
else
t = fold_build2_loc (loc, TRUNC_DIV_EXPR, itype, t,
fold_convert_loc (loc, itype, step));
cond = fold_build2_loc (loc, cond_code, boolean_type_node, n1, n2);
t = fold_build3_loc (loc, COND_EXPR, itype, cond, t,
build_int_cst (itype, 0));
return t;
}

View File

@ -338,9 +338,6 @@ const struct c_common_resword c_common_reswords[] =
{ "_Atomic", RID_ATOMIC, D_CONLY },
{ "_Bool", RID_BOOL, D_CONLY },
{ "_Complex", RID_COMPLEX, 0 },
{ "_Cilk_spawn", RID_CILK_SPAWN, 0 },
{ "_Cilk_sync", RID_CILK_SYNC, 0 },
{ "_Cilk_for", RID_CILK_FOR, 0 },
{ "_Imaginary", RID_IMAGINARY, D_CONLY },
{ "_Float16", RID_FLOAT16, D_CONLY },
{ "_Float32", RID_FLOAT32, D_CONLY },
@ -3935,9 +3932,6 @@ c_define_builtins (tree va_list_ref_type_node, tree va_list_arg_type_node)
targetm.init_builtins ();
build_common_builtin_nodes ();
if (flag_cilkplus)
cilk_init_builtins ();
}
/* Like get_identifier, but avoid warnings about null arguments when
@ -7569,7 +7563,6 @@ c_common_init_ts (void)
{
MARK_TS_TYPED (C_MAYBE_CONST_EXPR);
MARK_TS_TYPED (EXCESS_PRECISION_EXPR);
MARK_TS_TYPED (ARRAY_NOTATION_REF);
}
/* Build a user-defined numeric literal out of an integer constant type VALUE

View File

@ -55,13 +55,6 @@ DEFTREECODE (USERDEF_LITERAL, "userdef_literal", tcc_exceptional, 3)
or for the purpose of -Wsizeof-pointer-memaccess warning. */
DEFTREECODE (SIZEOF_EXPR, "sizeof_expr", tcc_expression, 1)
/* Array Notation expression.
Operand 0 is the array.
Operand 1 is the starting array index.
Operand 2 contains the number of elements you need to access.
Operand 3 is the stride. */
DEFTREECODE (ARRAY_NOTATION_REF, "array_notation_ref", tcc_reference, 4)
/*
Local variables:
mode:c

View File

@ -184,9 +184,6 @@ enum rid
/* C++ transactional memory. */
RID_ATOMIC_NOEXCEPT, RID_ATOMIC_CANCEL, RID_SYNCHRONIZED,
/* Cilk Plus keywords. */
RID_CILK_SPAWN, RID_CILK_SYNC, RID_CILK_FOR,
/* Objective-C ("AT" reserved words - they are only keywords when
they follow '@') */
RID_AT_ENCODE, RID_AT_END,
@ -586,9 +583,6 @@ extern void push_cleanup (tree, tree, bool);
extern tree build_modify_expr (location_t, tree, tree, enum tree_code,
location_t, tree, tree);
extern tree build_array_notation_expr (location_t, tree, tree, enum tree_code,
location_t, tree, tree);
extern tree build_array_notation_ref (location_t, tree, tree, tree, tree, tree);
extern tree build_indirect_ref (location_t, tree, ref_operator);
extern bool has_c_linkage (const_tree decl);
@ -1255,9 +1249,8 @@ enum c_omp_clause_split
enum c_omp_region_type
{
C_ORT_OMP = 1 << 0,
C_ORT_CILK = 1 << 1,
C_ORT_ACC = 1 << 2,
C_ORT_DECLARE_SIMD = 1 << 3,
C_ORT_ACC = 1 << 1,
C_ORT_DECLARE_SIMD = 1 << 2,
C_ORT_OMP_DECLARE_SIMD = C_ORT_OMP | C_ORT_DECLARE_SIMD
};
@ -1364,23 +1357,6 @@ enum stv_conv {
extern enum stv_conv scalar_to_vector (location_t loc, enum tree_code code,
tree op0, tree op1, bool);
/* In c-cilkplus.c */
extern tree c_validate_cilk_plus_loop (tree *, int *, void *);
extern bool c_check_cilk_loop (location_t, tree);
/* These #defines allow users to access different operands of the
array notation tree. */
#define ARRAY_NOTATION_CHECK(NODE) TREE_CHECK (NODE, ARRAY_NOTATION_REF)
#define ARRAY_NOTATION_ARRAY(NODE) \
TREE_OPERAND (ARRAY_NOTATION_CHECK (NODE), 0)
#define ARRAY_NOTATION_START(NODE) \
TREE_OPERAND (ARRAY_NOTATION_CHECK (NODE), 1)
#define ARRAY_NOTATION_LENGTH(NODE) \
TREE_OPERAND (ARRAY_NOTATION_CHECK (NODE), 2)
#define ARRAY_NOTATION_STRIDE(NODE) \
TREE_OPERAND (ARRAY_NOTATION_CHECK (NODE), 3)
/* This structure holds all the scalar values and its appropriate variable
replacment. It is mainly used by the function that pulls all the invariant
parts that should be executed only once, which comes with array notation
@ -1392,76 +1368,12 @@ struct inv_list
vec<enum tree_code, va_gc> *additional_tcodes;
};
/* This structure holds all the important components that can be extracted
from an ARRAY_NOTATION_REF expression. It is used to pass array notation
information between the functions that are responsible for expansion. */
typedef struct cilkplus_an_parts
{
tree value;
tree start;
tree length;
tree stride;
bool is_vector;
} an_parts;
/* This structure holds the components necessary to create the loop around
the ARRAY_REF that is created using the ARRAY_NOTATION information. */
typedef struct cilkplus_an_loop_parts
{
tree var; /* Loop induction variable. */
tree incr; /* Loop increment/decrement expression. */
tree cmp; /* Loop condition. */
tree ind_init; /* Initialization of the loop induction variable. */
} an_loop_parts;
/* In array-notation-common.c. */
extern HOST_WIDE_INT extract_sec_implicit_index_arg (location_t, tree);
extern bool is_sec_implicit_index_fn (tree);
extern void array_notation_init_builtins (void);
extern struct c_expr fix_array_notation_expr (location_t, enum tree_code,
struct c_expr);
extern bool contains_array_notation_expr (tree);
extern tree expand_array_notation_exprs (tree);
extern tree fix_conditional_array_notations (tree);
extern tree find_correct_array_notation_type (tree);
extern bool length_mismatch_in_expr_p (location_t, vec<vec<an_parts> >);
extern enum built_in_function is_cilkplus_reduce_builtin (tree);
extern bool find_rank (location_t, tree, tree, bool, size_t *);
extern void extract_array_notation_exprs (tree, bool, vec<tree, va_gc> **);
extern void replace_array_notations (tree *, bool, vec<tree, va_gc> *,
vec<tree, va_gc> *);
extern tree find_inv_trees (tree *, int *, void *);
extern tree replace_inv_trees (tree *, int *, void *);
extern tree find_correct_array_notation_type (tree op);
extern void cilkplus_extract_an_triplets (vec<tree, va_gc> *, size_t, size_t,
vec<vec<an_parts> > *);
extern vec <tree, va_gc> *fix_sec_implicit_args
(location_t, vec <tree, va_gc> *, vec<an_loop_parts>, size_t, tree);
extern bool is_cilkplus_vector_p (tree);
/* In cilk.c. */
extern tree insert_cilk_frame (tree);
extern void cilk_init_builtins (void);
extern int gimplify_cilk_spawn (tree *);
extern void cilk_install_body_with_frame_cleanup (tree, tree, void *);
extern bool cilk_detect_spawn_and_unwrap (tree *);
extern bool cilk_set_spawn_marker (location_t, tree);
extern tree build_cilk_sync (void);
extern tree build_cilk_spawn (location_t, tree);
extern tree make_cilk_frame (tree);
extern tree create_cilk_function_exit (tree, bool, bool);
extern void cilk_outline (tree, tree *, void *);
extern bool contains_cilk_spawn_stmt (tree);
extern tree cilk_for_number_of_iterations (tree);
extern bool check_no_cilk (tree, const char *, const char *,
location_t loc = UNKNOWN_LOCATION);
extern bool reject_gcc_builtin (const_tree, location_t = UNKNOWN_LOCATION);
extern bool valid_array_size_p (location_t, tree, tree);
extern bool cilk_ignorable_spawn_rhs_op (tree);
extern bool cilk_recognize_spawn (tree, tree *);
/* In c-warn.c. */
extern void constant_expression_warning (tree);
extern void constant_expression_error (tree);

View File

@ -36,7 +36,6 @@ along with GCC; see the file COPYING3. If not see
#include "gimplify.h"
#include "langhooks.h"
#include "dumpfile.h"
#include "cilk.h"
#include "c-ubsan.h"
/* The gimplification pass converts the language-dependent trees
@ -277,25 +276,6 @@ c_gimplify_expr (tree *expr_p, gimple_seq *pre_p ATTRIBUTE_UNUSED,
break;
}
case CILK_SPAWN_STMT:
gcc_assert(fn_contains_cilk_spawn_p (cfun)
&& cilk_detect_spawn_and_unwrap (expr_p));
if (!seen_error ())
return (enum gimplify_status) gimplify_cilk_spawn (expr_p);
return GS_ERROR;
case MODIFY_EXPR:
case INIT_EXPR:
case CALL_EXPR:
if (fn_contains_cilk_spawn_p (cfun)
&& cilk_detect_spawn_and_unwrap (expr_p)
/* If an error is found, the spawn wrapper is removed and the
original expression (MODIFY/INIT/CALL_EXPR) is processes as
it is supposed to be. */
&& !seen_error ())
return (enum gimplify_status) gimplify_cilk_spawn (expr_p);
default:;
}

View File

@ -536,10 +536,6 @@ c_finish_omp_for (location_t locus, enum tree_code code, tree declv,
bool fail = false;
int i;
if ((code == CILK_SIMD || code == CILK_FOR)
&& !c_check_cilk_loop (locus, TREE_VEC_ELT (declv, 0)))
fail = true;
gcc_assert (TREE_VEC_LENGTH (declv) == TREE_VEC_LENGTH (initv));
gcc_assert (TREE_VEC_LENGTH (declv) == TREE_VEC_LENGTH (condv));
gcc_assert (TREE_VEC_LENGTH (declv) == TREE_VEC_LENGTH (incrv));
@ -671,8 +667,7 @@ c_finish_omp_for (location_t locus, enum tree_code code, tree declv,
{
if (!INTEGRAL_TYPE_P (TREE_TYPE (decl)))
{
if (code != CILK_SIMD && code != CILK_FOR)
cond_ok = false;
cond_ok = false;
}
else if (operand_equal_p (TREE_OPERAND (cond, 1),
TYPE_MIN_VALUE (TREE_TYPE (decl)),
@ -684,7 +679,7 @@ c_finish_omp_for (location_t locus, enum tree_code code, tree declv,
0))
TREE_SET_CODE (cond, TREE_CODE (cond) == NE_EXPR
? LT_EXPR : GE_EXPR);
else if (code != CILK_SIMD && code != CILK_FOR)
else
cond_ok = false;
}

View File

@ -1343,20 +1343,6 @@ c_pp_lookup_pragma (unsigned int id, const char **space, const char **name)
return;
}
if (id == PRAGMA_CILK_SIMD)
{
*space = NULL;
*name = "simd";
return;
}
if (id == PRAGMA_CILK_GRAINSIZE)
{
*space = "cilk";
*name = "grainsize";
return;
}
if (id >= PRAGMA_FIRST_EXTERNAL
&& (id < PRAGMA_FIRST_EXTERNAL + registered_pp_pragmas.length ()))
{
@ -1532,10 +1518,6 @@ init_pragma (void)
omp_pragmas_simd[i].id, true, true);
}
if (flag_cilkplus)
cpp_register_deferred_pragma (parse_in, NULL, "simd", PRAGMA_CILK_SIMD,
true, false);
if (!flag_preprocess_only)
cpp_register_deferred_pragma (parse_in, "GCC", "pch_preprocess",
PRAGMA_GCC_PCH_PREPROCESS, false, false);
@ -1544,10 +1526,6 @@ init_pragma (void)
cpp_register_deferred_pragma (parse_in, "GCC", "ivdep", PRAGMA_IVDEP, false,
false);
if (flag_cilkplus)
cpp_register_deferred_pragma (parse_in, "cilk", "grainsize",
PRAGMA_CILK_GRAINSIZE, true, false);
#ifdef HANDLE_PRAGMA_PACK_WITH_EXPANSION
c_register_pragma_with_expansion (0, "pack", handle_pragma_pack);
#else

View File

@ -67,12 +67,6 @@ enum pragma_kind {
PRAGMA_OMP_THREADPRIVATE,
PRAGMA_OMP_TEAMS,
/* Top level clause to handle all Cilk Plus pragma simd clauses. */
PRAGMA_CILK_SIMD,
/* This pragma handles setting of grainsize for a _Cilk_for. */
PRAGMA_CILK_GRAINSIZE,
PRAGMA_GCC_PCH_PREPROCESS,
PRAGMA_IVDEP,
@ -134,20 +128,8 @@ enum pragma_omp_clause {
PRAGMA_OMP_CLAUSE_UNTIED,
PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR,
/* Clauses for Cilk Plus SIMD-enabled function. */
PRAGMA_CILK_CLAUSE_NOMASK,
PRAGMA_CILK_CLAUSE_MASK,
PRAGMA_CILK_CLAUSE_VECTORLENGTH,
PRAGMA_CILK_CLAUSE_NONE = PRAGMA_OMP_CLAUSE_NONE,
PRAGMA_CILK_CLAUSE_LINEAR = PRAGMA_OMP_CLAUSE_LINEAR,
PRAGMA_CILK_CLAUSE_PRIVATE = PRAGMA_OMP_CLAUSE_PRIVATE,
PRAGMA_CILK_CLAUSE_FIRSTPRIVATE = PRAGMA_OMP_CLAUSE_FIRSTPRIVATE,
PRAGMA_CILK_CLAUSE_LASTPRIVATE = PRAGMA_OMP_CLAUSE_LASTPRIVATE,
PRAGMA_CILK_CLAUSE_REDUCTION = PRAGMA_OMP_CLAUSE_REDUCTION,
PRAGMA_CILK_CLAUSE_UNIFORM = PRAGMA_OMP_CLAUSE_UNIFORM,
/* Clauses for OpenACC. */
PRAGMA_OACC_CLAUSE_ASYNC = PRAGMA_CILK_CLAUSE_VECTORLENGTH + 1,
PRAGMA_OACC_CLAUSE_ASYNC,
PRAGMA_OACC_CLAUSE_AUTO,
PRAGMA_OACC_CLAUSE_COPY,
PRAGMA_OACC_CLAUSE_COPYOUT,

View File

@ -1482,17 +1482,6 @@ c_pretty_printer::postfix_expression (tree e)
pp_c_right_bracket (this);
break;
case ARRAY_NOTATION_REF:
postfix_expression (ARRAY_NOTATION_ARRAY (e));
pp_c_left_bracket (this);
expression (ARRAY_NOTATION_START (e));
pp_colon (this);
expression (ARRAY_NOTATION_LENGTH (e));
pp_colon (this);
expression (ARRAY_NOTATION_STRIDE (e));
pp_c_right_bracket (this);
break;
case CALL_EXPR:
{
call_expr_arg_iterator iter;
@ -2192,7 +2181,6 @@ c_pretty_printer::expression (tree e)
case POSTINCREMENT_EXPR:
case POSTDECREMENT_EXPR:
case ARRAY_REF:
case ARRAY_NOTATION_REF:
case CALL_EXPR:
case COMPONENT_REF:
case BIT_FIELD_REF:

View File

@ -1330,9 +1330,9 @@ Driver
static-libmpxwrappers
Driver
fcilkplus
fcilkplus Undocumented
C ObjC C++ ObjC++ LTO Report Var(flag_cilkplus) Init(0)
Enable Cilk Plus.
Deprecated in GCC 8. This switch has no effect.
fconcepts
C++ ObjC++ Var(flag_concepts)

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,31 @@
2017-11-28 Julia Koval <julia.koval@intel.com>
Sebastian Peryt <sebastian.peryt@intel.com>
* Make-lang.in (c/c-array-notation.o): Remove.
* c-array-notation.c: Delete.
* c-decl.c: Remove cilkplus condition.
* c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
c_parser_cilk_verify_simd, c_parser_array_notation,
c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
c_parser_cilk_simd_fn_vector_attrs,
c_finish_cilk_simd_fn_tokens): Delete.
(c_parser_declaration_or_fndef): Remove cilkplus condition.
(c_parser_direct_declarator_inner): Ditto.
(CILK_SIMD_FN_CLAUSE_MASK): Delete.
(c_parser_attributes, c_parser_compound_statement,
c_parser_statement_after_labels, c_parser_if_statement,
c_parser_switch_statement, c_parser_while_statement,
c_parser_do_statement, c_parser_for_statement,
c_parser_unary_expression, c_parser_postfix_expression,
c_parser_postfix_expression_after_primary,
c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
support.
* c-typeck.c (build_array_ref, build_function_call_vec,
convert_arguments,
lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
c_finish_loop, build_binary_op): Remove cilkplus support.
2017-11-28 Jakub Jelinek <jakub@redhat.com>
* c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead

View File

@ -51,7 +51,7 @@ CFLAGS-c/gccspec.o += $(DRIVER_DEFINES)
# Language-specific object files for C and Objective C.
C_AND_OBJC_OBJS = attribs.o c/c-errors.o c/c-decl.o c/c-typeck.o \
c/c-convert.o c/c-aux-info.o c/c-objc-common.o c/c-parser.o \
c/c-array-notation.o c/c-fold.o c/gimple-parser.o \
c/c-fold.o c/gimple-parser.o \
$(C_COMMON_OBJS) $(C_TARGET_OBJS)
# Language-specific object files for C.

File diff suppressed because it is too large Load Diff

View File

@ -50,7 +50,6 @@ along with GCC; see the file COPYING3. If not see
#include "dumpfile.h"
#include "plugin.h"
#include "c-family/c-ada-spec.h"
#include "cilk.h"
#include "builtins.h"
#include "spellcheck-tree.h"
#include "gcc-rich-location.h"
@ -9388,12 +9387,6 @@ finish_function (void)
/* Tie off the statement tree for this function. */
DECL_SAVED_TREE (fndecl) = pop_stmt_list (DECL_SAVED_TREE (fndecl));
/* If the function has _Cilk_spawn in front of a function call inside it
i.e. it is a spawning function, then add the appropriate Cilk plus
functions inside. */
if (fn_contains_cilk_spawn_p (cfun))
cfun->cilk_frame_decl = insert_cilk_frame (fndecl);
finish_fname_decls ();
/* Complain if there's just no return statement. */

File diff suppressed because it is too large Load Diff

View File

@ -46,7 +46,6 @@ along with GCC; see the file COPYING3. If not see
#include "omp-general.h"
#include "c-family/c-objc.h"
#include "c-family/c-ubsan.h"
#include "cilk.h"
#include "gomp-constants.h"
#include "spellcheck-tree.h"
#include "gcc-rich-location.h"
@ -2593,17 +2592,6 @@ build_array_ref (location_t loc, tree array, tree index)
|| TREE_TYPE (index) == error_mark_node)
return error_mark_node;
if (flag_cilkplus && contains_array_notation_expr (index))
{
size_t rank = 0;
if (!find_rank (loc, index, index, true, &rank))
return error_mark_node;
if (rank > 1)
{
error_at (loc, "rank of the array's index is greater than 1");
return error_mark_node;
}
}
if (TREE_CODE (TREE_TYPE (array)) != ARRAY_TYPE
&& TREE_CODE (TREE_TYPE (array)) != POINTER_TYPE
/* Allow vector[index] but not index[vector]. */
@ -3033,10 +3021,6 @@ build_function_call_vec (location_t loc, vec<location_t> arg_loc,
often rewritten and don't match the original parameter list. */
if (name && !strncmp (IDENTIFIER_POINTER (name), "__atomic_", 9))
origtypes = NULL;
if (flag_cilkplus
&& is_cilkplus_reduce_builtin (function))
origtypes = NULL;
}
if (TREE_CODE (TREE_TYPE (function)) == FUNCTION_TYPE)
function = function_to_pointer_conversion (loc, function);
@ -3261,8 +3245,6 @@ convert_arguments (location_t loc, vec<location_t> arg_loc, tree typelist,
break;
}
}
if (flag_cilkplus && fundecl && is_cilkplus_reduce_builtin (fundecl))
return vec_safe_length (values);
/* Scan the given expressions and types, producing individual
converted arguments. */
@ -4733,7 +4715,6 @@ lvalue_p (const_tree ref)
case INDIRECT_REF:
case ARRAY_REF:
case ARRAY_NOTATION_REF:
case VAR_DECL:
case PARM_DECL:
case RESULT_DECL:
@ -5301,14 +5282,6 @@ build_compound_expr (location_t loc, tree expr1, tree expr2)
tree eptype = NULL_TREE;
tree ret;
if (flag_cilkplus
&& (TREE_CODE (expr1) == CILK_SPAWN_STMT
|| TREE_CODE (expr2) == CILK_SPAWN_STMT))
{
error_at (loc,
"spawned function call cannot be part of a comma expression");
return error_mark_node;
}
expr1_int_operands = EXPR_INT_CONST_OPERANDS (expr1);
if (expr1_int_operands)
expr1 = remove_c_maybe_const_expr (expr1);
@ -10051,7 +10024,6 @@ c_finish_return (location_t loc, tree retval, tree origtype)
tree valtype = TREE_TYPE (TREE_TYPE (current_function_decl)), ret_stmt;
bool no_warning = false;
bool npc = false;
size_t rank = 0;
/* Use the expansion point to handle cases such as returning NULL
in a function returning void. */
@ -10061,25 +10033,6 @@ c_finish_return (location_t loc, tree retval, tree origtype)
warning_at (xloc, 0,
"function declared %<noreturn%> has a %<return%> statement");
if (flag_cilkplus && contains_array_notation_expr (retval))
{
/* Array notations are allowed in a return statement if it is inside a
built-in array notation reduction function. */
if (!find_rank (loc, retval, retval, false, &rank))
return error_mark_node;
if (rank >= 1)
{
error_at (loc, "array notation expression cannot be used as a "
"return value");
return error_mark_node;
}
}
if (flag_cilkplus && retval && contains_cilk_spawn_stmt (retval))
{
error_at (loc, "use of %<_Cilk_spawn%> in a return statement is not "
"allowed");
return error_mark_node;
}
if (retval)
{
tree semantic_type = NULL_TREE;
@ -10425,35 +10378,6 @@ c_finish_if_stmt (location_t if_locus, tree cond, tree then_block,
{
tree stmt;
/* If the condition has array notations, then the rank of the then_block and
else_block must be either 0 or be equal to the rank of the condition. If
the condition does not have array notations then break them up as it is
broken up in a normal expression. */
if (flag_cilkplus && contains_array_notation_expr (cond))
{
size_t then_rank = 0, cond_rank = 0, else_rank = 0;
if (!find_rank (if_locus, cond, cond, true, &cond_rank))
return;
if (then_block
&& !find_rank (if_locus, then_block, then_block, true, &then_rank))
return;
if (else_block
&& !find_rank (if_locus, else_block, else_block, true, &else_rank))
return;
if (cond_rank != then_rank && then_rank != 0)
{
error_at (if_locus, "rank-mismatch between if-statement%'s condition"
" and the then-block");
return;
}
else if (cond_rank != else_rank && else_rank != 0)
{
error_at (if_locus, "rank-mismatch between if-statement%'s condition"
" and the else-block");
return;
}
}
stmt = build3 (COND_EXPR, void_type_node, cond, then_block, else_block);
SET_EXPR_LOCATION (stmt, if_locus);
add_stmt (stmt);
@ -10471,9 +10395,6 @@ c_finish_loop (location_t start_locus, tree cond, tree incr, tree body,
{
tree entry = NULL, exit = NULL, t;
/* In theory could forbid cilk spawn for loop increment expression,
but it should work just fine. */
/* If the condition is zero don't generate a loop construct. */
if (cond && integer_zerop (cond))
{
@ -11037,18 +10958,9 @@ build_binary_op (location_t location, enum tree_code code,
op1 = default_conversion (op1);
}
/* When Cilk Plus is enabled and there are array notations inside op0, then
we check to see if there are builtin array notation functions. If
so, then we take on the type of the array notation inside it. */
if (flag_cilkplus && contains_array_notation_expr (op0))
orig_type0 = type0 = find_correct_array_notation_type (op0);
else
orig_type0 = type0 = TREE_TYPE (op0);
orig_type0 = type0 = TREE_TYPE (op0);
if (flag_cilkplus && contains_array_notation_expr (op1))
orig_type1 = type1 = find_correct_array_notation_type (op1);
else
orig_type1 = type1 = TREE_TYPE (op1);
orig_type1 = type1 = TREE_TYPE (op1);
/* The expression codes of the data types of the arguments tell us
whether the arguments are integers, floating, pointers, etc. */
@ -13292,38 +13204,21 @@ c_finish_omp_clauses (tree clauses, enum c_omp_region_type ort)
"clause on %<simd%> or %<for%> constructs");
OMP_CLAUSE_LINEAR_KIND (c) = OMP_CLAUSE_LINEAR_DEFAULT;
}
if (ort & C_ORT_CILK)
if (!INTEGRAL_TYPE_P (TREE_TYPE (t))
&& TREE_CODE (TREE_TYPE (t)) != POINTER_TYPE)
{
if (!INTEGRAL_TYPE_P (TREE_TYPE (t))
&& !SCALAR_FLOAT_TYPE_P (TREE_TYPE (t))
&& TREE_CODE (TREE_TYPE (t)) != POINTER_TYPE)
{
error_at (OMP_CLAUSE_LOCATION (c),
"linear clause applied to non-integral, "
"non-floating, non-pointer variable with type %qT",
TREE_TYPE (t));
remove = true;
break;
}
error_at (OMP_CLAUSE_LOCATION (c),
"linear clause applied to non-integral non-pointer "
"variable with type %qT", TREE_TYPE (t));
remove = true;
break;
}
else
if (TYPE_ATOMIC (TREE_TYPE (t)))
{
if (!INTEGRAL_TYPE_P (TREE_TYPE (t))
&& TREE_CODE (TREE_TYPE (t)) != POINTER_TYPE)
{
error_at (OMP_CLAUSE_LOCATION (c),
"linear clause applied to non-integral non-pointer "
"variable with type %qT", TREE_TYPE (t));
remove = true;
break;
}
if (TYPE_ATOMIC (TREE_TYPE (t)))
{
error_at (OMP_CLAUSE_LOCATION (c),
"%<_Atomic%> %qD in %<linear%> clause", t);
remove = true;
break;
}
error_at (OMP_CLAUSE_LOCATION (c),
"%<_Atomic%> %qD in %<linear%> clause", t);
remove = true;
break;
}
if (ort == C_ORT_OMP_DECLARE_SIMD)
{
@ -13855,7 +13750,6 @@ c_finish_omp_clauses (tree clauses, enum c_omp_region_type ort)
case OMP_CLAUSE_SIMD:
case OMP_CLAUSE_HINT:
case OMP_CLAUSE_DEFAULTMAP:
case OMP_CLAUSE__CILK_FOR_COUNT_:
case OMP_CLAUSE_NUM_GANGS:
case OMP_CLAUSE_NUM_WORKERS:
case OMP_CLAUSE_VECTOR_LENGTH:
@ -14407,28 +14301,6 @@ c_tree_equal (tree t1, tree t2)
return false;
}
/* Inserts "cleanup" functions after the function-body of FNDECL. FNDECL is a
spawn-helper and BODY is the newly created body for FNDECL. */
void
cilk_install_body_with_frame_cleanup (tree fndecl, tree body, void *w)
{
tree list = alloc_stmt_list ();
tree frame = make_cilk_frame (fndecl);
tree dtor = create_cilk_function_exit (frame, false, true);
add_local_decl (cfun, frame);
DECL_SAVED_TREE (fndecl) = list;
tree body_list = alloc_stmt_list ();
cilk_outline (fndecl, &body, (struct wrapper_data *) w);
body = fold_build_cleanup_point_expr (void_type_node, body);
append_to_statement_list (body, &body_list);
append_to_statement_list (build_stmt (EXPR_LOCATION (body), TRY_FINALLY_EXPR,
body_list, dtor), &list);
}
/* Returns true when the function declaration FNDECL is implicit,
introduced as a result of a call to an otherwise undeclared
function, and false otherwise. */

View File

@ -128,10 +128,6 @@ DEFCIFCODE(USES_COMDAT_LOCAL, CIF_FINAL_ERROR,
DEFCIFCODE(ATTRIBUTE_MISMATCH, CIF_FINAL_ERROR,
N_("function attribute mismatch"))
/* We can't inline because of mismatched caller/callee attributes. */
DEFCIFCODE(CILK_SPAWN, CIF_FINAL_ERROR,
N_("caller function contains cilk spawn"))
/* We proved that the call is unreachable. */
DEFCIFCODE(UNREACHABLE, CIF_FINAL_ERROR,
N_("unreachable"))

View File

@ -1,35 +0,0 @@
/* This file contains the definitions and documentation for the
Cilk Plus builtins used in the GNU compiler.
Copyright (C) 2013-2017 Free Software Foundation, Inc.
Contributed by Balaji V. Iyer <balaji.v.iyer@intel.com>
Intel Corporation.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
DEF_CILK_BUILTIN_STUB (BUILT_IN_CILK_ENTER_FRAME, "__cilkrts_enter_frame_1")
DEF_CILK_BUILTIN_STUB (BUILT_IN_CILK_ENTER_FRAME_FAST,
"__cilkrts_enter_frame_fast_1")
DEF_CILK_BUILTIN_STUB (BUILT_IN_CILK_DETACH, "__cilkrts_detach")
DEF_CILK_BUILTIN_STUB (BUILT_IN_CILK_RETHROW, "__cilkrts_rethrow")
DEF_CILK_BUILTIN_STUB (BUILT_IN_CILK_SYNCHED, "__cilkrts_synched")
DEF_CILK_BUILTIN_STUB (BUILT_IN_CILK_SYNC, "__cilkrts_sync")
DEF_CILK_BUILTIN_STUB (BUILT_IN_CILK_LEAVE_FRAME, "__cilkrts_leave_frame")
DEF_CILK_BUILTIN_STUB (BUILT_IN_CILK_POP_FRAME, "__cilkrts_pop_frame")
DEF_CILK_BUILTIN_STUB (BUILT_IN_CILK_SAVE_FP, "__cilkrts_save_fp_ctrl_state")
DEF_CILK_BUILTIN_STUB (BUILT_IN_CILK_FOR_32, "__cilkrts_cilk_for_32")
DEF_CILK_BUILTIN_STUB (BUILT_IN_CILK_FOR_64, "__cilkrts_cilk_for_64")

View File

@ -1,571 +0,0 @@
/* This file is part of the Intel(R) Cilk(TM) Plus support
This file contains the CilkPlus Intrinsics
Copyright (C) 2013-2017 Free Software Foundation, Inc.
Contributed by Balaji V. Iyer <balaji.v.iyer@intel.com>,
Intel Corporation
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "function.h"
#include "rtl.h"
#include "tree.h"
#include "stringpool.h"
#include "expmed.h"
#include "optabs-query.h"
#include "insn-config.h"
#include "memmodel.h"
#include "emit-rtl.h"
#include "recog.h"
#include "fold-const.h"
#include "stor-layout.h"
#include "langhooks.h"
#include "explow.h"
#include "profile-count.h"
#include "expr.h"
#include "tree-iterator.h"
#include "gimplify.h"
#include "cilk.h"
/* This structure holds all the important fields of the internal structures,
internal built-in functions, and Cilk-specific data types. Explanation of
all the these fielsd are given in cilk.h. */
tree cilk_trees[(int) CILK_TI_MAX];
/* Returns the value in structure FRAME pointed by the FIELD_NUMBER
(e.g. X.y).
FIELD_NUMBER is an index to the structure FRAME_PTR. For details
about these fields, refer to cilk_trees structure in cilk.h and
cilk_init_builtins function in this file. Returns a TREE that is the type
of the field represented by FIELD_NUMBER. If VOLATIL parameter is set
to true then the returning field is set as volatile. */
tree
cilk_dot (tree frame, int field_number, bool volatil)
{
tree field = cilk_trees[field_number];
field = fold_build3 (COMPONENT_REF, TREE_TYPE (field), frame, field,
NULL_TREE);
TREE_THIS_VOLATILE (field) = volatil;
return field;
}
/* Returns the address of a field in FRAME_PTR, pointed by FIELD_NUMBER.
(e.g. (&X)->y). Please see cilk_dot function for explanation of the
FIELD_NUMBER. Returns a tree that is the type of the field represented
by FIELD_NUMBER. If VOLATIL parameter is set to true then the returning
field is set as volatile. */
tree
cilk_arrow (tree frame_ptr, int field_number, bool volatil)
{
return cilk_dot (build_simple_mem_ref (frame_ptr),
field_number, volatil);
}
/* This function will add FIELD of type TYPE to a defined built-in
structure. *NAME is the name of the field to be added. */
static tree
add_field (const char *name, tree type, tree fields)
{
tree t = get_identifier (name);
tree field = build_decl (BUILTINS_LOCATION, FIELD_DECL, t, type);
TREE_CHAIN (field) = fields;
return field;
}
/* This function will define a built-in function of NAME, of type FNTYPE and
register it under the built-in function code CODE. If PUBLISH is set then
the declaration is pushed into the declaration list. CODE is the index
to the cilk_trees array. *NAME is the name of the function to be added. */
static tree
install_builtin (const char *name, tree fntype, enum built_in_function code,
bool publish)
{
tree fndecl = build_fn_decl (name, fntype);
DECL_BUILT_IN_CLASS (fndecl) = BUILT_IN_NORMAL;
DECL_FUNCTION_CODE (fndecl) = code;
if (publish)
{
tree t = lang_hooks.decls.pushdecl (fndecl);
if (t)
fndecl = t;
}
set_builtin_decl (code, fndecl, true);
return fndecl;
}
/* Returns a FUNCTION_DECL of type TYPE whose name is *NAME. */
static tree
declare_cilk_for_builtin (const char *name, tree type,
enum built_in_function code)
{
tree cb, ft, fn;
cb = build_function_type_list (void_type_node,
ptr_type_node, type, type,
NULL_TREE);
cb = build_pointer_type (cb);
ft = build_function_type_list (void_type_node,
cb, ptr_type_node, type,
integer_type_node, NULL_TREE);
fn = install_builtin (name, ft, code, false);
TREE_NOTHROW (fn) = 0;
return fn;
}
/* Creates and initializes all the built-in Cilk keywords functions and three
structures: __cilkrts_stack_frame, __cilkrts_pedigree and __cilkrts_worker.
Detailed information about __cilkrts_stack_frame and
__cilkrts_worker structures are given in libcilkrts/include/internal/abi.h.
__cilkrts_pedigree is described in libcilkrts/include/cilk/common.h. */
void
cilk_init_builtins (void)
{
/* Now build the following __cilkrts_pedigree struct:
struct __cilkrts_pedigree {
uint64_t rank;
struct __cilkrts_pedigree *parent;
} */
tree pedigree_type = lang_hooks.types.make_type (RECORD_TYPE);
tree pedigree_ptr = build_pointer_type (pedigree_type);
tree field = add_field ("rank", uint64_type_node, NULL_TREE);
cilk_trees[CILK_TI_PEDIGREE_RANK] = field;
field = add_field ("parent", pedigree_ptr, field);
cilk_trees[CILK_TI_PEDIGREE_PARENT] = field;
finish_builtin_struct (pedigree_type, "__cilkrts_pedigree_GCC", field,
NULL_TREE);
lang_hooks.types.register_builtin_type (pedigree_type,
"__cilkrts_pedigree_t");
cilk_pedigree_type_decl = pedigree_type;
/* Build the Cilk Stack Frame:
struct __cilkrts_stack_frame {
uint32_t flags;
uint32_t size;
struct __cilkrts_stack_frame *call_parent;
__cilkrts_worker *worker;
void *except_data;
void *ctx[4];
uint32_t mxcsr;
uint16_t fpcsr;
uint16_t reserved;
__cilkrts_pedigree pedigree;
}; */
tree frame = lang_hooks.types.make_type (RECORD_TYPE);
tree frame_ptr = build_pointer_type (frame);
tree worker_type = lang_hooks.types.make_type (RECORD_TYPE);
tree worker_ptr = build_pointer_type (worker_type);
tree s_type_node = build_int_cst (size_type_node, 4);
tree flags = add_field ("flags", uint32_type_node, NULL_TREE);
tree size = add_field ("size", uint32_type_node, flags);
tree parent = add_field ("call_parent", frame_ptr, size);
tree worker = add_field ("worker", worker_ptr, parent);
tree except = add_field ("except_data", frame_ptr, worker);
tree context = add_field ("ctx",
build_array_type (ptr_type_node,
build_index_type (s_type_node)),
except);
tree mxcsr = add_field ("mxcsr", uint32_type_node, context);
tree fpcsr = add_field ("fpcsr", uint16_type_node, mxcsr);
tree reserved = add_field ("reserved", uint16_type_node, fpcsr);
tree pedigree = add_field ("pedigree", pedigree_type, reserved);
/* Now add them to a common structure whose fields are #defined to something
that is used at a later stage. */
cilk_trees[CILK_TI_FRAME_FLAGS] = flags;
cilk_trees[CILK_TI_FRAME_PARENT] = parent;
cilk_trees[CILK_TI_FRAME_WORKER] = worker;
cilk_trees[CILK_TI_FRAME_EXCEPTION] = except;
cilk_trees[CILK_TI_FRAME_CONTEXT] = context;
/* We don't care about reserved, so no need to store it in cilk_trees. */
cilk_trees[CILK_TI_FRAME_PEDIGREE] = pedigree;
TREE_ADDRESSABLE (frame) = 1;
finish_builtin_struct (frame, "__cilkrts_st_frame_GCC", pedigree, NULL_TREE);
cilk_frame_type_decl = frame;
lang_hooks.types.register_builtin_type (frame, "__cilkrts_frame_t");
cilk_frame_ptr_type_decl = build_qualified_type (frame_ptr,
TYPE_QUAL_VOLATILE);
/* Now let's do the following worker struct:
struct __cilkrts_worker {
__cilkrts_stack_frame *volatile *volatile tail;
__cilkrts_stack_frame *volatile *volatile head;
__cilkrts_stack_frame *volatile *volatile exc;
__cilkrts_stack_frame *volatile *volatile protected_tail;
__cilkrts_stack_frame *volatile *ltq_limit;
int32_t self;
global_state_t *g;
local_state *l;
cilkred_map *reducer_map;
__cilkrts_stack_frame *current_stack_frame;
void *reserved;
__cilkrts_worker_sysdep_state *sysdep;
__cilkrts_pedigree pedigree;
} */
tree fptr_volatil_type = build_qualified_type (frame_ptr, TYPE_QUAL_VOLATILE);
tree fptr_volatile_ptr = build_pointer_type (fptr_volatil_type);
tree fptr_vol_ptr_vol = build_qualified_type (fptr_volatile_ptr,
TYPE_QUAL_VOLATILE);
tree g = lang_hooks.types.make_type (RECORD_TYPE);
finish_builtin_struct (g, "__cilkrts_global_state", NULL_TREE, NULL_TREE);
tree l = lang_hooks.types.make_type (RECORD_TYPE);
finish_builtin_struct (l, "__cilkrts_local_state", NULL_TREE, NULL_TREE);
tree sysdep_t = lang_hooks.types.make_type (RECORD_TYPE);
finish_builtin_struct (sysdep_t, "__cilkrts_worker_sysdep_state", NULL_TREE,
NULL_TREE);
field = add_field ("tail", fptr_vol_ptr_vol, NULL_TREE);
cilk_trees[CILK_TI_WORKER_TAIL] = field;
field = add_field ("head", fptr_vol_ptr_vol, field);
field = add_field ("exc", fptr_vol_ptr_vol, field);
field = add_field ("protected_tail", fptr_vol_ptr_vol, field);
field = add_field ("ltq_limit", fptr_volatile_ptr, field);
field = add_field ("self", integer_type_node, field);
field = add_field ("g", build_pointer_type (g), field);
field = add_field ("l", build_pointer_type (g), field);
field = add_field ("reducer_map", ptr_type_node, field);
field = add_field ("current_stack_frame", frame_ptr, field);
cilk_trees[CILK_TI_WORKER_CUR] = field;
field = add_field ("saved_protected_tail", fptr_volatile_ptr, field);
field = add_field ("sysdep", build_pointer_type (sysdep_t), field);
field = add_field ("pedigree", pedigree_type, field);
cilk_trees[CILK_TI_WORKER_PEDIGREE] = field;
finish_builtin_struct (worker_type, "__cilkrts_worker_GCC", field,
NULL_TREE);
tree fptr_arglist = tree_cons (NULL_TREE, frame_ptr, void_list_node);
tree fptr_fun = build_function_type (void_type_node, fptr_arglist);
/* void __cilkrts_enter_frame_1 (__cilkrts_stack_frame *); */
cilk_enter_fndecl = install_builtin ("__cilkrts_enter_frame_1", fptr_fun,
BUILT_IN_CILK_ENTER_FRAME, false);
/* void __cilkrts_enter_frame_fast_1 (__cilkrts_stack_frame *); */
cilk_enter_fast_fndecl =
install_builtin ("__cilkrts_enter_frame_fast_1", fptr_fun,
BUILT_IN_CILK_ENTER_FRAME_FAST, false);
/* void __cilkrts_pop_frame (__cilkrts_stack_frame *); */
cilk_pop_fndecl = install_builtin ("__cilkrts_pop_frame", fptr_fun,
BUILT_IN_CILK_POP_FRAME, false);
/* void __cilkrts_leave_frame (__cilkrts_stack_frame *); */
cilk_leave_fndecl = install_builtin ("__cilkrts_leave_frame", fptr_fun,
BUILT_IN_CILK_LEAVE_FRAME, false);
/* void __cilkrts_sync (__cilkrts_stack_frame *); */
cilk_sync_fndecl = install_builtin ("__cilkrts_sync", fptr_fun,
BUILT_IN_CILK_SYNC, false);
/* void __cilkrts_detach (__cilkrts_stack_frame *); */
cilk_detach_fndecl = install_builtin ("__cilkrts_detach", fptr_fun,
BUILT_IN_CILK_DETACH, false);
/* __cilkrts_rethrow (struct stack_frame *); */
cilk_rethrow_fndecl = install_builtin ("__cilkrts_rethrow", fptr_fun,
BUILT_IN_CILK_RETHROW, false);
TREE_NOTHROW (cilk_rethrow_fndecl) = 0;
/* __cilkrts_save_fp_ctrl_state (__cilkrts_stack_frame *); */
cilk_save_fp_fndecl = install_builtin ("__cilkrts_save_fp_ctrl_state",
fptr_fun, BUILT_IN_CILK_SAVE_FP,
false);
/* __cilkrts_cilk_for_32 (...); */
cilk_for_32_fndecl = declare_cilk_for_builtin ("__cilkrts_cilk_for_32",
unsigned_intSI_type_node,
BUILT_IN_CILK_FOR_32);
/* __cilkrts_cilk_for_64 (...); */
cilk_for_64_fndecl = declare_cilk_for_builtin ("__cilkrts_cilk_for_64",
unsigned_intDI_type_node,
BUILT_IN_CILK_FOR_64);
}
/* Get the appropriate frame arguments for CALL that is of type CALL_EXPR. */
static tree
get_frame_arg (tree call)
{
tree arg, argtype;
gcc_assert (call_expr_nargs (call) >= 1);
arg = CALL_EXPR_ARG (call, 0);
argtype = TREE_TYPE (arg);
gcc_assert (TREE_CODE (argtype) == POINTER_TYPE);
argtype = TREE_TYPE (argtype);
/* If it is passed in as an address, then just use the value directly
since the function is inlined. */
if (TREE_CODE (arg) == ADDR_EXPR)
return TREE_OPERAND (arg, 0);
return arg;
}
/* Expands the __cilkrts_pop_frame function call stored in EXP. */
void
expand_builtin_cilk_pop_frame (tree exp)
{
tree frame = get_frame_arg (exp);
tree parent = cilk_dot (frame, CILK_TI_FRAME_PARENT, 0);
tree clear_parent = build2 (MODIFY_EXPR, void_type_node, parent,
build_int_cst (TREE_TYPE (parent), 0));
expand_expr (clear_parent, const0_rtx, VOIDmode, EXPAND_NORMAL);
/* During LTO, the is_cilk_function flag gets cleared.
If __cilkrts_pop_frame is called, then this definitely must be a
cilk function. */
if (cfun)
cfun->is_cilk_function = 1;
}
/* Expands the cilk_detach function call stored in EXP. */
void
expand_builtin_cilk_detach (tree exp)
{
rtx_insn *insn;
tree fptr = get_frame_arg (exp);
if (fptr == NULL_TREE)
return;
tree parent = cilk_dot (fptr, CILK_TI_FRAME_PARENT, 0);
tree worker = cilk_dot (fptr, CILK_TI_FRAME_WORKER, 0);
tree tail = cilk_arrow (worker, CILK_TI_WORKER_TAIL, 1);
tree faddr = build1 (ADDR_EXPR, cilk_frame_ptr_type_decl, fptr);
tree enter_frame = build_call_expr (cilk_enter_fast_fndecl, 1, faddr);
expand_expr (enter_frame, const0_rtx, VOIDmode, EXPAND_NORMAL);
tree pedigree = cilk_dot (fptr, CILK_TI_FRAME_PEDIGREE, 0);
tree pedigree_rank = cilk_dot (pedigree, CILK_TI_PEDIGREE_RANK, 0);
tree parent_pedigree = cilk_dot (pedigree, CILK_TI_PEDIGREE_PARENT, 0);
tree pedigree_parent = cilk_arrow (parent, CILK_TI_FRAME_PEDIGREE, 0);
tree pedigree_parent_rank = cilk_dot (pedigree_parent,
CILK_TI_PEDIGREE_RANK, 0);
tree pedigree_parent_parent = cilk_dot (pedigree_parent,
CILK_TI_PEDIGREE_PARENT, 0);
tree worker_pedigree = cilk_arrow (worker, CILK_TI_WORKER_PEDIGREE, 1);
tree w_pedigree_rank = cilk_dot (worker_pedigree, CILK_TI_PEDIGREE_RANK, 0);
tree w_pedigree_parent = cilk_dot (worker_pedigree,
CILK_TI_PEDIGREE_PARENT, 0);
rtx wreg = expand_expr (worker, NULL_RTX, Pmode, EXPAND_NORMAL);
if (GET_CODE (wreg) != REG)
wreg = copy_to_reg (wreg);
rtx preg = expand_expr (parent, NULL_RTX, Pmode, EXPAND_NORMAL);
/* sf.pedigree.rank = worker->pedigree.rank. */
tree exp1 = build2 (MODIFY_EXPR, void_type_node, pedigree_rank,
w_pedigree_rank);
expand_expr (exp1, const0_rtx, VOIDmode, EXPAND_NORMAL);
/* sf.pedigree.parent = worker->pedigree.parent. */
exp1 = build2 (MODIFY_EXPR, void_type_node, parent_pedigree,
w_pedigree_parent);
expand_expr (exp1, const0_rtx, VOIDmode, EXPAND_NORMAL);
/* sf.call_parent->pedigree.rank = worker->pedigree.rank. */
exp1 = build2 (MODIFY_EXPR, void_type_node, pedigree_parent_rank,
w_pedigree_rank);
expand_expr (exp1, const0_rtx, VOIDmode, EXPAND_NORMAL);
/* sf.call_parent->pedigree.parent = worker->pedigree.parent. */
exp1 = build2 (MODIFY_EXPR, void_type_node, pedigree_parent_parent,
w_pedigree_parent);
expand_expr (exp1, const0_rtx, VOIDmode, EXPAND_NORMAL);
/* sf->worker.pedigree.rank = 0. */
exp1 = build2 (MODIFY_EXPR, void_type_node, w_pedigree_rank,
build_zero_cst (uint64_type_node));
expand_expr (exp1, const0_rtx, VOIDmode, EXPAND_NORMAL);
/* sf->pedigree.parent = &sf->pedigree. */
exp1 = build2 (MODIFY_EXPR, void_type_node, w_pedigree_parent,
build1 (ADDR_EXPR,
build_pointer_type (cilk_pedigree_type_decl),
pedigree));
expand_expr (exp1, const0_rtx, VOIDmode, EXPAND_NORMAL);
/* TMP <- WORKER.TAIL
*TMP <- PARENT
TMP <- TMP + 1
WORKER.TAIL <- TMP */
HOST_WIDE_INT worker_tail_offset =
tree_to_shwi (DECL_FIELD_OFFSET (cilk_trees[CILK_TI_WORKER_TAIL])) +
tree_to_shwi (DECL_FIELD_BIT_OFFSET (cilk_trees[CILK_TI_WORKER_TAIL])) /
BITS_PER_UNIT;
rtx tmem0 = gen_rtx_MEM (Pmode,
plus_constant (Pmode, wreg, worker_tail_offset));
set_mem_attributes (tmem0, tail, 0);
MEM_NOTRAP_P (tmem0) = 1;
gcc_assert (MEM_VOLATILE_P (tmem0));
rtx treg = copy_to_mode_reg (Pmode, tmem0);
rtx tmem1 = gen_rtx_MEM (Pmode, treg);
set_mem_attributes (tmem1, TREE_TYPE (TREE_TYPE (tail)), 0);
MEM_NOTRAP_P (tmem1) = 1;
emit_move_insn (tmem1, preg);
emit_move_insn (treg, plus_constant (Pmode, treg, GET_MODE_SIZE (Pmode)));
/* There is a release barrier (st8.rel, membar #StoreStore,
sfence, lwsync, etc.) between the two stores. On x86
normal volatile stores have proper semantics; the sfence
would only be needed for nontemporal stores (which we
could generate using the storent optab, for no benefit
in this case).
The predicate may return false even for a REG if this is
the limited release operation that only stores 0. */
enum insn_code icode = direct_optab_handler (sync_lock_release_optab, Pmode);
if (icode != CODE_FOR_nothing
&& insn_data[icode].operand[1].predicate (treg, Pmode)
&& (insn = GEN_FCN (icode) (tmem0, treg)) != NULL_RTX)
emit_insn (insn);
else
emit_move_insn (tmem0, treg);
/* The memory barrier inserted above should not prevent
the load of flags from being moved before the stores,
but in practice it does because it is implemented with
unspec_volatile. In-order RISC machines should
explicitly load flags earlier. */
tree flags = cilk_dot (fptr, CILK_TI_FRAME_FLAGS, 0);
expand_expr (build2 (MODIFY_EXPR, void_type_node, flags,
build2 (BIT_IOR_EXPR, TREE_TYPE (flags), flags,
build_int_cst (TREE_TYPE (flags),
CILK_FRAME_DETACHED))),
const0_rtx, VOIDmode, EXPAND_NORMAL);
}
/* Returns a setjmp CALL_EXPR with FRAME->context as its parameter. */
tree
cilk_call_setjmp (tree frame)
{
tree c = cilk_dot (frame, CILK_TI_FRAME_CONTEXT, false);
c = build1 (ADDR_EXPR, build_pointer_type (ptr_type_node), c);
return build_call_expr (builtin_decl_implicit (BUILT_IN_SETJMP), 1, c);
}
/* This function will expand the _Cilk_sync keyword. */
static tree
expand_cilk_sync (void)
{
tree frame = cfun->cilk_frame_decl;
/* Cilk_sync is converted to the following code:
sf.pedigree = sf.worker->pedigree;
if (frame.flags & CILK_FRAME_UNSYNCHED)
{
__cilkrts_save_fp_state (&sf);
if (!builtin_setjmp (sf.ctx)
__cilkrts_sync (&sf);
else
if (sf.flags & CILK_FRAME_EXCEPTING)
__cilkrts_rethrow (&sf);
}
sf.worker->pedigree.rank = sf.worker->pedigree.rank + 1; */
tree flags = cilk_dot (frame, CILK_TI_FRAME_FLAGS, false);
tree unsynched = fold_build2 (BIT_AND_EXPR, TREE_TYPE (flags), flags,
build_int_cst (TREE_TYPE (flags),
CILK_FRAME_UNSYNCHED));
unsynched = fold_build2 (NE_EXPR, TREE_TYPE (unsynched), unsynched,
build_int_cst (TREE_TYPE (unsynched), 0));
tree frame_addr = build1 (ADDR_EXPR, cilk_frame_ptr_type_decl, frame);
/* Check if exception (0x10) bit is set in the sf->flags. */
tree except_flag = fold_build2 (BIT_AND_EXPR, TREE_TYPE (flags), flags,
build_int_cst (TREE_TYPE (flags),
CILK_FRAME_EXCEPTING));
except_flag = fold_build2 (NE_EXPR, TREE_TYPE (except_flag), except_flag,
build_int_cst (TREE_TYPE (except_flag), 0));
/* If the exception flag is set then call the __cilkrts_rethrow (&sf). */
tree except_cond = fold_build3 (COND_EXPR, void_type_node, except_flag,
build_call_expr (cilk_rethrow_fndecl, 1,
frame_addr),
build_empty_stmt (EXPR_LOCATION (unsynched)));
tree sync_expr = build_call_expr (cilk_sync_fndecl, 1, frame_addr);
tree setjmp_expr = cilk_call_setjmp (frame);
setjmp_expr = fold_build2 (EQ_EXPR, TREE_TYPE (setjmp_expr), setjmp_expr,
build_int_cst (TREE_TYPE (setjmp_expr), 0));
setjmp_expr = fold_build3 (COND_EXPR, void_type_node, setjmp_expr,
sync_expr, except_cond);
tree sync_list = alloc_stmt_list ();
append_to_statement_list (build_call_expr (cilk_save_fp_fndecl, 1,
frame_addr), &sync_list);
append_to_statement_list (setjmp_expr, &sync_list);
tree sync = fold_build3 (COND_EXPR, void_type_node, unsynched, sync_list,
build_empty_stmt (EXPR_LOCATION (unsynched)));
tree parent_pedigree = cilk_dot (frame, CILK_TI_FRAME_PEDIGREE, false);
tree worker = cilk_dot (frame, CILK_TI_FRAME_WORKER, false);
tree worker_pedigree = cilk_arrow (worker, CILK_TI_WORKER_PEDIGREE, false);
tree assign_pedigree = fold_build2 (MODIFY_EXPR, void_type_node,
parent_pedigree, worker_pedigree);
tree w_ped_rank = cilk_dot (unshare_expr (worker_pedigree),
CILK_TI_PEDIGREE_RANK, false);
tree incr_ped_rank = fold_build2 (PLUS_EXPR, TREE_TYPE (w_ped_rank),
w_ped_rank,
build_one_cst (TREE_TYPE (w_ped_rank)));
incr_ped_rank = fold_build2 (MODIFY_EXPR, void_type_node, w_ped_rank,
incr_ped_rank);
tree ret_sync_exp = alloc_stmt_list ();
append_to_statement_list (assign_pedigree, &ret_sync_exp);
append_to_statement_list (sync, &ret_sync_exp);
append_to_statement_list (incr_ped_rank, &ret_sync_exp);
return ret_sync_exp;
}
/* Gimplifies the cilk_sync expression passed in *EXPR_P. Returns GS_ALL_DONE
when finished. */
void
gimplify_cilk_sync (tree *expr_p, gimple_seq *pre_p)
{
tree sync_expr = expand_cilk_sync ();
*expr_p = NULL_TREE;
gimplify_and_add (sync_expr, pre_p);
}

View File

@ -1,109 +0,0 @@
/* This file is part of the Intel(R) Cilk(TM) Plus support
This file contains Cilk Support files.
Copyright (C) 2013-2017 Free Software Foundation, Inc.
Contributed by Balaji V. Iyer <balaji.v.iyer@intel.com>,
Intel Corporation
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#ifndef GCC_CILK_H
#define GCC_CILK_H
/* Frame status bits known to compiler. */
#define CILK_FRAME_UNSYNCHED 0x02
#define CILK_FRAME_DETACHED 0x04
#define CILK_FRAME_EXCEPTING 0x10
#define CILK_FRAME_VERSION (1 << 24)
enum cilk_tree_index {
/* All the built-in functions for Cilk keywords. */
CILK_TI_F_WORKER = 0, /* __cilkrts_get_worker (). */
CILK_TI_F_SYNC, /* __cilkrts_sync (). */
CILK_TI_F_DETACH, /* __cilkrts_detach (...). */
CILK_TI_F_ENTER, /* __cilkrts_enter_frame (...). */
CILK_TI_F_ENTER_FAST, /* __cilkrts_enter_frame_fast (.). */
CILK_TI_F_LEAVE, /* __cilkrts_leave_frame (...). */
CILK_TI_F_POP, /* __cilkrts_pop_frame (...). */
CILK_TI_F_RETHROW, /* __cilkrts_rethrow (...). */
CILK_TI_F_SAVE_FP, /* __cilkrts_save_fp_ctrl_state (...). */
CILK_TI_F_LOOP_32, /* __cilkrts_cilk_for_32 (...). */
CILK_TI_F_LOOP_64, /* __cilkrts_cilk_for_64 (...). */
/* __cilkrts_stack_frame struct fields. */
CILK_TI_FRAME_FLAGS, /* stack_frame->flags. */
CILK_TI_FRAME_PARENT, /* stack_frame->parent. */
CILK_TI_FRAME_WORKER, /* stack_frame->worker. */
CILK_TI_FRAME_EXCEPTION, /* stack_frame->except_data. */
CILK_TI_FRAME_CONTEXT, /* stack_frame->context[4]. */
CILK_TI_FRAME_PEDIGREE, /* stack_frame->pedigree. */
/* __cilkrts_worker struct fields. */
CILK_TI_WORKER_CUR, /* worker->current_stack_frame. */
CILK_TI_WORKER_TAIL, /* worker->tail. */
CILK_TI_WORKER_PEDIGREE, /* worker->pedigree. */
/* __cilkrts_pedigree struct fields. */
CILK_TI_PEDIGREE_RANK, /* pedigree->rank. */
CILK_TI_PEDIGREE_PARENT, /* pedigree->parent. */
/* Types. */
CILK_TI_FRAME_TYPE, /* struct __cilkrts_stack_frame. */
CILK_TI_FRAME_PTR, /* __cilkrts_stack_frame *. */
CILK_TI_WORKER_TYPE, /* struct __cilkrts_worker. */
CILK_TI_PEDIGREE_TYPE, /* struct __cilkrts_pedigree. */
CILK_TI_MAX
};
extern GTY (()) tree cilk_trees[CILK_TI_MAX];
#define cilk_worker_fndecl cilk_trees[CILK_TI_F_WORKER]
#define cilk_sync_fndecl cilk_trees[CILK_TI_F_SYNC]
#define cilk_synched_fndecl cilk_trees[CILK_TI_F_SYNCED]
#define cilk_detach_fndecl cilk_trees[CILK_TI_F_DETACH]
#define cilk_enter_fndecl cilk_trees[CILK_TI_F_ENTER]
#define cilk_enter_fast_fndecl cilk_trees[CILK_TI_F_ENTER_FAST]
#define cilk_leave_fndecl cilk_trees[CILK_TI_F_LEAVE]
#define cilk_rethrow_fndecl cilk_trees[CILK_TI_F_RETHROW]
#define cilk_pop_fndecl cilk_trees[CILK_TI_F_POP]
#define cilk_save_fp_fndecl cilk_trees[CILK_TI_F_SAVE_FP]
#define cilk_for_32_fndecl cilk_trees[CILK_TI_F_LOOP_32]
#define cilk_for_64_fndecl cilk_trees[CILK_TI_F_LOOP_64]
#define cilk_worker_type_fndecl cilk_trees[CILK_TI_WORKER_TYPE]
#define cilk_frame_type_decl cilk_trees[CILK_TI_FRAME_TYPE]
#define cilk_frame_ptr_type_decl cilk_trees[CILK_TI_FRAME_PTR]
#define cilk_pedigree_type_decl cilk_trees[CILK_TI_PEDIGREE_TYPE]
extern void expand_builtin_cilk_detach (tree);
extern void expand_builtin_cilk_pop_frame (tree);
extern tree cilk_arrow (tree, int, bool);
extern tree cilk_dot (tree, int, bool);
extern void cilk_init_builtins (void);
extern void gimplify_cilk_sync (tree *, gimple_seq *);
extern tree cilk_call_setjmp (tree);
/* Returns true if Cilk Plus is enabled and if F->cilk_frame_decl is not
NULL_TREE. */
inline bool
fn_contains_cilk_spawn_p (function *f)
{
return (flag_cilkplus
&& (f->calls_cilk_spawn || f->cilk_frame_decl != NULL_TREE));
}
#endif

View File

@ -1,59 +0,0 @@
/* This file contains the definitions and documentation for the
CilkPlus builtins used in the GNU compiler.
Copyright (C) 2013-2017 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
/* Before including this file, you should define a macro:
DEF_CILKPLUS_BUILTIN (ENUM, NAME, TYPE, ATTRS)
See builtins.def for details. */
DEF_CILKPLUS_BUILTIN (BUILT_IN_CILKPLUS_SEC_REDUCE_ADD,
"__sec_reduce_add", BT_FN_INT_PTR, ATTR_NULL)
DEF_CILKPLUS_BUILTIN (BUILT_IN_CILKPLUS_SEC_REDUCE_MUL,
"__sec_reduce_mul", BT_FN_INT_PTR, ATTR_NULL)
DEF_CILKPLUS_BUILTIN (BUILT_IN_CILKPLUS_SEC_REDUCE_ALL_ZERO,
"__sec_reduce_all_zero", BT_FN_INT_PTR, ATTR_NULL)
DEF_CILKPLUS_BUILTIN (BUILT_IN_CILKPLUS_SEC_REDUCE_ANY_ZERO,
"__sec_reduce_any_zero", BT_FN_INT_PTR, ATTR_NULL)
DEF_CILKPLUS_BUILTIN (BUILT_IN_CILKPLUS_SEC_REDUCE_MAX,
"__sec_reduce_max", BT_FN_INT_PTR, ATTR_NULL)
DEF_CILKPLUS_BUILTIN (BUILT_IN_CILKPLUS_SEC_REDUCE_MIN,
"__sec_reduce_min", BT_FN_INT_PTR, ATTR_NULL)
DEF_CILKPLUS_BUILTIN (BUILT_IN_CILKPLUS_SEC_REDUCE_MIN_IND,
"__sec_reduce_min_ind", BT_FN_INT_PTR, ATTR_NULL)
DEF_CILKPLUS_BUILTIN (BUILT_IN_CILKPLUS_SEC_REDUCE_MAX_IND,
"__sec_reduce_max_ind", BT_FN_INT_PTR, ATTR_NULL)
DEF_CILKPLUS_BUILTIN (BUILT_IN_CILKPLUS_SEC_REDUCE_ANY_NONZERO,
"__sec_reduce_any_nonzero", BT_FN_INT_PTR, ATTR_NULL)
DEF_CILKPLUS_BUILTIN (BUILT_IN_CILKPLUS_SEC_REDUCE_ALL_NONZERO,
"__sec_reduce_all_nonzero", BT_FN_INT_PTR, ATTR_NULL)
DEF_CILKPLUS_BUILTIN (BUILT_IN_CILKPLUS_SEC_REDUCE,
"__sec_reduce", BT_FN_INT_PTR_PTR_PTR, ATTR_NULL)
DEF_CILKPLUS_BUILTIN (BUILT_IN_CILKPLUS_SEC_REDUCE_MUTATING,
"__sec_reduce_mutating", BT_FN_INT_PTR_PTR_PTR, ATTR_NULL)
// FIXME: This probably needs to be rewritten as a keyword.
DEF_CILKPLUS_BUILTIN (BUILT_IN_CILKPLUS_SEC_IMPLICIT_INDEX,
"__sec_implicit_index", BT_FN_INT_INT, ATTR_NULL)
/*
Local variables:
mode:c
End:
*/

View File

@ -185,7 +185,6 @@ extern GTY(()) int darwin_ms_struct;
%{L*} %(link_libgcc) %o %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} \
%{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1): \
%{static|static-libgcc|static-libstdc++|static-libgfortran: libgomp.a%s; : -lgomp } } \
%{fcilkplus:%:include(libcilkrts.spec)%(link_cilkrts)}\
%{fgnu-tm: \
%{static|static-libgcc|static-libstdc++|static-libgfortran: libitm.a%s; : -litm } } \
%{!nostdlib:%{!nodefaultlibs:\

View File

@ -1,3 +1,52 @@
2017-11-28 Julia Koval <julia.koval@intel.com>
Sebastian Peryt <sebastian.peryt@intel.com>
* Make-lang.in (cp/cp-array-notation.o, cp/cp-cilkplus.o): Delete.
* call.c (convert_for_arg_passing, build_cxx_call): Remove cilkplus.
* constexpr.c (potential_constant_expression_1): Ditto.
* cp-array-notation.c: Delete.
* cp-cilkplus.c: Ditto.
* cp-cilkplus.h: Ditto.
* cp-gimplify.c (cp_gimplify_expr, cp_fold_r, cp_genericize): Remove
cilkplus condition.
* cp-objcp-common.c (ARRAY_NOTATION_REF): Delete.
* cp-tree.h (cilkplus_an_triplet_types_ok_p): Delete.
* decl.c (grokfndecl, finish_function): Remove cilkplus condition.
* error.c (dump_decl, dump_expr): Remove ARRAY_NOTATION_REF condition.
* lambda.c (cp-cilkplus.h): Remove.
* parser.c (cp_parser_cilk_simd, cp_parser_cilk_for,
cp_parser_cilk_simd_vectorlength): Delete.
(cp_debug_parser, cp_parser_ctor_initializer_opt_and_function_body,
cp_parser_postfix_expression,
cp_parser_postfix_open_square_expression,
cp_parser_statement, cp_parser_jump_statement,
cp_parser_direct_declarator,
cp_parser_late_return_type_opt, cp_parser_gnu_attribute_list,
cp_parser_omp_clause_name, cp_parser_omp_clause_aligned,
cp_parser_omp_clause_linear, cp_parser_omp_all_clauses,
cp_parser_omp_flush,
cp_parser_omp_for_cond, cp_parser_omp_for_incr,
cp_parser_omp_for_loop_init,
cp_parser_omp_for_loop,
cp_parser_omp_declare_simd): Remove cilkplus support.
(CILK_SIMD_FN_CLAUSE_MASK, cp_parser_late_parsing_cilk_simd_fn_info,
cp_parser_cilk_grainsize): Remove.
(cp_parser_pragma, c_parse_file): Remove cilkplus support.
(cp_parser_cilk_simd_vectorlength, cp_parser_cilk_simd_linear,
cp_parser_cilk_simd_clause_name, cp_parser_cilk_simd_all_clauses,
cp_parser_cilk_simd, cp_parser_cilk_for): Remove.
* parser.h (IN_CILK_SIMD_FOR, IN_CILK_SPAWN): Remove.
* pt.c (tsubst_attribute, tsubst_expr, tsubst_copy_and_build): Remove
cilkplus support.
* semantics.c (finish_goto_stmt, begin_while_stmt, finish_do_body,
finish_init_stmt, finish_switch_cond, simplify_aggr_init_expr,
finish_omp_clauses, finish_omp_clauses, finish_omp_for): Remove
cilkplus
support.
* tree.c (lvalue_kind): Remove ARRAY_NOTATION_REF conditon.
* typeck.c (cp_build_array_ref, cp_build_compound_expr,
check_return_expr): Remove cilkplus support.
2017-11-28 Jakub Jelinek <jakub@redhat.com>
* cp-gimplify.c (genericize_switch_stmt): Build SWITCH_EXPR using

View File

@ -73,7 +73,7 @@ CXX_C_OBJS = attribs.o incpath.o \
# Language-specific object files for C++ and Objective C++.
CXX_AND_OBJCXX_OBJS = \
cp/call.o cp/class.o cp/constexpr.o cp/constraint.o \
cp/cp-array-notation.o cp/cp-cilkplus.o cp/cp-gimplify.o \
cp/cp-gimplify.o \
cp/cp-objcp-common.o cp/cp-ubsan.o \
cp/cvt.o cp/cxx-pretty-print.o \
cp/decl.o cp/decl2.o cp/dump.o \

View File

@ -7422,9 +7422,6 @@ convert_for_arg_passing (tree type, tree val, tsubst_flags_t complain)
int
magic_varargs_p (tree fn)
{
if (flag_cilkplus && is_cilkplus_reduce_builtin (fn) != BUILT_IN_NONE)
return 2;
if (DECL_BUILT_IN_CLASS (fn) == BUILT_IN_NORMAL)
switch (DECL_FUNCTION_CODE (fn))
{
@ -8650,38 +8647,6 @@ build_cxx_call (tree fn, int nargs, tree *argarray,
maybe_warn_class_memaccess (loc, fndecl, argarray);
}
/* If it is a built-in array notation function, then the return type of
the function is the element type of the array passed in as array
notation (i.e. the first parameter of the function). */
if (flag_cilkplus && TREE_CODE (fn) == CALL_EXPR)
{
enum built_in_function bif =
is_cilkplus_reduce_builtin (CALL_EXPR_FN (fn));
if (bif == BUILT_IN_CILKPLUS_SEC_REDUCE_ADD
|| bif == BUILT_IN_CILKPLUS_SEC_REDUCE_MUL
|| bif == BUILT_IN_CILKPLUS_SEC_REDUCE_MAX
|| bif == BUILT_IN_CILKPLUS_SEC_REDUCE_MIN
|| bif == BUILT_IN_CILKPLUS_SEC_REDUCE
|| bif == BUILT_IN_CILKPLUS_SEC_REDUCE_MUTATING)
{
if (call_expr_nargs (fn) == 0)
{
error_at (EXPR_LOCATION (fn), "Invalid builtin arguments");
return error_mark_node;
}
/* for bif == BUILT_IN_CILKPLUS_SEC_REDUCE_ALL_ZERO or
BUILT_IN_CILKPLUS_SEC_REDUCE_ANY_ZERO or
BUILT_IN_CILKPLUS_SEC_REDUCE_ANY_NONZERO or
BUILT_IN_CILKPLUS_SEC_REDUCE_ALL_NONZERO or
BUILT_IN_CILKPLUS_SEC_REDUCE_MIN_IND or
BUILT_IN_CILKPLUS_SEC_REDUCE_MAX_IND
The pre-defined return-type is the correct one. */
tree array_ntn = CALL_EXPR_ARG (fn, 0);
TREE_TYPE (fn) = TREE_TYPE (array_ntn);
return fn;
}
}
if (VOID_TYPE_P (TREE_TYPE (fn)))
return fn;

View File

@ -5563,8 +5563,6 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now,
case OACC_ENTER_DATA:
case OACC_EXIT_DATA:
case OACC_UPDATE:
case CILK_SIMD:
case CILK_FOR:
/* GCC internal stuff. */
case VA_ARG_EXPR:
case OBJ_TYPE_REF:
@ -5849,11 +5847,6 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now,
return false;
return true;
case CILK_SYNC_STMT:
case CILK_SPAWN_STMT:
case ARRAY_NOTATION_REF:
return false;
case FMA_EXPR:
case VEC_PERM_EXPR:
for (i = 0; i < 3; ++i)

File diff suppressed because it is too large Load Diff

View File

@ -1,240 +0,0 @@
/* This file is part of the Intel(R) Cilk(TM) Plus support
This file contains routines to handle Cilk Plus specific
routines for the C++ Compiler.
Copyright (C) 2013-2017 Free Software Foundation, Inc.
Contributed by Aldy Hernandez <aldyh@redhat.com>.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "cp-tree.h"
#include "tree-iterator.h"
#include "cilk.h"
#include "c-family/c-common.h"
/* Return TRUE if T is a FUNCTION_DECL for a type-conversion operator. */
static bool
is_conversion_operator_function_decl_p (tree t)
{
if (TREE_CODE (t) != FUNCTION_DECL)
return false;
return DECL_CONV_FN_P (t);
}
/* Recursively traverse EXP to search for a CILK_SPAWN_STMT subtree.
Return the CILK_SPAWN_STMT subtree if found; otherwise, the last subtree
searched. */
static tree
find_spawn (tree exp)
{
/* Happens with C++ TARGET_EXPR. */
if (exp == NULL_TREE)
return exp;
if (cilk_ignorable_spawn_rhs_op (exp))
return find_spawn (TREE_OPERAND (exp, 0));
switch (TREE_CODE (exp))
{
case AGGR_INIT_EXPR:
{
/* Check for initialization via a constructor call that represents
implicit conversion. */
if (AGGR_INIT_VIA_CTOR_P (exp) && aggr_init_expr_nargs (exp) == 2)
return find_spawn (AGGR_INIT_EXPR_ARG (exp, 1));
/* Check for initialization via a call to a type-conversion
operator. */
tree fn = AGGR_INIT_EXPR_FN (exp);
if (TREE_CODE (fn) == ADDR_EXPR
&& is_conversion_operator_function_decl_p (TREE_OPERAND (fn, 0))
&& aggr_init_expr_nargs (exp) == 1)
return find_spawn (AGGR_INIT_EXPR_ARG (exp, 0));
}
break;
case CALL_EXPR:
{
/* Check for a call to a type-conversion operator. */
tree fndecl = TREE_OPERAND (CALL_EXPR_FN (exp), 0);
if (is_conversion_operator_function_decl_p (fndecl)
&& call_expr_nargs (exp) == 1)
return find_spawn (CALL_EXPR_ARG (exp, 0));
}
break;
case TARGET_EXPR:
return find_spawn (TARGET_EXPR_INITIAL (exp));
case CLEANUP_POINT_EXPR:
case COMPOUND_EXPR:
case EXPR_STMT:
return find_spawn (TREE_OPERAND (exp, 0));
default:
break;
}
return exp;
}
/* Return true if *EXP0 is a recognized form of spawn. Recognized forms
are, after conversion to void, a call expression at outer level or an
assignment at outer level with the right hand side being a spawned call.
In addition to this, it also unwraps the CILK_SPAWN_STMT cover from the
CALL_EXPR that is being spawned.
Note that `=' in C++ may turn into a CALL_EXPR rather than a
MODIFY_EXPR. */
bool
cilk_cp_detect_spawn_and_unwrap (tree *exp0)
{
tree exp = *exp0;
if (!TREE_SIDE_EFFECTS (exp))
return false;
/* Strip off any conversion to void. It does not affect whether spawn
is supported here. */
if (TREE_CODE (exp) == CONVERT_EXPR && VOID_TYPE_P (TREE_TYPE (exp)))
exp = TREE_OPERAND (exp, 0);
if (TREE_CODE (exp) == MODIFY_EXPR || TREE_CODE (exp) == INIT_EXPR)
exp = TREE_OPERAND (exp, 1);
exp = find_spawn (exp);
if (exp == NULL_TREE)
return false;
/* Now we should have a CALL_EXPR with a CILK_SPAWN_STMT wrapper around
it, or return false. */
return cilk_recognize_spawn (exp, exp0);
}
/* Callback for cp_walk_tree to validate the body of a pragma simd loop
or _cilk_for loop.
This function is passed in as a function pointer to walk_tree. *TP is
the current tree pointer, *WALK_SUBTREES is set to 0 by this function if
recursing into TP's subtrees is unnecessary. *DATA is a bool variable that
is set to false if an error has occurred. */
static tree
cpp_validate_cilk_plus_loop_aux (tree *tp, int *walk_subtrees, void *data)
{
bool *valid = (bool *) data;
if (!tp || !*tp)
return NULL_TREE;
location_t loc = EXPR_LOCATION (*tp);
if (TREE_CODE (*tp) == THROW_EXPR)
{
error_at (loc, "throw expressions are not allowed inside loops "
"marked with pragma simd");
*walk_subtrees = 0;
*valid = false;
}
else if (TREE_CODE (*tp) == TRY_BLOCK)
{
error_at (loc, "try statements are not allowed inside loops marked "
"with #pragma simd");
*valid = false;
*walk_subtrees = 0;
}
return NULL_TREE;
}
/* Walks through all the subtrees of BODY using walk_tree to make sure
invalid statements/expressions are not found inside BODY. Returns
false if any invalid statements are found. */
bool
cpp_validate_cilk_plus_loop (tree body)
{
bool valid = true;
cp_walk_tree (&body, cpp_validate_cilk_plus_loop_aux,
(void *) &valid, NULL);
return valid;
}
/* Sets the EXCEPTION bit (0x10) in the FRAME.flags field. */
static tree
set_cilk_except_flag (tree frame)
{
tree flags = cilk_dot (frame, CILK_TI_FRAME_FLAGS, 0);
flags = build2 (MODIFY_EXPR, void_type_node, flags,
build2 (BIT_IOR_EXPR, TREE_TYPE (flags), flags,
build_int_cst (TREE_TYPE (flags),
CILK_FRAME_EXCEPTING)));
return flags;
}
/* Sets the frame.EXCEPT_DATA field to the head of the exception pointer. */
static tree
set_cilk_except_data (tree frame)
{
tree except_data = cilk_dot (frame, CILK_TI_FRAME_EXCEPTION, 0);
tree uresume_fn = builtin_decl_implicit (BUILT_IN_EH_POINTER);
tree ret_expr;
uresume_fn = build_call_expr (uresume_fn, 1,
build_int_cst (integer_type_node, 0));
ret_expr = build2 (MODIFY_EXPR, void_type_node, except_data, uresume_fn);
return ret_expr;
}
/* Installs BODY into function FNDECL with appropriate exception handling
code. WD holds information of wrapper function used to pass into the
outlining function, cilk_outline. */
void
cilk_install_body_with_frame_cleanup (tree fndecl, tree orig_body, void *wd)
{
tree frame = make_cilk_frame (fndecl);
tree dtor = create_cilk_function_exit (frame, false, false);
add_local_decl (cfun, frame);
cfun->language = ggc_cleared_alloc<language_function> ();
location_t loc = EXPR_LOCATION (orig_body);
tree list = alloc_stmt_list ();
DECL_SAVED_TREE (fndecl) = list;
tree body = alloc_stmt_list ();
cilk_outline (fndecl, &orig_body, (struct wrapper_data *) wd);
append_to_statement_list (orig_body, &body);
if (flag_exceptions)
{
tree except_flag = set_cilk_except_flag (frame);
tree except_data = set_cilk_except_data (frame);
tree catch_list = alloc_stmt_list ();
append_to_statement_list (except_flag, &catch_list);
append_to_statement_list (except_data, &catch_list);
body = create_try_catch_expr (body, catch_list);
}
append_to_statement_list (build_stmt (loc, TRY_FINALLY_EXPR, body, dtor),
&list);
}

View File

@ -1,28 +0,0 @@
/* C++-specific tree lowering bits; see also c-gimplify.c and tree-gimple.c.
Copyright (C) 2002-2017 Free Software Foundation, Inc.
Contributed by Jason Merrill <jason@redhat.com>
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#ifndef GCC_CP_CILKPLUS_H
#define GCC_CP_CILKPLUS_H
extern bool cilk_cp_detect_spawn_and_unwrap (tree *);
extern bool cpp_validate_cilk_plus_loop (tree);
#endif /* ! GCC_CP_CILKPLUS_H */

View File

@ -31,8 +31,6 @@ along with GCC; see the file COPYING3. If not see
#include "tree-iterator.h"
#include "gimplify.h"
#include "c-family/c-ubsan.h"
#include "cilk.h"
#include "cp-cilkplus.h"
#include "stringpool.h"
#include "attribs.h"
#include "asan.h"
@ -628,14 +626,6 @@ cp_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
LHS of an assignment might also be involved in the RHS, as in bug
25979. */
case INIT_EXPR:
if (fn_contains_cilk_spawn_p (cfun))
{
if (cilk_cp_detect_spawn_and_unwrap (expr_p))
return (enum gimplify_status) gimplify_cilk_spawn (expr_p);
if (seen_error () && contains_cilk_spawn_stmt (*expr_p))
return GS_ERROR;
}
cp_gimplify_init_expr (expr_p);
if (TREE_CODE (*expr_p) != INIT_EXPR)
return GS_OK;
@ -643,10 +633,6 @@ cp_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
case MODIFY_EXPR:
modify_expr_case:
{
if (fn_contains_cilk_spawn_p (cfun)
&& cilk_cp_detect_spawn_and_unwrap (expr_p)
&& !seen_error ())
return (enum gimplify_status) gimplify_cilk_spawn (expr_p);
/* If the back end isn't clever enough to know that the lhs and rhs
types are the same, add an explicit conversion. */
tree op0 = TREE_OPERAND (*expr_p, 0);
@ -759,19 +745,7 @@ cp_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
}
break;
case CILK_SPAWN_STMT:
gcc_assert(fn_contains_cilk_spawn_p (cfun)
&& cilk_cp_detect_spawn_and_unwrap (expr_p));
if (!seen_error ())
return (enum gimplify_status) gimplify_cilk_spawn (expr_p);
return GS_ERROR;
case CALL_EXPR:
if (fn_contains_cilk_spawn_p (cfun)
&& cilk_cp_detect_spawn_and_unwrap (expr_p)
&& !seen_error ())
return (enum gimplify_status) gimplify_cilk_spawn (expr_p);
ret = GS_OK;
if (!CALL_EXPR_FN (*expr_p))
/* Internal function call. */;
@ -1001,8 +975,7 @@ cp_fold_r (tree *stmt_p, int *walk_subtrees, void *data)
code = TREE_CODE (stmt);
if (code == OMP_FOR || code == OMP_SIMD || code == OMP_DISTRIBUTE
|| code == OMP_TASKLOOP || code == CILK_FOR || code == CILK_SIMD
|| code == OACC_LOOP)
|| code == OMP_TASKLOOP || code == OACC_LOOP)
{
tree x;
int i, n;
@ -1682,12 +1655,6 @@ cp_genericize (tree fndecl)
bc_label[bc_break] = NULL_TREE;
bc_label[bc_continue] = NULL_TREE;
/* Expand all the array notations here. */
if (flag_cilkplus
&& contains_array_notation_expr (DECL_SAVED_TREE (fndecl)))
DECL_SAVED_TREE (fndecl)
= expand_array_notation_exprs (DECL_SAVED_TREE (fndecl));
/* We do want to see every occurrence of the parms, so we can't just use
walk_tree's hash functionality. */
cp_genericize_tree (&DECL_SAVED_TREE (fndecl), true);

View File

@ -468,7 +468,6 @@ cp_common_init_ts (void)
MARK_TS_TYPED (USING_STMT);
MARK_TS_TYPED (LAMBDA_EXPR);
MARK_TS_TYPED (CTOR_INITIALIZER);
MARK_TS_TYPED (ARRAY_NOTATION_REF);
MARK_TS_TYPED (REQUIRES_EXPR);
MARK_TS_TYPED (UNARY_LEFT_FOLD_EXPR);
MARK_TS_TYPED (UNARY_RIGHT_FOLD_EXPR);

View File

@ -7358,11 +7358,6 @@ extern void vtv_save_class_info (tree);
extern void vtv_recover_class_info (void);
extern void vtv_build_vtable_verify_fndecl (void);
/* In cp/cp-array-notations.c */
extern tree expand_array_notation_exprs (tree);
bool cilkplus_an_triplet_types_ok_p (location_t, tree, tree, tree,
tree);
/* In constexpr.c */
extern void fini_constexpr (void);
extern bool literal_type_p (tree);

View File

@ -48,7 +48,6 @@ along with GCC; see the file COPYING3. If not see
#include "c-family/c-ubsan.h"
#include "debug.h"
#include "plugin.h"
#include "cilk.h"
#include "builtins.h"
#include "gimplify.h"
#include "asan.h"
@ -8751,7 +8750,7 @@ grokfndecl (tree ctype,
if (TYPE_NOTHROW_P (type) || nothrow_libfn_p (decl))
TREE_NOTHROW (decl) = 1;
if (flag_openmp || flag_openmp_simd || flag_cilkplus)
if (flag_openmp || flag_openmp_simd)
{
/* Adjust "omp declare simd" attributes. */
tree ods = lookup_attribute ("omp declare simd", *attrlist);
@ -15468,9 +15467,6 @@ finish_function (bool inline_p)
/* If we're saving up tree structure, tie off the function now. */
DECL_SAVED_TREE (fndecl) = pop_stmt_list (DECL_SAVED_TREE (fndecl));
if (fn_contains_cilk_spawn_p (cfun) && !processing_template_decl)
cfun->cilk_frame_decl = insert_cilk_frame (fndecl);
finish_fname_decls ();
/* If this function can't throw any exceptions, remember that. */

View File

@ -1201,17 +1201,6 @@ dump_decl (cxx_pretty_printer *pp, tree t, int flags)
pp_cxx_right_bracket (pp);
break;
case ARRAY_NOTATION_REF:
dump_decl (pp, ARRAY_NOTATION_ARRAY (t), flags | TFF_EXPR_IN_PARENS);
pp_cxx_left_bracket (pp);
dump_decl (pp, ARRAY_NOTATION_START (t), flags | TFF_EXPR_IN_PARENS);
pp_colon (pp);
dump_decl (pp, ARRAY_NOTATION_LENGTH (t), flags | TFF_EXPR_IN_PARENS);
pp_colon (pp);
dump_decl (pp, ARRAY_NOTATION_STRIDE (t), flags | TFF_EXPR_IN_PARENS);
pp_cxx_right_bracket (pp);
break;
/* So that we can do dump_decl on an aggr type. */
case RECORD_TYPE:
case UNION_TYPE:
@ -2305,17 +2294,6 @@ dump_expr (cxx_pretty_printer *pp, tree t, int flags)
pp_cxx_right_bracket (pp);
break;
case ARRAY_NOTATION_REF:
dump_expr (pp, ARRAY_NOTATION_ARRAY (t), flags | TFF_EXPR_IN_PARENS);
pp_cxx_left_bracket (pp);
dump_expr (pp, ARRAY_NOTATION_START (t), flags | TFF_EXPR_IN_PARENS);
pp_colon (pp);
dump_expr (pp, ARRAY_NOTATION_LENGTH (t), flags | TFF_EXPR_IN_PARENS);
pp_colon (pp);
dump_expr (pp, ARRAY_NOTATION_STRIDE (t), flags | TFF_EXPR_IN_PARENS);
pp_cxx_right_bracket (pp);
break;
case UNARY_PLUS_EXPR:
dump_unary_op (pp, "+", t, flags);
break;

View File

@ -30,7 +30,6 @@ along with GCC; see the file COPYING3. If not see
#include "tree-iterator.h"
#include "toplev.h"
#include "gimplify.h"
#include "cp-cilkplus.h"
/* Constructor for a lambda expression. */

File diff suppressed because it is too large Load Diff

View File

@ -309,8 +309,6 @@ struct GTY(()) cp_parser {
#define IN_OMP_BLOCK 4
#define IN_OMP_FOR 8
#define IN_IF_STMT 16
#define IN_CILK_SIMD_FOR 32
#define IN_CILK_SPAWN 64
unsigned char in_statement;
/* TRUE if we are presently parsing the body of a switch statement.

View File

@ -10135,7 +10135,7 @@ tsubst_attribute (tree t, tree *decl_p, tree args,
tree val = TREE_VALUE (t);
if (val == NULL_TREE)
/* Nothing to do. */;
else if ((flag_openmp || flag_openmp_simd || flag_cilkplus)
else if ((flag_openmp || flag_openmp_simd)
&& is_attribute_p ("omp declare simd",
get_attribute_name (t)))
{
@ -16418,8 +16418,6 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl,
case OMP_FOR:
case OMP_SIMD:
case CILK_SIMD:
case CILK_FOR:
case OMP_DISTRIBUTE:
case OMP_TASKLOOP:
case OACC_LOOP:
@ -16431,9 +16429,7 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl,
enum c_omp_region_type ort = C_ORT_OMP;
int i;
if (TREE_CODE (t) == CILK_SIMD || TREE_CODE (t) == CILK_FOR)
ort = C_ORT_CILK;
else if (TREE_CODE (t) == OACC_LOOP)
if (TREE_CODE (t) == OACC_LOOP)
ort = C_ORT_ACC;
r = push_omp_privatization_clauses (OMP_FOR_INIT (t) == NULL_TREE);
@ -16712,13 +16708,6 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl,
error ("use %<...%> to expand argument pack");
RETURN (error_mark_node);
case CILK_SPAWN_STMT:
cfun->calls_cilk_spawn = 1;
RETURN (build_cilk_spawn (EXPR_LOCATION (t), RECUR (CILK_SPAWN_FN (t))));
case CILK_SYNC_STMT:
RETURN (build_cilk_sync ());
case COMPOUND_EXPR:
tmp = RECUR (TREE_OPERAND (t, 0));
if (tmp == NULL_TREE)
@ -17312,17 +17301,6 @@ tsubst_copy_and_build (tree t,
RECUR (TREE_OPERAND (t, 1)),
complain|decltype_flag));
case ARRAY_NOTATION_REF:
{
tree start_index, length, stride;
op1 = tsubst_non_call_postfix_expression (ARRAY_NOTATION_ARRAY (t),
args, complain, in_decl);
start_index = RECUR (ARRAY_NOTATION_START (t));
length = RECUR (ARRAY_NOTATION_LENGTH (t));
stride = RECUR (ARRAY_NOTATION_STRIDE (t));
RETURN (build_array_notation_ref (EXPR_LOCATION (t), op1, start_index,
length, stride, TREE_TYPE (op1)));
}
case SIZEOF_EXPR:
if (PACK_EXPANSION_P (TREE_OPERAND (t, 0))
|| ARGUMENT_PACK_P (TREE_OPERAND (t, 0)))

View File

@ -614,10 +614,6 @@ finish_goto_stmt (tree destination)
TREE_USED (destination) = 1;
else
{
if (check_no_cilk (destination,
"Cilk array notation cannot be used as a computed goto expression",
"%<_Cilk_spawn%> statement cannot be used as a computed goto expression"))
destination = error_mark_node;
destination = mark_rvalue_use (destination);
if (!processing_template_decl)
{
@ -804,10 +800,6 @@ begin_while_stmt (void)
void
finish_while_stmt_cond (tree cond, tree while_stmt, bool ivdep)
{
if (check_no_cilk (cond,
"Cilk array notation cannot be used as a condition for while statement",
"%<_Cilk_spawn%> statement cannot be used as a condition for while statement"))
cond = error_mark_node;
cond = maybe_convert_cond (cond);
finish_cond (&WHILE_COND (while_stmt), cond);
begin_maybe_infinite_loop (cond);
@ -864,10 +856,6 @@ finish_do_body (tree do_stmt)
void
finish_do_stmt (tree cond, tree do_stmt, bool ivdep)
{
if (check_no_cilk (cond,
"Cilk array notation cannot be used as a condition for a do-while statement",
"%<_Cilk_spawn%> statement cannot be used as a condition for a do-while statement"))
cond = error_mark_node;
cond = maybe_convert_cond (cond);
end_maybe_infinite_loop (cond);
if (ivdep && cond != error_mark_node)
@ -984,10 +972,6 @@ finish_init_stmt (tree for_stmt)
void
finish_for_cond (tree cond, tree for_stmt, bool ivdep)
{
if (check_no_cilk (cond,
"Cilk array notation cannot be used in a condition for a for-loop",
"%<_Cilk_spawn%> statement cannot be used in a condition for a for-loop"))
cond = error_mark_node;
cond = maybe_convert_cond (cond);
finish_cond (&FOR_COND (for_stmt), cond);
begin_maybe_infinite_loop (cond);
@ -1152,11 +1136,6 @@ finish_switch_cond (tree cond, tree switch_stmt)
{
tree orig_type = NULL;
if (check_no_cilk (cond,
"Cilk array notation cannot be used as a condition for switch statement",
"%<_Cilk_spawn%> statement cannot be used as a condition for switch statement"))
cond = error_mark_node;
if (!processing_template_decl)
{
/* Convert the condition to an integer or enumeration type. */
@ -4080,8 +4059,6 @@ simplify_aggr_init_expr (tree *tp)
= CALL_EXPR_OPERATOR_SYNTAX (aggr_init_expr);
CALL_EXPR_ORDERED_ARGS (call_expr) = CALL_EXPR_ORDERED_ARGS (aggr_init_expr);
CALL_EXPR_REVERSE_ARGS (call_expr) = CALL_EXPR_REVERSE_ARGS (aggr_init_expr);
/* Preserve CILK_SPAWN flag. */
EXPR_CILK_SPAWN (call_expr) = EXPR_CILK_SPAWN (aggr_init_expr);
if (style == ctor)
{
@ -5910,20 +5887,7 @@ finish_omp_clauses (tree clauses, enum c_omp_region_type ort)
}
if (TREE_CODE (type) == REFERENCE_TYPE)
type = TREE_TYPE (type);
if (ort == C_ORT_CILK)
{
if (!INTEGRAL_TYPE_P (type)
&& !SCALAR_FLOAT_TYPE_P (type)
&& TREE_CODE (type) != POINTER_TYPE)
{
error ("linear clause applied to non-integral, "
"non-floating, non-pointer variable with %qT type",
TREE_TYPE (t));
remove = true;
break;
}
}
else if (OMP_CLAUSE_LINEAR_KIND (c) != OMP_CLAUSE_LINEAR_REF)
if (OMP_CLAUSE_LINEAR_KIND (c) != OMP_CLAUSE_LINEAR_REF)
{
if (!INTEGRAL_TYPE_P (type)
&& TREE_CODE (type) != POINTER_TYPE)
@ -6347,8 +6311,6 @@ finish_omp_clauses (tree clauses, enum c_omp_region_type ort)
else if (t == error_mark_node)
remove = true;
else if (!type_dependent_expression_p (t)
&& (OMP_CLAUSE_SCHEDULE_KIND (c)
!= OMP_CLAUSE_SCHEDULE_CILKFOR)
&& !INTEGRAL_TYPE_P (TREE_TYPE (t)))
{
error ("schedule chunk size expression must be integral");
@ -6359,27 +6321,14 @@ finish_omp_clauses (tree clauses, enum c_omp_region_type ort)
t = mark_rvalue_use (t);
if (!processing_template_decl)
{
if (OMP_CLAUSE_SCHEDULE_KIND (c)
== OMP_CLAUSE_SCHEDULE_CILKFOR)
{
t = convert_to_integer (long_integer_type_node, t);
if (t == error_mark_node)
{
remove = true;
break;
}
}
else
{
t = maybe_constant_value (t);
if (TREE_CODE (t) == INTEGER_CST
&& tree_int_cst_sgn (t) != 1)
{
warning_at (OMP_CLAUSE_LOCATION (c), 0,
"chunk size value must be positive");
t = integer_one_node;
}
}
t = maybe_constant_value (t);
if (TREE_CODE (t) == INTEGER_CST
&& tree_int_cst_sgn (t) != 1)
{
warning_at (OMP_CLAUSE_LOCATION (c), 0,
"chunk size value must be positive");
t = integer_one_node;
}
t = fold_build_cleanup_point_expr (TREE_TYPE (t), t);
}
OMP_CLAUSE_SCHEDULE_CHUNK_EXPR (c) = t;
@ -7076,7 +7025,6 @@ finish_omp_clauses (tree clauses, enum c_omp_region_type ort)
case OMP_CLAUSE_THREADS:
case OMP_CLAUSE_SIMD:
case OMP_CLAUSE_DEFAULTMAP:
case OMP_CLAUSE__CILK_FOR_COUNT_:
case OMP_CLAUSE_AUTO:
case OMP_CLAUSE_INDEPENDENT:
case OMP_CLAUSE_SEQ:
@ -7998,7 +7946,7 @@ finish_omp_for (location_t locus, enum tree_code code, tree declv,
tree body, tree pre_body, vec<tree> *orig_inits, tree clauses)
{
tree omp_for = NULL, orig_incr = NULL;
tree decl = NULL, init, cond, incr, orig_decl = NULL_TREE, block = NULL_TREE;
tree decl = NULL, init, cond, incr;
tree last = NULL_TREE;
location_t elocus;
int i;
@ -8164,8 +8112,6 @@ finish_omp_for (location_t locus, enum tree_code code, tree declv,
"iteration variable %qE", decl);
return NULL;
}
if (code == CILK_FOR && i == 0)
orig_decl = decl;
if (handle_omp_for_class_iterator (i, locus, code, declv, orig_declv,
initv, condv, incrv, &body,
&pre_body, clauses, &last,
@ -8223,9 +8169,6 @@ finish_omp_for (location_t locus, enum tree_code code, tree declv,
if (IS_EMPTY_STMT (pre_body))
pre_body = NULL;
if (code == CILK_FOR && !processing_template_decl)
block = push_stmt_list ();
omp_for = c_finish_omp_for (locus, code, declv, orig_declv, initv, condv,
incrv, body, pre_body);
@ -8235,8 +8178,6 @@ finish_omp_for (location_t locus, enum tree_code code, tree declv,
if (omp_for == NULL)
{
if (block)
pop_stmt_list (block);
return NULL;
}
@ -8338,115 +8279,6 @@ finish_omp_for (location_t locus, enum tree_code code, tree declv,
}
}
if (block)
{
tree omp_par = make_node (OMP_PARALLEL);
TREE_TYPE (omp_par) = void_type_node;
OMP_PARALLEL_CLAUSES (omp_par) = NULL_TREE;
tree bind = build3 (BIND_EXPR, void_type_node, NULL, NULL, NULL);
TREE_SIDE_EFFECTS (bind) = 1;
BIND_EXPR_BODY (bind) = pop_stmt_list (block);
OMP_PARALLEL_BODY (omp_par) = bind;
if (OMP_FOR_PRE_BODY (omp_for))
{
add_stmt (OMP_FOR_PRE_BODY (omp_for));
OMP_FOR_PRE_BODY (omp_for) = NULL_TREE;
}
init = TREE_VEC_ELT (OMP_FOR_INIT (omp_for), 0);
decl = TREE_OPERAND (init, 0);
cond = TREE_VEC_ELT (OMP_FOR_COND (omp_for), 0);
incr = TREE_VEC_ELT (OMP_FOR_INCR (omp_for), 0);
tree t = TREE_OPERAND (cond, 1), c, clauses, *pc;
clauses = OMP_FOR_CLAUSES (omp_for);
OMP_FOR_CLAUSES (omp_for) = NULL_TREE;
for (pc = &clauses; *pc; )
if (OMP_CLAUSE_CODE (*pc) == OMP_CLAUSE_SCHEDULE)
{
gcc_assert (OMP_FOR_CLAUSES (omp_for) == NULL_TREE);
OMP_FOR_CLAUSES (omp_for) = *pc;
*pc = OMP_CLAUSE_CHAIN (*pc);
OMP_CLAUSE_CHAIN (OMP_FOR_CLAUSES (omp_for)) = NULL_TREE;
}
else
{
gcc_assert (OMP_CLAUSE_CODE (*pc) == OMP_CLAUSE_FIRSTPRIVATE);
pc = &OMP_CLAUSE_CHAIN (*pc);
}
if (TREE_CODE (t) != INTEGER_CST)
{
TREE_OPERAND (cond, 1) = get_temp_regvar (TREE_TYPE (t), t);
c = build_omp_clause (input_location, OMP_CLAUSE_FIRSTPRIVATE);
OMP_CLAUSE_DECL (c) = TREE_OPERAND (cond, 1);
OMP_CLAUSE_CHAIN (c) = clauses;
clauses = c;
}
if (TREE_CODE (incr) == MODIFY_EXPR)
{
t = TREE_OPERAND (TREE_OPERAND (incr, 1), 1);
if (TREE_CODE (t) != INTEGER_CST)
{
TREE_OPERAND (TREE_OPERAND (incr, 1), 1)
= get_temp_regvar (TREE_TYPE (t), t);
c = build_omp_clause (input_location, OMP_CLAUSE_FIRSTPRIVATE);
OMP_CLAUSE_DECL (c) = TREE_OPERAND (TREE_OPERAND (incr, 1), 1);
OMP_CLAUSE_CHAIN (c) = clauses;
clauses = c;
}
}
t = TREE_OPERAND (init, 1);
if (TREE_CODE (t) != INTEGER_CST)
{
TREE_OPERAND (init, 1) = get_temp_regvar (TREE_TYPE (t), t);
c = build_omp_clause (input_location, OMP_CLAUSE_FIRSTPRIVATE);
OMP_CLAUSE_DECL (c) = TREE_OPERAND (init, 1);
OMP_CLAUSE_CHAIN (c) = clauses;
clauses = c;
}
if (orig_decl && orig_decl != decl)
{
c = build_omp_clause (input_location, OMP_CLAUSE_FIRSTPRIVATE);
OMP_CLAUSE_DECL (c) = orig_decl;
OMP_CLAUSE_CHAIN (c) = clauses;
clauses = c;
}
if (last)
{
c = build_omp_clause (input_location, OMP_CLAUSE_FIRSTPRIVATE);
OMP_CLAUSE_DECL (c) = last;
OMP_CLAUSE_CHAIN (c) = clauses;
clauses = c;
}
c = build_omp_clause (input_location, OMP_CLAUSE_PRIVATE);
OMP_CLAUSE_DECL (c) = decl;
OMP_CLAUSE_CHAIN (c) = clauses;
clauses = c;
c = build_omp_clause (input_location, OMP_CLAUSE__CILK_FOR_COUNT_);
OMP_CLAUSE_OPERAND (c, 0)
= cilk_for_number_of_iterations (omp_for);
OMP_CLAUSE_CHAIN (c) = clauses;
OMP_PARALLEL_CLAUSES (omp_par) = finish_omp_clauses (c, C_ORT_CILK);
add_stmt (omp_par);
return omp_par;
}
else if (code == CILK_FOR && processing_template_decl)
{
tree c, clauses = OMP_FOR_CLAUSES (omp_for);
if (orig_decl && orig_decl != decl)
{
c = build_omp_clause (input_location, OMP_CLAUSE_FIRSTPRIVATE);
OMP_CLAUSE_DECL (c) = orig_decl;
OMP_CLAUSE_CHAIN (c) = clauses;
clauses = c;
}
if (last)
{
c = build_omp_clause (input_location, OMP_CLAUSE_FIRSTPRIVATE);
OMP_CLAUSE_DECL (c) = last;
OMP_CLAUSE_CHAIN (c) = clauses;
clauses = c;
}
OMP_FOR_CLAUSES (omp_for) = clauses;
}
return omp_for;
}

View File

@ -165,7 +165,6 @@ lvalue_kind (const_tree ref)
case INDIRECT_REF:
case ARROW_EXPR:
case ARRAY_REF:
case ARRAY_NOTATION_REF:
case PARM_DECL:
case RESULT_DECL:
case PLACEHOLDER_EXPR:

View File

@ -3196,22 +3196,6 @@ cp_build_array_ref (location_t loc, tree array, tree idx,
return error_mark_node;
}
/* If an array's index is an array notation, then its rank cannot be
greater than one. */
if (flag_cilkplus && contains_array_notation_expr (idx))
{
size_t rank = 0;
/* If find_rank returns false, then it should have reported an error,
thus it is unnecessary for repetition. */
if (!find_rank (loc, idx, idx, true, &rank))
return error_mark_node;
if (rank > 1)
{
error_at (loc, "rank of the array%'s index is greater than 1");
return error_mark_node;
}
}
if (TREE_TYPE (array) == error_mark_node
|| TREE_TYPE (idx) == error_mark_node)
return error_mark_node;
@ -6640,17 +6624,6 @@ cp_build_compound_expr (tree lhs, tree rhs, tsubst_flags_t complain)
if (lhs == error_mark_node || rhs == error_mark_node)
return error_mark_node;
if (flag_cilkplus
&& (TREE_CODE (lhs) == CILK_SPAWN_STMT
|| TREE_CODE (rhs) == CILK_SPAWN_STMT))
{
location_t loc = (EXPR_HAS_LOCATION (lhs) ? EXPR_LOCATION (lhs)
: EXPR_LOCATION (rhs));
error_at (loc,
"spawned function call cannot be part of a comma expression");
return error_mark_node;
}
if (TREE_CODE (rhs) == TARGET_EXPR)
{
/* If the rhs is a TARGET_EXPR, then build the compound
@ -8983,13 +8956,6 @@ check_return_expr (tree retval, bool *no_warning)
*no_warning = false;
if (flag_cilkplus && retval && contains_cilk_spawn_stmt (retval))
{
error_at (EXPR_LOCATION (retval), "use of %<_Cilk_spawn%> in a return "
"statement is not allowed");
return NULL_TREE;
}
/* A `volatile' function is one that isn't supposed to return, ever.
(This is a G++ extension, used to get better code for functions
that call the `volatile' function.) */

View File

@ -110,8 +110,6 @@ define_builtin_macros_for_compilation_flags (cpp_reader *pfile)
cpp_define_formatted (pfile, "__FINITE_MATH_ONLY__=%d",
flag_finite_math_only);
if (flag_cilkplus)
cpp_define (pfile, "__cilk=200");
if (flag_check_pointer_bounds)
cpp_define (pfile, "__CHKP__");

View File

@ -85,7 +85,6 @@ extensions, accepted by GCC in C90 mode and in C++.
* Object Size Checking:: Built-in functions for limited buffer overflow
checking.
* Pointer Bounds Checker builtins:: Built-in functions for Pointer Bounds Checker.
* Cilk Plus Builtins:: Built-in functions for the Cilk Plus language extension.
* Other Builtins:: Other built-in functions.
* Target Builtins:: Built-in functions specific to particular targets.
* Target Format Checks:: Format checks specific to particular targets.
@ -3295,9 +3294,6 @@ The optional argument @var{mask} may have the value
and instructs the compiler to generate non-masked or masked
clones correspondingly. By default, all clones are generated.
The attribute should not be used together with Cilk Plus @code{vector}
attribute on the same function.
If the attribute is specified and @code{#pragma omp declare simd} is
present on a declaration and the @option{-fopenmp} or @option{-fopenmp-simd}
switch is specified, then the attribute is ignored.
@ -10935,32 +10931,6 @@ the built-in function returns -1.
@end deftypefn
@node Cilk Plus Builtins
@section Cilk Plus C/C++ Language Extension Built-in Functions
GCC provides support for the following built-in reduction functions if Cilk Plus
is enabled. Cilk Plus can be enabled using the @option{-fcilkplus} flag.
@itemize @bullet
@item @code{__sec_implicit_index}
@item @code{__sec_reduce}
@item @code{__sec_reduce_add}
@item @code{__sec_reduce_all_nonzero}
@item @code{__sec_reduce_all_zero}
@item @code{__sec_reduce_any_nonzero}
@item @code{__sec_reduce_any_zero}
@item @code{__sec_reduce_max}
@item @code{__sec_reduce_min}
@item @code{__sec_reduce_max_ind}
@item @code{__sec_reduce_min_ind}
@item @code{__sec_reduce_mul}
@item @code{__sec_reduce_mutating}
@end itemize
Further details and examples about these built-in functions are described
in the Cilk Plus language manual which can be found at
@uref{https://www.cilkplus.org}.
@node Other Builtins
@section Other Built-in Functions Provided by GCC
@cindex built-in functions

View File

@ -3234,30 +3234,6 @@ several statements chained together.
Used to represent a @code{break} statement. There are no additional
fields.
@item CILK_SPAWN_STMT
Used to represent a spawning function in the Cilk Plus language extension.
This tree has one field that holds the name of the spawning function.
@code{_Cilk_spawn} can be written in C in the following way:
@smallexample
@code{_Cilk_spawn} <function_name> (<parameters>);
@end smallexample
Detailed description for usage and functionality of @code{_Cilk_spawn} can be
found at @uref{https://www.cilkplus.org}.
@item CILK_SYNC_STMT
This statement is part of the Cilk Plus language extension. It indicates that
the current function cannot continue in parallel with its spawned children.
There are no additional fields. @code{_Cilk_sync} can be written in C in the
following way:
@smallexample
@code{_Cilk_sync};
@end smallexample
@item CLEANUP_STMT
Used to represent an action that should take place upon exit from the

View File

@ -2098,18 +2098,6 @@ Enable handling of OpenMP's SIMD directives with @code{#pragma omp}
in C/C++ and @code{!$omp} in Fortran. Other OpenMP directives
are ignored.
@item -fcilkplus
@opindex fcilkplus
@cindex Enable Cilk Plus
Enable the usage of Cilk Plus language extension features for C/C++.
When the option @option{-fcilkplus} is specified, enable the usage of
the Cilk Plus Language extension features for C/C++. The present
implementation follows ABI version 1.2. This is an experimental
feature that is only partially complete, and whose interface may
change in future versions of GCC as the official specification
changes. Currently, all features but @code{_Cilk_for} have been
implemented.
@item -fgnu-tm
@opindex fgnu-tm
When the option @option{-fgnu-tm} is specified, the compiler

View File

@ -18,7 +18,6 @@ where near complete.
@menu
* Parsing pass:: The language front end turns text into bits.
* Cilk Plus Transformation:: Transform Cilk Plus Code to equivalent C/C++.
* Gimplification pass:: The bits are turned into something we can optimize.
* Pass manager:: Sequencing the optimization passes.
* Tree SSA passes:: Optimizations on a high-level representation.
@ -104,68 +103,6 @@ that is more descriptive than "rest_of".
The middle-end will, at its option, emit the function and data
definitions immediately or queue them for later processing.
@node Cilk Plus Transformation
@section Cilk Plus Transformation
@cindex CILK_PLUS
If Cilk Plus generation (flag @option{-fcilkplus}) is enabled, all the Cilk
Plus code is transformed into equivalent C and C++ functions. Majority of this
transformation occurs toward the end of the parsing and right before the
gimplification pass.
These are the major components to the Cilk Plus language extension:
@itemize @bullet
@item Array Notations:
During parsing phase, all the array notation specific information is stored in
@code{ARRAY_NOTATION_REF} tree using the function
@code{c_parser_array_notation}. During the end of parsing, we check the entire
function to see if there are any array notation specific code (using the
function @code{contains_array_notation_expr}). If this function returns
true, then we expand them using either @code{expand_array_notation_exprs} or
@code{build_array_notation_expr}. For the cases where array notations are
inside conditions, they are transformed using the function
@code{fix_conditional_array_notations}. The C language-specific routines are
located in @file{c/c-array-notation.c} and the equivalent C++ routines are in
the file @file{cp/cp-array-notation.c}. Common routines such as functions to
initialize built-in functions are stored in @file{array-notation-common.c}.
@item Cilk keywords:
@itemize @bullet
@item @code{_Cilk_spawn}:
The @code{_Cilk_spawn} keyword is parsed and the function it contains is marked
as a spawning function. The spawning function is called the spawner. At
the end of the parsing phase, appropriate built-in functions are
added to the spawner that are defined in the Cilk runtime. The appropriate
locations of these functions, and the internal structures are detailed in
@code{cilk_init_builtins} in the file @file{cilk-common.c}. The pointers to
Cilk functions and fields of internal structures are described
in @file{cilk.h}. The built-in functions are described in
@file{cilk-builtins.def}.
During gimplification, a new "spawn-helper" function is created.
The spawned function is replaced with a spawn helper function in the spawner.
The spawned function-call is moved into the spawn helper. The main function
that does these transformations is @code{gimplify_cilk_spawn} in
@file{c-family/cilk.c}. In the spawn-helper, the gimplification function
@code{gimplify_call_expr}, inserts a function call @code{__cilkrts_detach}.
This function is expanded by @code{builtin_expand_cilk_detach} located in
@file{c-family/cilk.c}.
@item @code{_Cilk_sync}:
@code{_Cilk_sync} is parsed like a keyword. During gimplification,
the function @code{gimplify_cilk_sync} in @file{c-family/cilk.c}, will replace
this keyword with a set of functions that are stored in the Cilk runtime.
One of the internal functions inserted during gimplification,
@code{__cilkrts_pop_frame} must be expanded by the compiler and is
done by @code{builtin_expand_cilk_pop_frame} in @file{cilk-common.c}.
@end itemize
@end itemize
Documentation about Cilk Plus and language specification is provided under the
"Learn" section in @w{@uref{https://www.cilkplus.org}}. It is worth mentioning
that the current implementation follows ABI 1.1.
@node Gimplification pass
@section Gimplification pass

View File

@ -2116,9 +2116,6 @@ Target supports wide characters.
@item automatic_stack_alignment
Target supports automatic stack alignment.
@item cilkplus_runtime
Target supports the Cilk Plus runtime library.
@item cxa_atexit
Target uses @code{__cxa_atexit}.

View File

@ -1041,7 +1041,6 @@ proper position among the other output files. */
VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o " CHKP_SPEC " \
%{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
%:include(libgomp.spec)%(link_gomp)}\
%{fcilkplus:%:include(libcilkrts.spec)%(link_cilkrts)}\
%{fgnu-tm:%:include(libitm.spec)%(link_itm)}\
%(mflib) " STACK_SPLIT_SPEC "\
%{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \
@ -1216,15 +1215,9 @@ static const char *const multilib_defaults_raw[] = MULTILIB_DEFAULTS;
#define GTM_SELF_SPECS "%{fgnu-tm: -pthread}"
#endif
/* Likewise for -fcilkplus. */
#ifndef CILK_SELF_SPECS
#define CILK_SELF_SPECS "%{fcilkplus: -pthread}"
#endif
static const char *const driver_self_specs[] = {
"%{fdump-final-insns:-fdump-final-insns=.} %<fdump-final-insns",
DRIVER_SELF_SPECS, CONFIGURE_SPECS, GOMP_SELF_SPECS, GTM_SELF_SPECS,
CILK_SELF_SPECS
DRIVER_SELF_SPECS, CONFIGURE_SPECS, GOMP_SELF_SPECS, GTM_SELF_SPECS
};
#ifndef OPTION_DEFAULT_SPECS

View File

@ -1710,7 +1710,7 @@ open_base_files (void)
"backend.h", "predict.h", "tree.h",
"rtl.h", "gimple.h", "fold-const.h", "insn-codes.h", "splay-tree.h",
"alias.h", "insn-config.h", "flags.h", "expmed.h", "dojump.h",
"explow.h", "calls.h", "cilk.h", "memmodel.h", "emit-rtl.h", "varasm.h",
"explow.h", "calls.h", "memmodel.h", "emit-rtl.h", "varasm.h",
"stmt.h", "expr.h", "alloc-pool.h", "cselib.h", "insn-addr.h",
"optabs.h", "libfuncs.h", "debug.h", "internal-fn.h", "gimple-fold.h",
"tree-eh.h", "gimple-iterator.h", "gimple-ssa.h", "tree-cfg.h",

View File

@ -1389,18 +1389,12 @@ dump_gimple_omp_for (pretty_printer *buffer, gomp_for *gs, int spc,
case GF_OMP_FOR_KIND_TASKLOOP:
kind = " taskloop";
break;
case GF_OMP_FOR_KIND_CILKFOR:
kind = " _Cilk_for";
break;
case GF_OMP_FOR_KIND_OACC_LOOP:
kind = " oacc_loop";
break;
case GF_OMP_FOR_KIND_SIMD:
kind = " simd";
break;
case GF_OMP_FOR_KIND_CILKSIMD:
kind = " cilksimd";
break;
default:
gcc_unreachable ();
}
@ -1432,36 +1426,25 @@ dump_gimple_omp_for (pretty_printer *buffer, gomp_for *gs, int spc,
case GF_OMP_FOR_KIND_TASKLOOP:
pp_string (buffer, "#pragma omp taskloop");
break;
case GF_OMP_FOR_KIND_CILKFOR:
break;
case GF_OMP_FOR_KIND_OACC_LOOP:
pp_string (buffer, "#pragma acc loop");
break;
case GF_OMP_FOR_KIND_SIMD:
pp_string (buffer, "#pragma omp simd");
break;
case GF_OMP_FOR_KIND_CILKSIMD:
pp_string (buffer, "#pragma simd");
break;
case GF_OMP_FOR_KIND_GRID_LOOP:
pp_string (buffer, "#pragma omp for grid_loop");
break;
default:
gcc_unreachable ();
}
if (gimple_omp_for_kind (gs) != GF_OMP_FOR_KIND_CILKFOR)
dump_omp_clauses (buffer, gimple_omp_for_clauses (gs), spc, flags);
dump_omp_clauses (buffer, gimple_omp_for_clauses (gs), spc, flags);
for (i = 0; i < gimple_omp_for_collapse (gs); i++)
{
if (i)
spc += 2;
if (gimple_omp_for_kind (gs) == GF_OMP_FOR_KIND_CILKFOR)
pp_string (buffer, "_Cilk_for (");
else
{
newline_and_indent (buffer, spc);
pp_string (buffer, "for (");
}
newline_and_indent (buffer, spc);
pp_string (buffer, "for (");
dump_generic_node (buffer, gimple_omp_for_index (gs, i), spc,
flags, false);
pp_string (buffer, " = ");
@ -1507,8 +1490,6 @@ dump_gimple_omp_for (pretty_printer *buffer, gomp_for *gs, int spc,
if (!gimple_seq_empty_p (gimple_omp_body (gs)))
{
if (gimple_omp_for_kind (gs) == GF_OMP_FOR_KIND_CILKFOR)
dump_omp_clauses (buffer, gimple_omp_for_clauses (gs), spc, flags);
newline_and_indent (buffer, spc + 2);
pp_left_brace (buffer);
pp_newline (buffer);

View File

@ -156,13 +156,11 @@ enum gf_mask {
GF_OMP_FOR_KIND_FOR = 0,
GF_OMP_FOR_KIND_DISTRIBUTE = 1,
GF_OMP_FOR_KIND_TASKLOOP = 2,
GF_OMP_FOR_KIND_CILKFOR = 3,
GF_OMP_FOR_KIND_OACC_LOOP = 4,
GF_OMP_FOR_KIND_GRID_LOOP = 5,
/* Flag for SIMD variants of OMP_FOR kinds. */
GF_OMP_FOR_SIMD = 1 << 3,
GF_OMP_FOR_KIND_SIMD = GF_OMP_FOR_SIMD | 0,
GF_OMP_FOR_KIND_CILKSIMD = GF_OMP_FOR_SIMD | 1,
GF_OMP_FOR_COMBINED = 1 << 4,
GF_OMP_FOR_COMBINED_INTO = 1 << 5,
/* The following flag must not be used on GF_OMP_FOR_KIND_GRID_LOOP loop

View File

@ -56,7 +56,6 @@ along with GCC; see the file COPYING3. If not see
#include "omp-general.h"
#include "omp-low.h"
#include "gimple-low.h"
#include "cilk.h"
#include "gomp-constants.h"
#include "splay-tree.h"
#include "gimple-walk.h"
@ -1458,15 +1457,6 @@ gimplify_return_expr (tree stmt, gimple_seq *pre_p)
if (ret_expr == error_mark_node)
return GS_ERROR;
/* Implicit _Cilk_sync must be inserted right before any return statement
if there is a _Cilk_spawn in the function. If the user has provided a
_Cilk_sync, the optimizer should remove this duplicate one. */
if (fn_contains_cilk_spawn_p (cfun))
{
tree impl_sync = build0 (CILK_SYNC_STMT, void_type_node);
gimplify_and_add (impl_sync, pre_p);
}
if (!ret_expr
|| TREE_CODE (ret_expr) == RESULT_DECL
|| ret_expr == error_mark_node)
@ -3098,19 +3088,6 @@ maybe_fold_stmt (gimple_stmt_iterator *gsi)
return fold_stmt (gsi);
}
/* Add a gimple call to __builtin_cilk_detach to GIMPLE sequence PRE_P,
with the pointer to the proper cilk frame. */
static void
gimplify_cilk_detach (gimple_seq *pre_p)
{
tree frame = cfun->cilk_frame_decl;
tree ptrf = build1 (ADDR_EXPR, cilk_frame_ptr_type_decl,
frame);
gcall *detach = gimple_build_call (cilk_detach_fndecl, 1,
ptrf);
gimplify_seq_add_stmt(pre_p, detach);
}
/* Gimplify the CALL_EXPR node *EXPR_P into the GIMPLE sequence PRE_P.
WANT_VALUE is true if the result of the call is desired. */
@ -3148,8 +3125,6 @@ gimplify_call_expr (tree *expr_p, gimple_seq *pre_p, bool want_value)
vargs.quick_push (CALL_EXPR_ARG (*expr_p, i));
}
if (EXPR_CILK_SPAWN (*expr_p))
gimplify_cilk_detach (pre_p);
gcall *call = gimple_build_call_internal_vec (ifn, vargs);
gimple_call_set_nothrow (call, TREE_NOTHROW (*expr_p));
gimplify_seq_add_stmt (pre_p, call);
@ -3380,8 +3355,6 @@ gimplify_call_expr (tree *expr_p, gimple_seq *pre_p, bool want_value)
gimple_stmt_iterator gsi;
call = gimple_build_call_from_tree (*expr_p, fnptrtype);
notice_special_calls (call);
if (EXPR_CILK_SPAWN (*expr_p))
gimplify_cilk_detach (pre_p);
gimplify_seq_add_stmt (pre_p, call);
gsi = gsi_last (*pre_p);
maybe_fold_stmt (&gsi);
@ -5340,7 +5313,6 @@ is_gimple_stmt (tree t)
case OMP_PARALLEL:
case OMP_FOR:
case OMP_SIMD:
case CILK_SIMD:
case OMP_DISTRIBUTE:
case OACC_LOOP:
case OMP_SECTIONS:
@ -5673,8 +5645,6 @@ gimplify_modify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
??? This doesn't make it a default-def. */
SSA_NAME_DEF_STMT (*to_p) = gimple_build_nop ();
if (EXPR_CILK_SPAWN (*from_p))
gimplify_cilk_detach (pre_p);
assign = call_stmt;
}
else
@ -8422,7 +8392,6 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p,
case OMP_CLAUSE_GRAINSIZE:
case OMP_CLAUSE_NUM_TASKS:
case OMP_CLAUSE_HINT:
case OMP_CLAUSE__CILK_FOR_COUNT_:
case OMP_CLAUSE_ASYNC:
case OMP_CLAUSE_WAIT:
case OMP_CLAUSE_NUM_GANGS:
@ -9225,7 +9194,6 @@ gimplify_adjust_omp_clauses (gimple_seq *pre_p, gimple_seq body, tree *list_p,
case OMP_CLAUSE_DEFAULTMAP:
case OMP_CLAUSE_USE_DEVICE_PTR:
case OMP_CLAUSE_IS_DEVICE_PTR:
case OMP_CLAUSE__CILK_FOR_COUNT_:
case OMP_CLAUSE_ASYNC:
case OMP_CLAUSE_WAIT:
case OMP_CLAUSE_INDEPENDENT:
@ -9520,7 +9488,6 @@ gimplify_omp_for (tree *expr_p, gimple_seq *pre_p)
switch (TREE_CODE (for_stmt))
{
case OMP_FOR:
case CILK_FOR:
case OMP_DISTRIBUTE:
break;
case OACC_LOOP:
@ -9533,7 +9500,6 @@ gimplify_omp_for (tree *expr_p, gimple_seq *pre_p)
ort = ORT_TASK;
break;
case OMP_SIMD:
case CILK_SIMD:
ort = ORT_SIMD;
break;
default:
@ -10208,8 +10174,6 @@ gimplify_omp_for (tree *expr_p, gimple_seq *pre_p)
{
case OMP_FOR: kind = GF_OMP_FOR_KIND_FOR; break;
case OMP_SIMD: kind = GF_OMP_FOR_KIND_SIMD; break;
case CILK_SIMD: kind = GF_OMP_FOR_KIND_CILKSIMD; break;
case CILK_FOR: kind = GF_OMP_FOR_KIND_CILKFOR; break;
case OMP_DISTRIBUTE: kind = GF_OMP_FOR_KIND_DISTRIBUTE; break;
case OMP_TASKLOOP: kind = GF_OMP_FOR_KIND_TASKLOOP; break;
case OACC_LOOP: kind = GF_OMP_FOR_KIND_OACC_LOOP; break;
@ -11805,8 +11769,6 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
case OMP_FOR:
case OMP_SIMD:
case CILK_SIMD:
case CILK_FOR:
case OMP_DISTRIBUTE:
case OMP_TASKLOOP:
case OACC_LOOP:
@ -11994,22 +11956,6 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
break;
}
case CILK_SYNC_STMT:
{
if (!fn_contains_cilk_spawn_p (cfun))
{
error_at (EXPR_LOCATION (*expr_p),
"expected %<_Cilk_spawn%> before %<_Cilk_sync%>");
ret = GS_ERROR;
}
else
{
gimplify_cilk_sync (expr_p, pre_p);
ret = GS_ALL_DONE;
}
break;
}
default:
switch (TREE_CODE_CLASS (TREE_CODE (*expr_p)))
{

View File

@ -79,7 +79,6 @@ along with GCC; see the file COPYING3. If not see
#include "cfgloop.h"
#include "tree-scalar-evolution.h"
#include "ipa-utils.h"
#include "cilk.h"
#include "cfgexpand.h"
#include "gimplify.h"
#include "stringpool.h"
@ -891,8 +890,6 @@ ipa_dump_fn_summary (FILE *f, struct cgraph_node *node)
fprintf (f, " always_inline");
if (s->inlinable)
fprintf (f, " inlinable");
if (s->contains_cilk_spawn)
fprintf (f, " contains_cilk_spawn");
if (s->fp_expressions)
fprintf (f, " fp_expression");
fprintf (f, "\n global time: %f\n", s->time.to_double ());
@ -2439,8 +2436,6 @@ compute_fn_summary (struct cgraph_node *node, bool early)
else
info->inlinable = tree_inlinable_function_p (node->decl);
info->contains_cilk_spawn = fn_contains_cilk_spawn_p (cfun);
/* Type attributes can use parameter indices to describe them. */
if (TYPE_ATTRIBUTES (TREE_TYPE (node->decl)))
node->local.can_change_signature = false;
@ -3263,7 +3258,6 @@ inline_read_section (struct lto_file_decl_data *file_data, const char *data,
bp = streamer_read_bitpack (&ib);
info->inlinable = bp_unpack_value (&bp, 1);
info->contains_cilk_spawn = bp_unpack_value (&bp, 1);
info->fp_expressions = bp_unpack_value (&bp, 1);
count2 = streamer_read_uhwi (&ib);
@ -3417,7 +3411,7 @@ ipa_fn_summary_write (void)
info->time.stream_out (ob);
bp = bitpack_create (ob->main_stream);
bp_pack_value (&bp, info->inlinable, 1);
bp_pack_value (&bp, info->contains_cilk_spawn, 1);
bp_pack_value (&bp, false, 1);
bp_pack_value (&bp, info->fp_expressions, 1);
streamer_write_bitpack (&bp);
streamer_write_uhwi (ob, vec_safe_length (info->conds));

View File

@ -98,9 +98,6 @@ struct GTY(()) ipa_fn_summary
/* False when there something makes inlining impossible (such as va_arg). */
unsigned inlinable : 1;
/* True when function contains cilk spawn (and thus we can not inline
into it). */
unsigned contains_cilk_spawn : 1;
/* True wen there is only one caller of the function before small function
inlining. */
unsigned int single_caller : 1;
@ -145,7 +142,7 @@ struct GTY(()) ipa_fn_summary
This is useful for debugging. */
ipa_fn_summary ()
: estimated_self_stack_size (0), self_size (0), min_size (0),
inlinable (false), contains_cilk_spawn (false), single_caller (false),
inlinable (false), single_caller (false),
fp_expressions (false), estimated_stack_size (false),
stack_frame_offset (false), time (0), size (0), conds (NULL),
size_time_table (NULL), loop_iterations (NULL), loop_stride (NULL),

View File

@ -47,7 +47,6 @@ along with GCC; see the file COPYING3. If not see
#include "cfgloop.h"
#include "tree-scalar-evolution.h"
#include "ipa-utils.h"
#include "cilk.h"
#include "cfgexpand.h"
#include "gimplify.h"

View File

@ -2286,9 +2286,6 @@ ira_setup_eliminable_regset (void)
&& cfun->can_throw_non_call_exceptions)
|| crtl->accesses_prior_frames
|| (SUPPORTS_STACK_ALIGNMENT && crtl->stack_realign_needed)
/* We need a frame pointer for all Cilk Plus functions that use
Cilk keywords. */
|| (flag_cilkplus && cfun->is_cilk_function)
|| targetm.frame_pointer_required ());
/* The chance that FRAME_POINTER_NEEDED is changed from inspecting

View File

@ -282,7 +282,6 @@ merge_and_complain (struct cl_decoded_option **decoded_options,
case OPT_fopenmp:
case OPT_fopenacc:
case OPT_fcilkplus:
case OPT_fcheck_pointer_bounds:
/* For selected options we can merge conservatively. */
for (j = 0; j < *decoded_options_count; ++j)
@ -292,7 +291,6 @@ merge_and_complain (struct cl_decoded_option **decoded_options,
append_option (decoded_options, decoded_options_count, foption);
/* -fopenmp > -fno-openmp,
-fopenacc > -fno-openacc,
-fcilkplus > -fno-cilkplus,
-fcheck_pointer_bounds > -fcheck_pointer_bounds */
else if (foption->value > (*decoded_options)[j].value)
(*decoded_options)[j] = *foption;
@ -549,7 +547,6 @@ append_compiler_options (obstack *argv_obstack, struct cl_decoded_option *opts,
case OPT_fopenmp:
case OPT_fopenacc:
case OPT_fopenacc_dim_:
case OPT_fcilkplus:
case OPT_foffload_abi_:
case OPT_O:
case OPT_Ofast:
@ -626,7 +623,6 @@ append_linker_options (obstack *argv_obstack, struct cl_decoded_option *opts,
case OPT_fopenmp:
case OPT_fopenacc:
case OPT_fcilkplus:
/* Ignore -fno-XXX form of these options, as otherwise
corresponding builtins will not be enabled. */
if (option->value == 0)

View File

@ -34,7 +34,6 @@ along with GCC; see the file COPYING3. If not see
#include "debug.h"
#include "lto-tree.h"
#include "lto.h"
#include "cilk.h"
#include "stringpool.h"
#include "attribs.h"
@ -1262,9 +1261,6 @@ lto_init (void)
va_list_type_node);
}
if (flag_cilkplus)
cilk_init_builtins ();
targetm.init_builtins ();
build_common_builtin_nodes ();

View File

@ -53,7 +53,6 @@ along with GCC; see the file COPYING3. If not see
#include "omp-offload.h"
#include "tree-cfgcleanup.h"
#include "symbol-summary.h"
#include "cilk.h"
#include "gomp-constants.h"
#include "gimple-pretty-print.h"
#include "hsa-common.h"
@ -728,45 +727,6 @@ expand_parallel_call (struct omp_region *region, basic_block bb,
}
}
/* Insert a function call whose name is FUNC_NAME with the information from
ENTRY_STMT into the basic_block BB. */
static void
expand_cilk_for_call (basic_block bb, gomp_parallel *entry_stmt,
vec <tree, va_gc> *ws_args)
{
tree t, t1, t2;
gimple_stmt_iterator gsi;
vec <tree, va_gc> *args;
gcc_assert (vec_safe_length (ws_args) == 2);
tree func_name = (*ws_args)[0];
tree grain = (*ws_args)[1];
tree clauses = gimple_omp_parallel_clauses (entry_stmt);
tree count = omp_find_clause (clauses, OMP_CLAUSE__CILK_FOR_COUNT_);
gcc_assert (count != NULL_TREE);
count = OMP_CLAUSE_OPERAND (count, 0);
gsi = gsi_last_bb (bb);
t = gimple_omp_parallel_data_arg (entry_stmt);
if (t == NULL)
t1 = null_pointer_node;
else
t1 = build_fold_addr_expr (t);
t2 = build_fold_addr_expr (gimple_omp_parallel_child_fn (entry_stmt));
vec_alloc (args, 4);
args->quick_push (t2);
args->quick_push (t1);
args->quick_push (count);
args->quick_push (grain);
t = build_call_expr_loc_vec (UNKNOWN_LOCATION, func_name, args);
force_gimple_operand_gsi (&gsi, t, true, NULL_TREE, false,
GSI_CONTINUE_LINKING);
}
/* Build the function call to GOMP_task to actually
generate the task operation. BB is the block where to insert the code. */
@ -1161,18 +1121,7 @@ expand_omp_taskreg (struct omp_region *region)
else
exit_bb = region->exit;
bool is_cilk_for
= (flag_cilkplus
&& gimple_code (entry_stmt) == GIMPLE_OMP_PARALLEL
&& omp_find_clause (gimple_omp_parallel_clauses (entry_stmt),
OMP_CLAUSE__CILK_FOR_COUNT_) != NULL_TREE);
if (is_cilk_for)
/* If it is a _Cilk_for statement, it is modelled *like* a parallel for,
and the inner statement contains the name of the built-in function
and grain. */
ws_args = region->inner->ws_args;
else if (is_combined_parallel (region))
if (is_combined_parallel (region))
ws_args = region->ws_args;
else
ws_args = NULL;
@ -1430,11 +1379,7 @@ expand_omp_taskreg (struct omp_region *region)
}
}
/* Emit a library call to launch the children threads. */
if (is_cilk_for)
expand_cilk_for_call (new_bb,
as_a <gomp_parallel *> (entry_stmt), ws_args);
else if (gimple_code (entry_stmt) == GIMPLE_OMP_PARALLEL)
if (gimple_code (entry_stmt) == GIMPLE_OMP_PARALLEL)
expand_parallel_call (region, new_bb,
as_a <gomp_parallel *> (entry_stmt), ws_args);
else
@ -4342,193 +4287,6 @@ expand_omp_for_static_chunk (struct omp_region *region,
}
}
/* A subroutine of expand_omp_for. Generate code for _Cilk_for loop.
Given parameters:
for (V = N1; V cond N2; V += STEP) BODY;
where COND is "<" or ">" or "!=", we generate pseudocode
for (ind_var = low; ind_var < high; ind_var++)
{
V = n1 + (ind_var * STEP)
<BODY>
}
In the above pseudocode, low and high are function parameters of the
child function. In the function below, we are inserting a temp.
variable that will be making a call to two OMP functions that will not be
found in the body of _Cilk_for (since OMP_FOR cannot be mixed
with _Cilk_for). These functions are replaced with low and high
by the function that handles taskreg. */
static void
expand_cilk_for (struct omp_region *region, struct omp_for_data *fd)
{
bool broken_loop = region->cont == NULL;
basic_block entry_bb = region->entry;
basic_block cont_bb = region->cont;
gcc_assert (EDGE_COUNT (entry_bb->succs) == 2);
gcc_assert (broken_loop
|| BRANCH_EDGE (entry_bb)->dest == FALLTHRU_EDGE (cont_bb)->dest);
basic_block l0_bb = FALLTHRU_EDGE (entry_bb)->dest;
basic_block l1_bb, l2_bb;
if (!broken_loop)
{
gcc_assert (BRANCH_EDGE (cont_bb)->dest == l0_bb);
gcc_assert (EDGE_COUNT (cont_bb->succs) == 2);
l1_bb = split_block (cont_bb, last_stmt (cont_bb))->dest;
l2_bb = BRANCH_EDGE (entry_bb)->dest;
}
else
{
BRANCH_EDGE (entry_bb)->flags &= ~EDGE_ABNORMAL;
l1_bb = split_edge (BRANCH_EDGE (entry_bb));
l2_bb = single_succ (l1_bb);
}
basic_block exit_bb = region->exit;
basic_block l2_dom_bb = NULL;
gimple_stmt_iterator gsi = gsi_last_bb (entry_bb);
/* Below statements until the "tree high_val = ..." are pseudo statements
used to pass information to be used by expand_omp_taskreg.
low_val and high_val will be replaced by the __low and __high
parameter from the child function.
The call_exprs part is a place-holder, it is mainly used
to distinctly identify to the top-level part that this is
where we should put low and high (reasoning given in header
comment). */
gomp_parallel *par_stmt
= as_a <gomp_parallel *> (last_stmt (region->outer->entry));
tree child_fndecl = gimple_omp_parallel_child_fn (par_stmt);
tree t, low_val = NULL_TREE, high_val = NULL_TREE;
for (t = DECL_ARGUMENTS (child_fndecl); t; t = TREE_CHAIN (t))
{
if (id_equal (DECL_NAME (t), "__high"))
high_val = t;
else if (id_equal (DECL_NAME (t), "__low"))
low_val = t;
}
gcc_assert (low_val && high_val);
tree type = TREE_TYPE (low_val);
tree ind_var = create_tmp_reg (type, "__cilk_ind_var");
gcc_assert (gimple_code (gsi_stmt (gsi)) == GIMPLE_OMP_FOR);
/* Not needed in SSA form right now. */
gcc_assert (!gimple_in_ssa_p (cfun));
if (l2_dom_bb == NULL)
l2_dom_bb = l1_bb;
tree n1 = low_val;
tree n2 = high_val;
gimple *stmt = gimple_build_assign (ind_var, n1);
/* Replace the GIMPLE_OMP_FOR statement. */
gsi_replace (&gsi, stmt, true);
if (!broken_loop)
{
/* Code to control the increment goes in the CONT_BB. */
gsi = gsi_last_bb (cont_bb);
stmt = gsi_stmt (gsi);
gcc_assert (gimple_code (stmt) == GIMPLE_OMP_CONTINUE);
stmt = gimple_build_assign (ind_var, PLUS_EXPR, ind_var,
build_one_cst (type));
/* Replace GIMPLE_OMP_CONTINUE. */
gsi_replace (&gsi, stmt, true);
}
/* Emit the condition in L1_BB. */
gsi = gsi_after_labels (l1_bb);
t = fold_build2 (MULT_EXPR, TREE_TYPE (fd->loop.step),
fold_convert (TREE_TYPE (fd->loop.step), ind_var),
fd->loop.step);
if (POINTER_TYPE_P (TREE_TYPE (fd->loop.n1)))
t = fold_build2 (POINTER_PLUS_EXPR, TREE_TYPE (fd->loop.n1),
fd->loop.n1, fold_convert (sizetype, t));
else
t = fold_build2 (PLUS_EXPR, TREE_TYPE (fd->loop.n1),
fd->loop.n1, fold_convert (TREE_TYPE (fd->loop.n1), t));
t = fold_convert (TREE_TYPE (fd->loop.v), t);
expand_omp_build_assign (&gsi, fd->loop.v, t);
/* The condition is always '<' since the runtime will fill in the low
and high values. */
stmt = gimple_build_cond (LT_EXPR, ind_var, n2, NULL_TREE, NULL_TREE);
gsi_insert_before (&gsi, stmt, GSI_SAME_STMT);
/* Remove GIMPLE_OMP_RETURN. */
gsi = gsi_last_bb (exit_bb);
gsi_remove (&gsi, true);
/* Connect the new blocks. */
remove_edge (FALLTHRU_EDGE (entry_bb));
edge e, ne;
if (!broken_loop)
{
remove_edge (BRANCH_EDGE (entry_bb));
make_edge (entry_bb, l1_bb, EDGE_FALLTHRU);
e = BRANCH_EDGE (l1_bb);
ne = FALLTHRU_EDGE (l1_bb);
e->flags = EDGE_TRUE_VALUE;
}
else
{
single_succ_edge (entry_bb)->flags = EDGE_FALLTHRU;
ne = single_succ_edge (l1_bb);
e = make_edge (l1_bb, l0_bb, EDGE_TRUE_VALUE);
}
ne->flags = EDGE_FALSE_VALUE;
e->probability = profile_probability::guessed_always ().apply_scale (7, 8);
ne->probability = e->probability.invert ();
set_immediate_dominator (CDI_DOMINATORS, l1_bb, entry_bb);
set_immediate_dominator (CDI_DOMINATORS, l2_bb, l2_dom_bb);
set_immediate_dominator (CDI_DOMINATORS, l0_bb, l1_bb);
if (!broken_loop)
{
struct loop *loop = alloc_loop ();
loop->header = l1_bb;
loop->latch = cont_bb;
add_loop (loop, l1_bb->loop_father);
loop->safelen = INT_MAX;
}
/* Pick the correct library function based on the precision of the
induction variable type. */
tree lib_fun = NULL_TREE;
if (TYPE_PRECISION (type) == 32)
lib_fun = cilk_for_32_fndecl;
else if (TYPE_PRECISION (type) == 64)
lib_fun = cilk_for_64_fndecl;
else
gcc_unreachable ();
gcc_assert (fd->sched_kind == OMP_CLAUSE_SCHEDULE_CILKFOR);
/* WS_ARGS contains the library function flavor to call:
__libcilkrts_cilk_for_64 or __libcilkrts_cilk_for_32), and the
user-defined grain value. If the user does not define one, then zero
is passed in by the parser. */
vec_alloc (region->ws_args, 2);
region->ws_args->quick_push (lib_fun);
region->ws_args->quick_push (fd->chunk_size);
}
/* A subroutine of expand_omp_for. Generate code for a simd non-worksharing
loop. Given parameters:
@ -5875,8 +5633,6 @@ expand_omp_for (struct omp_region *region, gimple *inner_stmt)
if (gimple_omp_for_kind (fd.for_stmt) & GF_OMP_FOR_SIMD)
expand_omp_simd (region, &fd);
else if (gimple_omp_for_kind (fd.for_stmt) == GF_OMP_FOR_KIND_CILKFOR)
expand_cilk_for (region, &fd);
else if (gimple_omp_for_kind (fd.for_stmt) == GF_OMP_FOR_KIND_OACC_LOOP)
{
gcc_assert (!inner_stmt);
@ -8221,7 +7977,7 @@ public:
/* opt_pass methods: */
virtual unsigned int execute (function *)
{
bool gate = ((flag_cilkplus != 0 || flag_openacc != 0 || flag_openmp != 0
bool gate = ((flag_openacc != 0 || flag_openmp != 0
|| flag_openmp_simd != 0)
&& !seen_error ());

View File

@ -143,8 +143,6 @@ omp_extract_for_data (gomp_for *for_stmt, struct omp_for_data *fd,
fd->sched_modifiers = 0;
fd->chunk_size = NULL_TREE;
fd->simd_schedule = false;
if (gimple_omp_for_kind (fd->for_stmt) == GF_OMP_FOR_KIND_CILKFOR)
fd->sched_kind = OMP_CLAUSE_SCHEDULE_CILKFOR;
collapse_iter = NULL;
collapse_count = NULL;
@ -252,9 +250,7 @@ omp_extract_for_data (gomp_for *for_stmt, struct omp_for_data *fd,
loop->cond_code = gimple_omp_for_cond (for_stmt, i);
loop->n2 = gimple_omp_for_final (for_stmt, i);
gcc_assert (loop->cond_code != NE_EXPR
|| gimple_omp_for_kind (for_stmt) == GF_OMP_FOR_KIND_CILKSIMD
|| gimple_omp_for_kind (for_stmt) == GF_OMP_FOR_KIND_CILKFOR);
gcc_assert (loop->cond_code != NE_EXPR);
omp_adjust_for_condition (loc, &loop->cond_code, &loop->n2);
t = gimple_omp_for_incr (for_stmt, i);

View File

@ -1174,7 +1174,6 @@ scan_sharing_clauses (tree clauses, omp_context *ctx,
case OMP_CLAUSE_PRIORITY:
case OMP_CLAUSE_GRAINSIZE:
case OMP_CLAUSE_NUM_TASKS:
case OMP_CLAUSE__CILK_FOR_COUNT_:
case OMP_CLAUSE_NUM_GANGS:
case OMP_CLAUSE_NUM_WORKERS:
case OMP_CLAUSE_VECTOR_LENGTH:
@ -1486,7 +1485,6 @@ scan_sharing_clauses (tree clauses, omp_context *ctx,
case OMP_CLAUSE_NOGROUP:
case OMP_CLAUSE_DEFAULTMAP:
case OMP_CLAUSE_USE_DEVICE_PTR:
case OMP_CLAUSE__CILK_FOR_COUNT_:
case OMP_CLAUSE_ASYNC:
case OMP_CLAUSE_WAIT:
case OMP_CLAUSE_NUM_GANGS:
@ -1529,41 +1527,15 @@ scan_sharing_clauses (tree clauses, omp_context *ctx,
}
}
/* Create a new name for omp child function. Returns an identifier. If
IS_CILK_FOR is true then the suffix for the child function is
"_cilk_for_fn." */
/* Create a new name for omp child function. Returns an identifier. */
static tree
create_omp_child_function_name (bool task_copy, bool is_cilk_for)
create_omp_child_function_name (bool task_copy)
{
if (is_cilk_for)
return clone_function_name (current_function_decl, "_cilk_for_fn");
return clone_function_name (current_function_decl,
task_copy ? "_omp_cpyfn" : "_omp_fn");
}
/* Returns the type of the induction variable for the child function for
_Cilk_for and the types for _high and _low variables based on TYPE. */
static tree
cilk_for_check_loop_diff_type (tree type)
{
if (TYPE_PRECISION (type) <= TYPE_PRECISION (uint32_type_node))
{
if (TYPE_UNSIGNED (type))
return uint32_type_node;
else
return integer_type_node;
}
else
{
if (TYPE_UNSIGNED (type))
return uint64_type_node;
else
return long_long_integer_type_node;
}
}
/* Return true if CTX may belong to offloaded code: either if current function
is offloaded, or any enclosing context corresponds to a target region. */
@ -1586,24 +1558,10 @@ create_omp_child_function (omp_context *ctx, bool task_copy)
{
tree decl, type, name, t;
tree cilk_for_count
= (flag_cilkplus && gimple_code (ctx->stmt) == GIMPLE_OMP_PARALLEL)
? omp_find_clause (gimple_omp_parallel_clauses (ctx->stmt),
OMP_CLAUSE__CILK_FOR_COUNT_) : NULL_TREE;
tree cilk_var_type = NULL_TREE;
name = create_omp_child_function_name (task_copy,
cilk_for_count != NULL_TREE);
name = create_omp_child_function_name (task_copy);
if (task_copy)
type = build_function_type_list (void_type_node, ptr_type_node,
ptr_type_node, NULL_TREE);
else if (cilk_for_count)
{
type = TREE_TYPE (OMP_CLAUSE_OPERAND (cilk_for_count, 0));
cilk_var_type = cilk_for_check_loop_diff_type (type);
type = build_function_type_list (void_type_node, ptr_type_node,
cilk_var_type, cilk_var_type, NULL_TREE);
}
else
type = build_function_type_list (void_type_node, ptr_type_node, NULL_TREE);
@ -1660,32 +1618,6 @@ create_omp_child_function (omp_context *ctx, bool task_copy)
DECL_CONTEXT (t) = decl;
DECL_RESULT (decl) = t;
/* _Cilk_for's child function requires two extra parameters called
__low and __high that are set the by Cilk runtime when it calls this
function. */
if (cilk_for_count)
{
t = build_decl (DECL_SOURCE_LOCATION (decl),
PARM_DECL, get_identifier ("__high"), cilk_var_type);
DECL_ARTIFICIAL (t) = 1;
DECL_NAMELESS (t) = 1;
DECL_ARG_TYPE (t) = ptr_type_node;
DECL_CONTEXT (t) = current_function_decl;
TREE_USED (t) = 1;
DECL_CHAIN (t) = DECL_ARGUMENTS (decl);
DECL_ARGUMENTS (decl) = t;
t = build_decl (DECL_SOURCE_LOCATION (decl),
PARM_DECL, get_identifier ("__low"), cilk_var_type);
DECL_ARTIFICIAL (t) = 1;
DECL_NAMELESS (t) = 1;
DECL_ARG_TYPE (t) = ptr_type_node;
DECL_CONTEXT (t) = current_function_decl;
TREE_USED (t) = 1;
DECL_CHAIN (t) = DECL_ARGUMENTS (decl);
DECL_ARGUMENTS (decl) = t;
}
tree data_name = get_identifier (".omp_data_i");
t = build_decl (DECL_SOURCE_LOCATION (decl), PARM_DECL, data_name,
ptr_type_node);
@ -1695,8 +1627,6 @@ create_omp_child_function (omp_context *ctx, bool task_copy)
DECL_CONTEXT (t) = current_function_decl;
TREE_USED (t) = 1;
TREE_READONLY (t) = 1;
if (cilk_for_count)
DECL_CHAIN (t) = DECL_ARGUMENTS (decl);
DECL_ARGUMENTS (decl) = t;
if (!task_copy)
ctx->receiver_decl = t;
@ -8988,7 +8918,7 @@ execute_lower_omp (void)
/* This pass always runs, to provide PROP_gimple_lomp.
But often, there is nothing to do. */
if (flag_cilkplus == 0 && flag_openacc == 0 && flag_openmp == 0
if (flag_openacc == 0 && flag_openmp == 0
&& flag_openmp_simd == 0)
return 0;
@ -9080,16 +9010,6 @@ diagnose_sb_0 (gimple_stmt_iterator *gsi_p,
const char* kind = NULL;
if (flag_cilkplus)
{
if ((branch_ctx
&& gimple_code (branch_ctx) == GIMPLE_OMP_FOR
&& gimple_omp_for_kind (branch_ctx) == GF_OMP_FOR_KIND_CILKSIMD)
|| (label_ctx
&& gimple_code (label_ctx) == GIMPLE_OMP_FOR
&& gimple_omp_for_kind (label_ctx) == GF_OMP_FOR_KIND_CILKSIMD))
kind = "Cilk Plus";
}
if (flag_openacc)
{
if ((branch_ctx && is_gimple_omp_oacc (branch_ctx))
@ -9361,7 +9281,7 @@ public:
/* opt_pass methods: */
virtual bool gate (function *)
{
return flag_cilkplus || flag_openacc || flag_openmp || flag_openmp_simd;
return flag_openacc || flag_openmp || flag_openmp_simd;
}
virtual unsigned int execute (function *)
{

View File

@ -112,19 +112,11 @@ simd_clone_clauses_extract (struct cgraph_node *node, tree clauses,
if (n > 0 && args.last () == void_type_node)
n--;
/* To distinguish from an OpenMP simd clone, Cilk Plus functions to
be cloned have a distinctive artificial label in addition to "omp
declare simd". */
bool cilk_clone
= (flag_cilkplus
&& lookup_attribute ("cilk simd function",
DECL_ATTRIBUTES (node->decl)));
/* Allocate one more than needed just in case this is an in-branch
clone which will require a mask argument. */
struct cgraph_simd_clone *clone_info = simd_clone_struct_alloc (n + 1);
clone_info->nargs = n;
clone_info->cilk_elemental = cilk_clone;
clone_info->cilk_elemental = false;
if (!clauses)
goto out;

View File

@ -1,3 +1,176 @@
2017-11-28 Julia Koval <julia.koval@intel.com>
Sebastian Peryt <sebastian.peryt@intel.com>
* c-c++-common/attr-simd-3.c: Delete.
* c-c++-common/cilk-plus/AN/an-if.c: Delete.
* c-c++-common/cilk-plus/AN/array_test1.c: Delete.
* c-c++-common/cilk-plus/AN/array_test2.c: Delete.
* c-c++-common/cilk-plus/AN/array_test_ND.c: Delete.
* c-c++-common/cilk-plus/AN/builtin_fn_custom.c: Delete.
* c-c++-common/cilk-plus/AN/builtin_fn_mutating.c: Delete.
* c-c++-common/cilk-plus/AN/builtin_func_double.c: Delete.
* c-c++-common/cilk-plus/AN/builtin_func_double2.c: Delete.
* c-c++-common/cilk-plus/AN/comma_exp.c: Delete.
* c-c++-common/cilk-plus/AN/conditional.c: Delete.
* c-c++-common/cilk-plus/AN/decl-ptr-colon.c: Delete.
* c-c++-common/cilk-plus/AN/dimensionless-arrays.c: Delete.
* c-c++-common/cilk-plus/AN/exec-once.c: Delete.
* c-c++-common/cilk-plus/AN/exec-once2.c: Delete.
* c-c++-common/cilk-plus/AN/fn_ptr-2.c: Delete.
* c-c++-common/cilk-plus/AN/fn_ptr.c: Delete.
* c-c++-common/cilk-plus/AN/fp_triplet_values.c: Delete.
* c-c++-common/cilk-plus/AN/gather-scatter-errors.c: Delete.
* c-c++-common/cilk-plus/AN/gather_scatter.c: Delete.
* c-c++-common/cilk-plus/AN/if_test.c: Delete.
* c-c++-common/cilk-plus/AN/if_test_errors.c: Delete.
* c-c++-common/cilk-plus/AN/misc.c: Delete.
* c-c++-common/cilk-plus/AN/n-ptr-test.c: Delete.
* c-c++-common/cilk-plus/AN/parser_errors.c: Delete.
* c-c++-common/cilk-plus/AN/parser_errors2.c: Delete.
* c-c++-common/cilk-plus/AN/parser_errors3.c: Delete.
* c-c++-common/cilk-plus/AN/parser_errors4.c: Delete.
* c-c++-common/cilk-plus/AN/pr57457-2.c: Delete.
* c-c++-common/cilk-plus/AN/pr57457.c: Delete.
* c-c++-common/cilk-plus/AN/pr57490.c: Delete.
* c-c++-common/cilk-plus/AN/pr57541-2.c: Delete.
* c-c++-common/cilk-plus/AN/pr57541.c: Delete.
* c-c++-common/cilk-plus/AN/pr57577.c: Delete.
* c-c++-common/cilk-plus/AN/pr58942.c: Delete.
* c-c++-common/cilk-plus/AN/pr61191.c: Delete.
* c-c++-common/cilk-plus/AN/pr61455-2.c: Delete.
* c-c++-common/cilk-plus/AN/pr61455.c: Delete.
* c-c++-common/cilk-plus/AN/pr61962.c: Delete.
* c-c++-common/cilk-plus/AN/pr61963.c: Delete.
* c-c++-common/cilk-plus/AN/pr62008.c: Delete.
* c-c++-common/cilk-plus/AN/pr63884.c: Delete.
* c-c++-common/cilk-plus/AN/rank_mismatch.c: Delete.
* c-c++-common/cilk-plus/AN/rank_mismatch2.c: Delete.
* c-c++-common/cilk-plus/AN/rank_mismatch3.c: Delete.
* c-c++-common/cilk-plus/AN/sec_implicit.c: Delete.
* c-c++-common/cilk-plus/AN/sec_implicit2.c: Delete.
* c-c++-common/cilk-plus/AN/sec_implicit_ex.c: Delete.
* c-c++-common/cilk-plus/AN/sec_reduce_ind_same_value.c: Delete.
* c-c++-common/cilk-plus/AN/sec_reduce_max_min_ind.c: Delete.
* c-c++-common/cilk-plus/AN/sec_reduce_return.c: Delete.
* c-c++-common/cilk-plus/AN/side-effects-1.c: Delete.
* c-c++-common/cilk-plus/AN/test_builtin_return.c: Delete.
* c-c++-common/cilk-plus/AN/test_sec_limits.c: Delete.
* c-c++-common/cilk-plus/AN/tst_lngth.c: Delete.
* c-c++-common/cilk-plus/AN/vla.c: Delete.
* c-c++-common/cilk-plus/CK/Wparentheses-1.c: Delete.
* c-c++-common/cilk-plus/CK/cilk-for-2.c: Delete.
* c-c++-common/cilk-plus/CK/cilk-for-3.c: Delete.
* c-c++-common/cilk-plus/CK/cilk-fors.c: Delete.
* c-c++-common/cilk-plus/CK/cilk_for_errors.c: Delete.
* c-c++-common/cilk-plus/CK/cilk_for_grain.c: Delete.
* c-c++-common/cilk-plus/CK/cilk_for_grain_errors.c: Delete.
* c-c++-common/cilk-plus/CK/cilk_for_ptr_iter.c: Delete.
* c-c++-common/cilk-plus/CK/compound_cilk_spawn.c: Delete.
* c-c++-common/cilk-plus/CK/concec_cilk_spawn.c: Delete.
* c-c++-common/cilk-plus/CK/errors.c: Delete.
* c-c++-common/cilk-plus/CK/fib.c: Delete.
* c-c++-common/cilk-plus/CK/fib_init_expr_xy.c: Delete.
* c-c++-common/cilk-plus/CK/fib_no_return.c: Delete.
* c-c++-common/cilk-plus/CK/fib_no_sync.c: Delete.
* c-c++-common/cilk-plus/CK/invalid_spawns.c: Delete.
* c-c++-common/cilk-plus/CK/invalid_sync.c: Delete.c
* c-c++-common/cilk-plus/CK/nested_cilk_for.c: Delete.
* c-c++-common/cilk-plus/CK/no_args_error.c: Delete.
* c-c++-common/cilk-plus/CK/pr59631.c: Delete.
* c-c++-common/cilk-plus/CK/pr60197-2.c: Delete.
* c-c++-common/cilk-plus/CK/pr60197.c: Delete.
* c-c++-common/cilk-plus/CK/pr60469.c: Delete.
* c-c++-common/cilk-plus/CK/pr60586.c: Delete.
* c-c++-common/cilk-plus/CK/pr63307.c: Delete.
* c-c++-common/cilk-plus/CK/pr69826-1.c: Delete.
* c-c++-common/cilk-plus/CK/pr69826-2.c: Delete.
* c-c++-common/cilk-plus/CK/pr79428-4.c: Delete.
* c-c++-common/cilk-plus/CK/pr79428-7.c: Delete.
* c-c++-common/cilk-plus/CK/spawn_in_return.c: Delete.
* c-c++-common/cilk-plus/CK/spawnee_inline.c: Delete.
* c-c++-common/cilk-plus/CK/spawner_inline.c: Delete.
* c-c++-common/cilk-plus/CK/spawning_arg.c: Delete.
* c-c++-common/cilk-plus/CK/steal_check.c: Delete.
* c-c++-common/cilk-plus/CK/sync_wo_spawn.c: Delete.
* c-c++-common/cilk-plus/CK/test__cilk.c: Delete.
* c-c++-common/cilk-plus/CK/varargs_test.c: Delete.
* c-c++-common/cilk-plus/PS/Wparentheses-1.c: Delete.
* c-c++-common/cilk-plus/PS/body.c: Delete.
* c-c++-common/cilk-plus/PS/clauses1.c: Delete.
* c-c++-common/cilk-plus/PS/clauses2.c: Delete.
* c-c++-common/cilk-plus/PS/clauses3.c: Delete.
* c-c++-common/cilk-plus/PS/clauses4.c: Delete.
* c-c++-common/cilk-plus/PS/for1.c: Delete.
* c-c++-common/cilk-plus/PS/for2.c: Delete.
* c-c++-common/cilk-plus/PS/for3.c: Delete.
* c-c++-common/cilk-plus/PS/pr69363.c: Delete.
* c-c++-common/cilk-plus/PS/reduction-1.c: Delete.
* c-c++-common/cilk-plus/PS/reduction-2.c: Delete.
* c-c++-common/cilk-plus/PS/reduction-3.c: Delete.
* c-c++-common/cilk-plus/PS/run-1.c: Delete.
* c-c++-common/cilk-plus/PS/safelen.c: Delete.
* c-c++-common/cilk-plus/PS/vectorlength-2.c: Delete.
* c-c++-common/cilk-plus/PS/vectorlength-3.c: Delete.
* c-c++-common/cilk-plus/PS/vectorlength.c: Delete.
* c-c++-common/cilk-plus/SE/ef_error.c: Delete.
* c-c++-common/cilk-plus/SE/ef_error2.c: Delete.
* c-c++-common/cilk-plus/SE/ef_error3.c: Delete.
* c-c++-common/cilk-plus/SE/ef_test.c: Delete.
* c-c++-common/cilk-plus/SE/ef_test2.c: Delete.
* c-c++-common/cilk-plus/SE/vlength_errors.c: Delete.
* g++.dg/cilk-plus/AN/array_function.c: Delete.
* g++.dg/cilk-plus/AN/array_test1_tplt.c: Delete.
* g++.dg/cilk-plus/AN/array_test2_tplt.c: Delete.
* g++.dg/cilk-plus/AN/array_test_ND_tplt.c: Delete.
* g++.dg/cilk-plus/AN/braced_list.c: Delete.
* g++.dg/cilk-plus/AN/builtin_fn_custom_tplt.c: Delete.
* g++.dg/cilk-plus/AN/builtin_fn_mutating_tplt.c: Delete.
* g++.dg/cilk-plus/AN/fp_triplet_values_tplt.c: Delete.
* g++.dg/cilk-plus/AN/postincr_test.c: Delete.
* g++.dg/cilk-plus/AN/preincr_test.c: Delete.
* g++.dg/cilk-plus/CK/catch_exc.c: Delete.
* g++.dg/cilk-plus/CK/cf3.c: Delete.
* g++.dg/cilk-plus/CK/cilk-for-tplt.c: Delete.
* g++.dg/cilk-plus/CK/const_spawn.c: Delete.
* g++.dg/cilk-plus/CK/fib-opr-overload.c: Delete.
* g++.dg/cilk-plus/CK/fib-tplt.c: Delete.
* g++.dg/cilk-plus/CK/for1.c: Delete.
* g++.dg/cilk-plus/CK/lambda_spawns.c: Delete.
* g++.dg/cilk-plus/CK/lambda_spawns_tplt.c: Delete.
* g++.dg/cilk-plus/CK/pr60586.c: Delete.
* g++.dg/cilk-plus/CK/pr66326.c: Delete.
* g++.dg/cilk-plus/CK/pr68001.c: Delete.
* g++.dg/cilk-plus/CK/pr68997.c: Delete.
* g++.dg/cilk-plus/CK/pr69024.c: Delete.
* g++.dg/cilk-plus/CK/pr69048.c: Delete.
* g++.dg/cilk-plus/CK/pr69267.c: Delete.
* g++.dg/cilk-plus/CK/pr80038.c: Delete.
* g++.dg/cilk-plus/CK/stl_iter.c: Delete.
* g++.dg/cilk-plus/CK/stl_rev_iter.c: Delete.
* g++.dg/cilk-plus/CK/stl_test.c: Delete.
* g++.dg/cilk-plus/cilk-plus.exp
* g++.dg/cilk-plus/ef_test.C: Delete.
* g++.dg/cilk-plus/for.C: Delete.
* g++.dg/cilk-plus/for2.C: Delete.
* g++.dg/cilk-plus/for3.C: Delete.
* g++.dg/cilk-plus/for4.C: Delete.
* g++.dg/cilk-plus/pr60967.C: Delete.
* g++.dg/cilk-plus/pr69028.C: Delete.
* g++.dg/cilk-plus/pr70565.C: Delete.
* g++.dg/pr57662.C: Delete.
* gcc.dg/cilk-plus/cilk-plus.exp
* gcc.dg/cilk-plus/for1.c: Delete.
* gcc.dg/cilk-plus/for2.c: Delete.
* gcc.dg/cilk-plus/jump-openmp.c: Delete.
* gcc.dg/cilk-plus/jump.c: Delete.
* gcc.dg/cilk-plus/pr69798-1.c: Delete.
* gcc.dg/cilk-plus/pr69798-2.c: Delete.
* gcc.dg/cilk-plus/pr78306.c: Delete.
* gcc.dg/cilk-plus/pr79116.c: Delete.
* gcc.dg/graphite/id-28.c: Delete.
* lib/cilk-plus-dg.exp: Delete.
* lib/target-supports.exp (cilkplus_runtime): Delete.
2017-11-28 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/81020

View File

@ -1,5 +0,0 @@
/* { dg-do compile { target cilkplus } } */
/* { dg-options "-fcilkplus" } */
/* { dg-prune-output "undeclared here \\(not in a function\\)|\[^\n\r\]* was not declared in this scope" } */
void f () __attribute__((__simd__, __vector__)); /* { dg-error "in the same function marked as a Cilk Plus" "PR68158" } */

View File

@ -1,51 +0,0 @@
/* { dg-do run } */
/* { dg-options "-fcilkplus -fdump-tree-original" } */
#if HAVE_IO
#include <stdio.h>
#endif
#include <assert.h>
const int n = 8;
float x[8], y[8], z[8];
int main() {
int i = 0;
float x_sum =0;
for(i=1; i<=5; i+=4 ) {
x[0:n] = 3;
y[0:n] = i;
z[0:n] = 0;
#if HAVE_IO
printf("x\ty\tz\n");
for( size_t k=0; k<n; ++k ) {
printf("%g\t%g\t%g\n",x[k],y[k],z[k]);
}
x_sum = __sec_reduce_add (x[0:n]);
printf("sec_reduce_add (x[0:n]) = %6.3f\n", x_sum);
#endif
assert( __sec_reduce_add(x[0:n])==3*n );
assert( __sec_reduce_add(y[0:n])==i*n );
assert( __sec_reduce_add(z[0:n])==0 );
if (x[0:n] >= y[0:n]) {
z[0:n] = x[0:n] - y[0:n];
} else {
z[0:n] = x[0:n] + y[0:n];
}
#if HAVE_IO
printf("x\ty\tz\n");
for( size_t k=0; k<n; ++k ) {
printf("%g\t%g\t%g\n",x[k],y[k],z[k]);
}
#endif
assert( __sec_reduce_add(x[0:n])==3*n );
assert( __sec_reduce_add(y[0:n])==i*n );
assert( __sec_reduce_add(z[0:n])==(3>=i?3-i:3+i)*n );
}
return 0;
}
/* The C++ FE once emitted a bogus error_mark_node for this test case. */
/* { dg-final { scan-tree-dump-not "<<< error >>>" "original" } } */

View File

@ -1,84 +0,0 @@
/* { dg-do run } */
/* { dg-options "-fcilkplus" } */
#include <stdlib.h>
int main2 (char **argv);
int main(void)
{
int x = 0;
const char *array[] = {"a.out", "5"};
x = main2 ((char **)array);
return x;
}
int main2 (char **argv)
{
int array[10], ii = 0, x = 2, z= 0 , y = 0 ;
for (ii = 0; ii < 10; ii++)
array[ii] = 10;
array[0:10:1] = 15;
for (ii = 0; ii < 10; ii++)
if (array[ii] != 15)
return 5;
array[0:5:2] = 20;
for (ii = 0; ii < 10; ii += 2)
if (array[ii] != 20)
return 4;
x = atoi(argv[1]);
z = (10-atoi(argv[1]))/atoi(argv[1]);
array[x:5:z] = 50;
for (ii = x; ii < 10; ii += z)
if (array[ii] != 50)
return 3;
x = atoi(argv[1]);
z = (10-atoi(argv[1]))/atoi(argv[1]);
y = 10-atoi(argv[1]);
array[x:y:z] = 505;
for (ii = x; ii < 10; ii += z)
if (array[ii] != 505)
return 4;
x = atoi(argv[1]);
z = (10-atoi(argv[1]))/atoi(argv[1]);
y = 10-atoi(argv[1]);
array[x:y:((10-atoi(argv[1]))/atoi(argv[1]))] = 25;
for (ii = x; ii < 10; ii += z)
if (array[ii] != 25)
return 5;
x = atoi(argv[1]);
z = (10-atoi(argv[1]))/atoi(argv[1]);
y = 10-atoi(argv[1]);
array[atoi(argv[1]):(10-atoi(argv[1])):((10-atoi(argv[1]))/atoi(argv[1]))] =
1400;
for (ii = x; ii < 10; ii += z)
if (array[ii] != 1400)
return 6;
array[atoi("5"):5:1] = 5555;
for (ii = atoi ("5"); ii < 10; ii++)
if (array[ii] != 5555)
return 7;
array[atoi("5"):atoi("5"):atoi("1")] = 9999;
for (ii = atoi ("5"); ii < (atoi ("5") + atoi ("5")); ii += atoi ("1"))
if (array[ii] != 9999)
return 8;
return 0;
}

View File

@ -1,128 +0,0 @@
/* { dg-do run } */
/* { dg-options "-fcilkplus" } */
#include <stdlib.h>
int main2 (char **argv);
int main(void)
{
int x = 0;
const char *array[] = {"a.out", "5"};
x = main2 ((char **)array);
return x;
}
int main2(char **argv)
{
int array[10], array2[10], ii = 0, x = 2, z= 0 , y = 0 ;
for (ii = 0; ii < 10; ii++)
{
array[ii] = 10;
array2[ii] = 5000000;
}
array2[0:10:1] = array[0:10:1];
for (ii = 0; ii < 10; ii++)
if (array2[ii] != array[ii])
return 1;
for (ii = 0; ii < 10; ii++)
{
array[ii] = 10;
array2[ii] = 5000000;
}
array2[0:5:2] = array[0:5:2];
for (ii = 0; ii < 10; ii += 2)
if (array[ii] != array2[ii])
return 2;
for (ii = 0; ii < 10; ii++)
{
array[ii] = 10;
array2[ii] = 5000000;
}
x = atoi(argv[1]);
z = (10-atoi(argv[1]))/atoi(argv[1]);
array2[x:5:z] = array[x:5:z];
for (ii = x; ii < 5; ii += z)
if (array2[ii] != array[ii])
return 3;
for (ii = 0; ii < 10; ii++)
{
array[ii] = 500;
array2[ii] = 1000000;
}
x = atoi(argv[1]);
z = (10-atoi(argv[1]))/atoi(argv[1]);
y = 10-atoi(argv[1]);
array2[x:y:z] = array[x:y:z];
for (ii = x; ii < 10; ii = ii + z)
if (array2[ii] != array[ii])
return 4;
for (ii = 0; ii < 10; ii++)
{
array[ii] = 500;
array2[ii] = 1000000;
}
x = atoi(argv[1]);
z = (10-atoi(argv[1]))/atoi(argv[1]);
y = 10-atoi(argv[1]);
array[x:y:((10-atoi(argv[1]))/atoi(argv[1]))] =
array2[x:y:((10-atoi(argv[1]))/atoi(argv[1]))];
for (ii = x; ii < 10; ii += z)
if (array[ii] != array2[ii])
return 5;
x = atoi(argv[1]);
z = (10-atoi(argv[1]))/atoi(argv[1]);
y = 10-atoi(argv[1]);
for (ii = 0; ii < 10; ii++)
{
array[ii] = 500;
array2[ii] = 1000000;
}
array[atoi(argv[1]):(10-atoi(argv[1])):((10-atoi(argv[1]))/atoi(argv[1]))] =
array2[atoi(argv[1]):(10-atoi(argv[1])):((10-atoi(argv[1]))/atoi(argv[1]))];
for (ii = x; ii < 10; ii += z)
if (array[ii] != array2[ii])
return 6;
for (ii = 0; ii < 10; ii++)
{
array[ii] = 4;
array2[ii] = 2;
}
array[atoi("5"):5:1] = array2[atoi("5"):5:1];
for (ii = atoi ("5"); ii < 10; ii++)
if (array[ii] != array2[ii])
return (7);
for (ii = 0; ii < 10; ii++)
{
array[ii] = 5;
array2[ii] = 1;
}
array[atoi("5"):atoi("5"):atoi("1")] = array2[atoi("5"):atoi("5"):atoi("1")];
for (ii = 5; ii < 10; ii++)
if (array2[ii] != array[ii])
return 8;
return 0;
}

View File

@ -1,102 +0,0 @@
/* { dg-do run } */
/* { dg-options "-fcilkplus" } */
#include <stdlib.h>
int main2(char **argv);
int main(void)
{
int x = 0;
const char *array[] = {"a.out", "10", "15"};
x = main2 ((char **)array);
return x;
}
int main2(char **argv)
{
int array[10][15], ii = 0, jj = 0,x = 0, z= 1 , y = 10 ;
int array_2[10][15];
int argc = 3;
__asm volatile ("" : "+r" (argc));
for (ii = 0; ii < 10; ii++) {
for (jj = 0; jj< 15; jj++) {
array[ii][jj] = ii+jj;
array_2[ii][jj] = 0;
}
}
array_2[0:5:2][0:5:3] = array[0:5:2][0:5:3] + 1 + 5 + array[0][5] + x;
for (ii = 0; ii < 10; ii += 2)
{
for (jj = 0; jj < 15; jj += 3)
{
if (array_2[ii][jj] != array[ii][jj] + 1 + 5 + array[0][5] + x)
return 2;
}
}
for (ii = 0; ii < 10; ii++) {
for (jj = 0; jj< 15; jj++) {
array[ii][jj] = ii+jj;
array_2[ii][jj] = 0;
}
}
x = atoi(argv[1]);
y = atoi(argv[2]);
array_2[0:x:1][0:y:1] = array[0:x:1][0:y:1] + x + y + array[0:x:1][0:y:1];
for (ii = 0; ii < x; ii++)
{
for (jj = 0; jj < y; jj++)
{
if (array_2[ii][jj] != array[ii][jj] + x + y + array[ii][jj])
return 3;
}
}
for (ii = 0; ii < 10; ii++) {
for (jj = 0; jj< 15; jj++) {
array[ii][jj] = ii+jj;
array_2[ii][jj] = 0;
}
}
x = atoi(argv[1]);
y = atoi(argv[2]);
z = (20- atoi (argv[1]))/atoi(argv[1]);
/* (20-10)/10 evaluates to 1 all the time :-). */
array_2[0:x:z][0:y:z] = array[0:x:z][0:y:z] + array[0:x:z][0:y:z] + y + z;
for (ii = 0; ii < x; ii += z)
{
for (jj = 0; jj < y; jj += z)
{
if (array_2[ii][jj] != array[ii][jj] + array[ii][jj] + y + z)
return 4;
}
}
for (ii = 0; ii < 10; ii++) {
for (jj = 0; jj< 15; jj++) {
array[ii][jj] = ii+jj;
array_2[ii][jj] = 0;
}
}
x = argc-3;
y = 20-atoi(argv[1]);
z = (20- atoi (argv[1]))/atoi(argv[1]);
/* (20-10)/10 evaluates to 1 all the time :-). */
array_2[(argc-3):(20-atoi(argv[1])):(20-atoi(argv[1]))/atoi(argv[1])][(argc-3):(30-atoi(argv[2])): ((30-atoi(argv[2]))/atoi(argv[2]))] = array[(argc-3):20-atoi(argv[1]):(20-atoi(argv[1]))/atoi(argv[1])][(argc-3):(30-atoi(argv[2])): (30-atoi(argv[2]))/atoi(argv[2])] + array[(argc-3):20-atoi(argv[1]):(20-atoi(argv[1]))/atoi(argv[1])][(argc-3):(30-atoi(argv[2])): (30-atoi(argv[2]))/atoi(argv[2])] * array[(argc-3):20-atoi(argv[1]):(20-atoi(argv[1]))/atoi(argv[1])][(argc-3):(30-atoi(argv[2])): (30-atoi(argv[2]))/atoi(argv[2])];
for (ii = 0; ii < 10; ii++)
{
for (jj = 0; jj < 15; jj++)
{
if (array_2[ii][jj] != array[ii][jj] + array[ii][jj] * array[ii][jj])
return 5;
}
}
return 0;
}

View File

@ -1,70 +0,0 @@
/* { dg-do run } */
/* { dg-options "-fcilkplus" } */
/* { dg-additional-options "-ffloat-store" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
#define NUMBER 100
#if HAVE_IO
#include <stdio.h>
#endif
/* #include <stdlib.h> */
double my_func (double x, double y)
{
if (x > y)
return x;
else
return y;
}
/* char __sec_reduce_add (int *); */
int main(void)
{
int ii,array[NUMBER], y = 0, y_int = 0, array2[NUMBER];
double x, yy, array3[NUMBER], array4[NUMBER];
double max_value = 0.000, min_value = 0.000, add_value, mul_value = 1.00;
int max_index = 0, min_index = 0;
for (ii = 0; ii < NUMBER; ii++)
{
array[ii] = 1+ii;
array2[ii]= 2;
}
for (ii = 0; ii < NUMBER; ii++)
{
if (ii%2 && ii)
array3[ii] = (double)(1.0000/(double)ii);
else
array3[ii] = (double) ii + 0.10;
array4[ii] = (double) (1.00000/ (double)(ii+1));
}
/* array[:] = 5; */
x = __sec_reduce (0, array3[:] * array4[:], my_func);
y = __sec_reduce_max_ind ( array3[:] * array4[:]);
/* Initialize it to the first variable. */
max_value = array3[0] * array4[0];
for (ii = 0; ii < NUMBER; ii++)
if (array3[ii] * array4[ii] > max_value) {
max_value = array3[ii] * array4[ii];
max_index = ii;
}
#if HAVE_IO
for (ii = 0; ii < NUMBER; ii++)
printf("%5.3f ", array3[ii] * array4[ii]);
printf("\n");
printf("Max = %5.3f\t Max Index = %2d\n", x, y);
#endif
if (x != max_value)
return 1;
if (y != max_index)
return 2;
return 0;
}

View File

@ -1,70 +0,0 @@
/* { dg-do run } */
/* { dg-options "-fcilkplus" } */
/* { dg-additional-options "-ffloat-store" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
#define NUMBER 100
#if HAVE_IO
#include <stdio.h>
#endif
/* #include <stdlib.h> */
void my_func (double *x, double y)
{
if (*x < y)
*x = y;
}
int main(void)
{
int ii,array[NUMBER], y = 0, y_int = 0, array2[NUMBER];
double x = 0.000, yy, array3[NUMBER], array4[NUMBER];
double max_value = 0.000, min_value = 0.000, add_value, mul_value = 1.00;
int max_index = 0, min_index = 0;
#if 1
for (ii = 0; ii < NUMBER; ii++)
{
array[ii] = 1+ii;
array2[ii]= 2;
}
for (ii = 0; ii < NUMBER; ii++)
{
if (ii%2 && ii)
array3[ii] = (double)(1.0000/(double)ii);
else
array3[ii] = (double) ii + 0.10;
array4[ii] = (double) (1.00000/ (double)(ii+1));
}
#endif
/* array[:] = 5; */
__sec_reduce_mutating (&x, array3[:] * array4[:], my_func);
#if 1
y = __sec_reduce_max_ind ( array3[:] * array4[:]);
/* Initialize it to the first variable. */
max_value = array3[0] * array4[0];
for (ii = 0; ii < NUMBER; ii++)
if (array3[ii] * array4[ii] > max_value) {
max_index = ii;
}
for (ii = 0; ii < NUMBER; ii++)
my_func (&max_value, array3[ii] * array4[ii]);
#if HAVE_IO
for (ii = 0; ii < NUMBER; ii++)
printf("%5.3f ", array3[ii] * array4[ii]);
printf("\n");
printf("Max = %5.3f\t Max Index = %2d\n", x, y);
printf("Max = %5.3f\t Max Index = %2d\n", max_value, max_index);
#endif
if (x != max_value)
return 1;
if (y != max_index)
return 2;
#endif
return 0;
}

View File

@ -1,124 +0,0 @@
#if HAVE_IO
#include <stdio.h>
#endif
/* #include <stdlib.h> */
/* char __sec_reduce_add (int *); */
int main(void)
{
int ii,array[10], y = 0, y_int = 0, array2[10];
double x, yy, array3[10], array4[10];
double max_value = 0.000, min_value = 0.000, add_value, mul_value = 1.00;
int max_index = 0, min_index = 0;
for (ii = 0; ii < 10; ii++)
{
array[ii] = 1+ii;
array2[ii]= 2;
}
for (ii = 0; ii < 10; ii++)
{
if (ii%2 && ii)
array3[ii] = (double)(1.0000/(double)ii);
else
array3[ii] = (double) ii + 0.10;
array4[ii] = (double) (1.00000/ (double)(ii+1));
}
/* array[:] = 5; */
x = __sec_reduce_max (array3[:] * array4[:]);
y = __sec_reduce_max_ind ( array3[:] * array4[:]);
/* Initialize it to the first variable. */
max_value = array3[0] * array4[0];
for (ii = 0; ii < 10; ii++)
if (array3[ii] * array4[ii] > max_value) {
max_value = array3[ii] * array4[ii];
max_index = ii;
}
#if HAVE_IO
for (ii = 0; ii < 10; ii++)
printf("%5.3f ", array3[ii] * array4[ii]);
printf("\n");
printf("Max = %5.3f\t Max Index = %2d\n", x, y);
#endif
if (x != max_value)
return 1;
if (y != max_index)
return 2;
x = __sec_reduce_min (array3[:] * array4[:]);
y = __sec_reduce_min_ind ( array3[:] * array4[:]);
#if HAVE_IO
for (ii = 0; ii < 10; ii++)
printf("%5.3f ", array3[ii] * array4[ii]);
printf("\n");
printf("Min = %5.3f\t Min Index = %2d\n", x, y);
#endif
/* Initialize it to the first variable. */
min_value = array3[0] * array4[0];
for (ii = 0; ii < 10; ii++)
if (array3[ii] * array4[ii] < min_value) {
min_value = array3[ii] * array4[ii];
min_index = ii;
}
if (x != min_value)
return 3;
if (y != min_index)
return 4;
x = __sec_reduce_add (array3[:] * array4[:]);
yy = __sec_reduce_mul ( array3[:] * array4[:]);
#if HAVE_IO
for (ii = 0; ii < 10; ii++)
printf("%5.3f ", array3[ii] * array4[ii]);
printf("\n");
printf("Add = %5.3f\t Mul = %f\n", x, yy);
#endif
/* Initialize it to the first variable. */
add_value = 0.0000;
mul_value = 1.0000;
for (ii = 0; ii < 10; ii++)
{
add_value += (array3[ii] * array4[ii]);
mul_value *= (array3[ii] * array4[ii]);
}
if (x != add_value)
return 5;
if (yy != mul_value)
return 6;
for (ii = 0; ii < 10; ii++)
{
if (ii%2 && ii)
array3[ii] = (double)(1.0000/(double)ii);
else
array3[ii] = (double) ii + 0.00;
array4[ii] = (double) (1.00000/ (double)(ii+1));
}
y_int = __sec_reduce_any_zero (array3[:] * array4[:]);
y = __sec_reduce_all_zero ( array3[:] * array4[:]);
if (y_int != 1)
return 7;
if (y != 0)
return 8;
#if HAVE_IO
for (ii = 0; ii < 10; ii++)
printf("%5.3f ", array3[ii] * array4[ii]);
printf("\n");
printf("Any Zeros = %d\t All Zeros = %d\n", y_int, y);
#endif
return 0;
}

View File

@ -1,77 +0,0 @@
/* { dg-do run } */
/* { dg-options "-fcilkplus" } */
#define NUMBER 100
#if HAVE_IO
#include <stdio.h>
#endif
int main(void)
{
int argc = 1;
int ii,array[NUMBER], y = 0, y_int = 0, array2[NUMBER], y_int2=0, y2=0;
double x, yy, array3[NUMBER], array4[NUMBER];
int all_zero, all_nonzero, any_zero, any_nonzero;
for (ii = 0; ii < NUMBER; ii++)
{
array[ii] = 0;
array2[ii] = 5;
if (ii%2 && ii)
array3[ii] = (double)(1.0000/(double)ii);
else
array3[ii] = (double) ii + 0.00;
array4[ii] = (double) (1.00000/ (double)(ii+1));
}
__asm volatile ("" : "+r" (argc));
y_int = __sec_reduce_any_nonzero (array3[:] + array[4]);
y_int2 = __sec_reduce_any_zero (array3[:] + array[4]);
y = __sec_reduce_all_nonzero ((array3[:] + array4[:]) * (argc-1));
y2 = __sec_reduce_all_zero ((array3[:] + array4[:]) * (argc-1));
any_zero = 0;
any_nonzero = 0;
for (ii = 0; ii < NUMBER; ii++)
{
if ((array3[ii] + array[4]) == 0)
any_zero = 1;
else
any_nonzero = 1;
}
if (any_nonzero != y_int)
return 1;
if (any_zero != y_int2)
return 2;
all_zero = 0;
all_nonzero = 0;
for (ii = 0; ii < NUMBER; ii++)
{
if (((array3[ii] + array4[ii]) * (argc-1)) == 0)
all_zero = 1;
else
all_nonzero = 1;
}
if (y != all_nonzero)
return 3;
if (all_zero != y2)
return 4;
#if HAVE_IO
for (ii = 0; ii < NUMBER; ii++) {
printf("%5.3f ", array3[ii] +array4[ii]);
}
printf("\n");
for (ii = 0; ii < NUMBER; ii++) {
printf("%5.3f ", (array3[ii] + array4[ii]) * (argc-1));
}
printf("\n");
printf("Any Non-zeros (1st line) = %d\t All non-zeros (1st line) = %d\n",
y_int, y);
printf("Any zeros (2nd line) = %d\t All zeros (2nd line) = %d\n", y_int2, y2);
#endif
return 0;
}

View File

@ -1,55 +0,0 @@
/* { dg-do run } */
/* { dg-options "-fcilkplus" } */
#include <stdlib.h>
int main2 (char **argv);
int main(void)
{
int x = 0;
const char *array[] = {"a.out", "5"};
x = main2 ((char **)array);
return x;
}
int main2 (char **argv)
{
int argc = 2;
int array[10], array2[10], ii = 0, x = 2, z= 0 , y = 0 ;
__asm volatile ("" : "+r" (argc));
for (ii = 0; ii < 10; ii++)
array[ii] = 10;
for (ii = 0; ii < 10; ii++)
array2[ii] = 1;
array[0:10:1] = (array[:], 15);
for (ii = 0; ii < 10; ii++)
if (array[ii] != 15)
return 1;
array[0:5:2] = (argc+2, 20);
for (ii = 0; ii < 10; ii += 2)
if (array[ii] != 20)
return 2;
x = atoi(argv[1]);
z = (10-atoi(argv[1]))/atoi(argv[1]);
array[x:5:z] = 50;
array[:] = (atoi(argv[1]), (array2[0:10]+5));
for (ii = 0; ii < 10; ii++)
if (array[ii] != 6)
return (3);
array[:] = (atoi(argv[1]), (array2[0:10]+array2[0:10]));
for (ii = 0; ii < 10; ii++)
if (array[ii] != 2)
return 4;
return 0;
}

View File

@ -1,44 +0,0 @@
/* { dg-do run } */
/* { dg-options "-fcilkplus" } */
#include <stdlib.h>
int main(void)
{
int argc = 1;
short array[1000], array2[1000], *array3, cond[1000], ii = 0;
__asm volatile ("" : "+r" (argc));
for (ii = 0; ii < 1000; ii++) {
cond[ii] = 1;
array[ii] = 1000;
array2[ii] = 2000;
}
array2[:] = cond[:] ? array[:] : array2[:];
for (ii = 0; ii < 1000; ii++) {
if (array2[ii] != 1000)
return 1;
}
array2[0:500:2] = cond[0:500] ? array[0:500:1] : array2[0:500:2];
for (ii = 0; ii < 1000; ii++) {
if (array2[ii] != 1000)
return 2;
}
for (ii = 0; ii < 1000; ii++) {
cond[ii] = ii % 2; /* This should give 0, 1, 0, 1, 0, 1, 0,... */
array2[ii] = 5;
array[ii] = 3;
}
array3 = (short *) malloc (sizeof (short) * 1000);
array3[0:1000:argc] = cond[:] ? array[0:(argc * 1000)] : array2[argc-1:1000];
for (ii = 0; ii < 1000; ii++) {
if ((cond[ii] == 0 && array3[ii] != 5)
|| (cond[ii] == 1 && array3[ii] != 3))
return 3;
}
return 0;
}

View File

@ -1,19 +0,0 @@
/* { dg-do compile { target c } } */
/* { dg-options "-fcilkplus" } */
int main(void)
{
extern int func(int);
int array3[:], x, q; /* { dg-error "array notations cannot be used in declaration" } */
int array3[1:2:x]; /* { dg-error "array notations cannot be used in declaration" } */
extern char array3[1:func(x)]; /* { dg-error "array notations cannot be used in declaration" } */
int *a, ***b;
extern char *c;
int array2[10];
a[:] = 5; /* { dg-error "start-index and length fields necessary for using array notations in pointers" } */
c[1:2] = 3; /* This is OK. */
(array2)[:] = 5; /* This is OK. */
b[1:2][1:func(x)][:] = 3; /* { dg-error "start-index and length fields necessary for using array notations in pointers" } */
}

View File

@ -1,10 +0,0 @@
/* { dg-options "-fcilkplus" } */
extern int a[];
extern int *b;
void foo()
{
a[:] = 5; // { dg-error "start-index and length fields necessary for using array notation" }
b[:] = 5; // { dg-error "start-index and length fields necessary for using" }
}

View File

@ -1,44 +0,0 @@
/* { dg-do run } */
/* { dg-options "-fcilkplus" } */
#define NUMBER 1000
#if HAVE_IO
#include <stdio.h>
#endif
int func (int *x)
{
int q = *x;
q++;
*x = q;
#if HAVE_IO
printf("%d\n", (q));
#endif
return *x;
}
int main (void)
{
char array[NUMBER], array2[NUMBER];
int ii, d = 2;
#if 1
for (ii = 0; ii < NUMBER; ii++) {
array[ii] = 5;
array2[ii]= 2;
}
#endif
d = func (&d); /* d = 1 */
array2[:] = d * array[:] + (char) func (&d); /* 3 * 5 + 4 */
#if HAVE_IO
for (ii = 0; ii < NUMBER; ii++)
printf("array2[%d] = %d\n", ii, array2[ii]);
#endif
for (ii = 0; ii < NUMBER; ii++)
if (array2[ii] != (3 * 5 + 4))
return 1;
return 0;
}

View File

@ -1,87 +0,0 @@
/* { dg-do run } */
/* { dg-options "-fcilkplus" } */
#ifdef HAVE_IO
#include <stdio.h>
#endif
int func1(int x)
{
/* If x == 2 then it should return 0. */
return (x - 2);
}
int func2(int x)
{
/* If x == 2 then it should return 1000. */
return (x * 500);
}
int func3 (int x)
{
/* If x == 2 then it should return 1. */
/* If x == 1 then it should return 0. */
return (x-1);
}
int func4(int x)
{
if (x > 0)
return x;
else
return x--;
}
/* This program makes an assumption that argc == 1. */
int main (void)
{
int argc = 1;
int array[2500];
/* This is done to make sure the compiler does not optimize out argc. */
__asm volatile ("" : "+r" (argc));
/* This should set array[0->999] to 5. */
array[argc-1:func2(++argc):1] = 5;
array[1000:500:1] = 10; /* set all variables in array[1000-->1499] to 10. */
array[1500:500:1] = 15; /* set all variables in array[1500-->1999] to 15. */
array[2000:500:1] = 20; /* set all variables in array[2000-->2499] to 20. */
array[2000:500:1] = 25; /* set all variables in array[2500-->2999] to 25. */
array[2000:500:1] = 30; /* set all variables in array[3000-->3499] to 30. */
argc = func3 (argc); /* This will set argc back to 1. */
#if HAVE_IO
printf("argc = %d\n", argc);
#endif
/* If the parameters inside the function get evaluated only once, then this
if statement must work fine, i.e. the triplet values will be 0, 1000, 1.
Otherwise, the program should crash or give some uneasy value. */
/* If done correctly, it should boil down to: array[0:1000:1]. */
if (array[func3(argc):func2(++argc)] != 5) {
#ifdef HAVE_IO
printf ("Should not be there(1).\n");
#endif
return 1;
}
/* If done correctly, it should boil down to: array[999:500:-1]. */
if (func4(array[func2(argc)-1:func2(argc--):func1(argc)]) != 5) {
#ifdef HAVE_IO
printf ("Should not be there(2).\n");
#endif
return 2;
}
/* If done correctly, it should boil down to: array[1000:500:1]. */
if (func4 (func4(array[func2(argc++):500: func1(argc--)])) != 5) {
#ifdef HAVE_IO
printf ("Should not be there(3).\n");
#endif
return 3;
}
return 0;
}

View File

@ -1,14 +0,0 @@
/* { dg-do compile } */
/* { dg-options "-fcilkplus" } */
typedef void (*f) (void *);
f b[1024];
void *c[1024][1024];
int
main (void)
{
(b[:]) (c[:][:]); /* { dg-error "rank mismatch" "" { xfail *-*-* } } */
return 0;
}

View File

@ -1,21 +0,0 @@
/* { dg-do compile } */
/* { dg-options "-fcilkplus" } */
typedef int (*foo)(int);
int main(void)
{
int array[10], array2[10][10];
foo func_array[10];
foo func_array2[10][10];
foo ***func_array_ptr;
int argc = 5;
array[:] = func_array[:](10);
func_array[0:5](10);
func_array2[0:5][:](10);
array2[0:5][:] = func_array2[0:5][:](10);
func_array_ptr[0:5][0:4][0:argc:2](argc);
return 0;
}

View File

@ -1,28 +0,0 @@
/* { dg-do compile } */
/* { dg-options "-fcilkplus" } */
float q;
void func (int *x)
{
*x = 5;
}
int main (void)
{
int array[10], array2[10];
array2[:] = array[1.5:2]; /* { dg-error "start-index of array notation triplet is not an integer" } */
array2[:] = array[1:2.32333333333]; /* { dg-error "length of array notation triplet is not an integer" } */
array2[1:2:1.5] = array[:]; /* { dg-error "stride of array notation triplet is not an integer" } */
func (&array2[1:2.34:3]); /* { dg-error "length of array notation triplet is not an integer" } */
array2[1.43:9]++; /* { dg-error "start-index of array notation triplet is not an integer" } */
array2[1:9.3]++; /* { dg-error "length of array notation triplet is not an integer" } */
array2[1:9:0.3]++; /* { dg-error "stride of array notation triplet is not an integer" } */
++array2[1:q:3]; /* { dg-error "length of array notation triplet is not an integer" } */
array2[:] = array[q:1:3]; /* { dg-error "start-index of array notation triplet is not an integer" } */
array2[:] = array[1:q:3]; /* { dg-error "length of array notation triplet is not an integer" } */
array2[:] = array[1:3:q]; /* { dg-error "stride of array notation triplet is not an integer" } */
func (&array2[1:q:3]); /* { dg-error "length of array notation triplet is not an integer" } */
return 0;
}

View File

@ -1,19 +0,0 @@
/* { dg-options "-fcilkplus" } */
int main (void)
{
extern int func (int);
int array[10][10], array2[10];
int argc = 1;
array2[array[:][:]] = 5; /* { dg-error "rank of the array's index is greater than 1" } */
array2[array[:][:]] = 5; /* { dg-error "rank of the array's index is greater than 1" } */
func (array2[array[:][:]]); /* { dg-error "rank of the array's index is greater than 1" } */
func (array2[array[argc:func(5)][0:10:2]]); /* { dg-error "rank of the array's index is greater than 1" } */
array[array2[:]][array2[:]] = 5; /* This is OK. */
array[array2[:]][array2[:]] = array2[array[:][:]]; /* { dg-error "rank of the array's index is greater than 1" } */
array[array2[:]][array2[:]] = array2[array[0:10:1][:]]; /* { dg-error "rank of the array's index is greater than 1" } */
array[array2[:]][array2[:]] = array2[array[:][argc:func (argc)]]; /* { dg-error "rank of the array's index is greater than 1" } */
return 0;
}

View File

@ -1,60 +0,0 @@
/* { dg-do run } */
/* { dg-options "-fcilkplus" } */
#define NUMBER 20
#if HAVE_IO
#include <stdio.h>
#endif
float array4[NUMBER][NUMBER][NUMBER][NUMBER];
int main(void)
{
int array[NUMBER][NUMBER], array2[NUMBER], array3[NUMBER], x = 0, y;
int x_correct, y_correct, ii, jj = 0, kk = 0, ll = 0;
for (ii = 0; ii < NUMBER; ii++)
{
for (jj = 0; jj < NUMBER; jj++)
{
array[ii][jj] = 1+ii;
array2[ii]= 2;
array3[ii]= 3;
}
}
array[array2[:]][array3[:]] = 1000;
for (ii = 0; ii < NUMBER; ii++)
if (array[array2[ii]][array3[ii]] != 1000)
return 1;
#if HAVE_IO
for (ii = 0; ii < NUMBER; ii++) {
for (jj = 0; jj < NUMBER; jj++) {
printf("%4d\t", array[ii][jj]);
}
printf("\n");
}
#endif
array4[array2[:]][array3[0:NUMBER:1]][array2[0:NUMBER:1]][array3[0:NUMBER:1]] =
(float)array[array2[:]][array3[:]];
for (ii = 0; ii < NUMBER; ii++)
if (array4[array2[ii]][array3[ii]][array2[ii]][array3[ii]] !=
(float)array[array2[ii]][array3[ii]])
return 2;
#if HAVE_IO
for (ii = 0; ii < NUMBER; ii++) {
for (jj = 0; jj < NUMBER; jj++) {
for (kk = 0; kk < NUMBER; kk++) {
for (ll = 0; ll < NUMBER; ll++) {
printf("%4d\n", array4[ii][jj][kk][ll]);
}
}
}
}
#endif
return 0;
}

View File

@ -1,306 +0,0 @@
/* { dg-do run } */
/* { dg-options "-fcilkplus" } */
#if HAVE_IO
#include <stdio.h>
#endif
#include <stdlib.h>
int main2 (char **argv);
int main(int argc, char **argv)
{
int x = 0;
const char *array[] = {"a.out", "10", "15"};
x = main2 ((char **) array);
return x;
}
int main2 (char **argv)
{
int x = 3, y, z, array[10], array2[10], TwodArray[10][10], jj,kk,ll ;
int array2_check[10], array2d_check[10][10], array2d[10][10];
int FourDArray[10][10][10][10], array4[10][10][10][10];
int array4_check[10][10][10][10];
int ii = 0, argc = 3;
__asm volatile ("" : "+r" (argc));
for (ii = 0; ii < 10; ii++)
{
array[ii] = argc%3;
array2[ii]= 10;
array2_check[ii] = 10;
}
if (!array[:])
array2[:] = 5;
else
array2[:] = 10;
for (ii = 0; ii < 10; ii++)
{
if (!array[ii])
array2_check[ii] = 5;
else
array2_check[ii] = 10;
}
for (ii = 0; ii < 10; ii++)
if (array2_check[ii] != array2[ii])
return 2;
if (!(array[0:10:1] + array[0:10:1]))
array2[:] = 5;
else
array2[:] = 10;
for (ii = 0; ii < 10; ii++)
{
if (!(array[ii]+ array[ii]))
array2_check[ii] = 5;
else
array2_check[ii] = 10;
}
for (ii = 0; ii < 10; ii++)
if (array2_check[ii] != array2[ii])
return 3;
x = atoi (argv[1])-10;
y = atoi (argv[1])/2;
z = (atoi (argv[1]))/5;
for (ii = 0; ii < 10; ii++)
{
if (ii % 2)
array[ii] = 0;
else
array[ii] = 1;
}
/*printf("x = %2d y = %2d z = %2d\n", x, y, z); */
for (ii = 0; ii < 10; ii++)
array[ii] = 10;
/* This if loop will change all the 10's to 5's */
if (array[x:y:z] != 9)
array2[:] = 5;
else
array2[:] = 10;
for (ii = x; ii < (x+y); ii += z)
{
if (array[ii] != 9)
array2_check[ii] = 5;
else
array2_check[ii] = 10;
}
for (ii = 0; ii < 10; ii++)
if (array2_check[ii] != array2[ii])
return 4;
for (ii = 0; ii < 10; ii++) {
array2[ii] = 10;
array2_check[ii] = 10;
}
/* This if loop will change all the 10's to 5's */
if (array[atoi(argv[1])-10:atoi(argv[1])/2: atoi(argv[1])/5])
array2[atoi(argv[1])-10: atoi (argv[1])/2: atoi(argv[1])/5] = 5;
else
array2[atoi(argv[1])-10: atoi (argv[1])/2: atoi(argv[1])/5] = 10;
for (ii = atoi(argv[1])-10; ii < atoi(argv[1]) + (atoi (argv[1])-10);
ii +=atoi(argv[1])/5)
if (array[ii])
array2_check[ii] = 5;
else
array2_check[ii] = 10;
for (ii = 0; ii < 10; ii++)
if (array2_check[ii] != array2[ii]) {
#if HAVE_IO
printf("array2[%2d] = %2d array2_check[%2d] = %2d\n", ii, array2[ii],
ii, array2_check[ii]);
#endif
return 5;
}
for (ii = 0; ii < 10; ii++)
for (jj = 0; jj < 10; jj++)
TwodArray[ii][jj] = atoi(argv[1]);
for (ii = 0; ii < 10; ii++)
for (ii = 0; ii < 10; ii++) {
array2d[ii][jj] = 10;
array2d_check[ii][jj] = 10;
}
/* atoi(argv[1]) == 10, so it will convert all 10's to 5's */
if (TwodArray[:][:] != 10)
array2d[:][:] = 10;
else
array2d[:][:] = 5;
for (ii = 0; ii < 10; ii++) {
for (jj = 0; jj < 10; jj++) {
if (TwodArray[ii][jj] != 10)
array2d_check[ii][jj] = 10;
else
array2d_check[ii][jj] = 5;
}
}
for (ii = 0; ii < 10; ii++)
for (jj = 0; jj < 10; jj++)
if (array2d[ii][jj] != array2d_check[ii][jj])
return 6;
for (ii = 0; ii < 10; ii++)
for (jj = 0; jj < 10; jj++)
for (kk = 0; kk < 10; kk++)
for (ll = 0; ll < 10; ll++)
{
array4[ii][jj][kk][ll] = 10;
array4_check[ii][jj][kk][ll] = 10;
}
for (ii = 0; ii < 10; ii++)
for (jj = 0; jj < 10; jj++)
for (kk = 0; kk < 10; kk++)
for (ll = 0; ll < 10; ll++)
FourDArray[ii][jj][kk][ll] = atoi(argv[1]);
/* atoi(argv[1]) == 10, so it will convert all 10's to 5's */
if (FourDArray[:][:][:][:] != 10)
array4[:][:][:][:] = 10;
else
array4[:][:][:][:] = 5;
for (ii = 0; ii < 10; ii++) {
for (jj = 0; jj < 10; jj++) {
for (kk = 0; kk < 10; kk++) {
for (ll = 0; ll < 10; ll++) {
if (FourDArray[ii][jj][kk][ll] != 10)
array4_check[ii][jj][kk][ll] = 10;
else
array4_check[ii][jj][kk][ll] = 5;
}
}
}
}
for (ii = 0; ii < 10; ii++)
for (jj = 0; jj < 10; jj++)
for (kk = 0; kk < 10; kk++)
for (ll = 0; ll < 10; ll++)
if (array4_check[ii][jj][kk][ll] != array4[ii][jj][kk][ll])
return 7;
for (ii = 0; ii < 10; ii++)
for (jj = 0; jj < 10; jj++)
for (kk = 0; kk < 10; kk++)
for (ll = 0; ll < 10; ll++)
{
array4[ii][jj][kk][ll] = 10;
array4_check[ii][jj][kk][ll] = 10;
}
for (ii = 0; ii < 10; ii++)
for (jj = 0; jj < 10; jj++)
for (kk = 0; kk < 10; kk++)
for (ll = 0; ll < 10; ll++)
FourDArray[ii][jj][kk][ll] = atoi(argv[1]);
/* atoi(argv[1]) == 10, so it will convert all 10's to 5's */
if (FourDArray[0:10:1][0:5:2][9:10:-1][0:5:2] != 10)
array4[0:10:1][0:5:2][9:10:-1][0:5:2] = 10;
else
array4[0:10:1][0:5:2][9:10:-1][0:5:2] = 5;
for (ii = 0; ii < 10; ii++) {
for (jj = 0; jj < 10; jj += 2) {
for (kk = 9; kk >= 0; kk--) {
for (ll = 0; ll < 10; ll += 2) {
if (FourDArray[ii][jj][kk][ll] != 10)
array4_check[ii][jj][kk][ll] = 10;
else
array4_check[ii][jj][kk][ll] = 5;
}
}
}
}
for (ii = 0; ii < 10; ii++)
for (jj = 0; jj < 10; jj++)
for (kk = 0; kk < 10; kk++)
for (ll = 0; ll < 10; ll++)
if (array4_check[ii][jj][kk][ll] != array4[ii][jj][kk][ll]) {
#if HAVE_IO
printf("array4_check[%d][%d][%d][%d] = %d\n",ii, jj, kk, ll,
array4_check[ii][jj][kk][ll]);
printf("array4[%d][%d][%d][%d] = %d\n",ii, jj, kk, ll,
array4[ii][jj][kk][ll]);
#endif
return 8;
}
for (ii = 0; ii < 10; ii++)
for (jj = 0; jj < 10; jj++)
for (kk = 0; kk < 10; kk++)
for (ll = 0; ll < 10; ll++)
FourDArray[ii][jj][kk][ll] = atoi(argv[1]);
for (ii = 0; ii < 10; ii++)
for (jj = 0; jj < 10; jj++)
for (kk = 0; kk < 10; kk++)
for (ll = 0; ll < 10; ll++)
{
array4[ii][jj][kk][ll] = 10;
array4_check[ii][jj][kk][ll] = 10;
}
/* atoi(argv[1]) == 10, so it will convert all 10's to 5's */
if (FourDArray[0:10:1][0:5:2][9:10:-1][x:y:z] +
FourDArray[0:10:1][0:5:2][9:10:-1][x:y:z] != 20)
array4[0:10:1][0:5:2][9:10:-1][x:y:z] = 10;
else
array4[0:10][0:5:2][9:10:-1][x:y:z] = 5;
for (ii = 0; ii < 10; ii++) {
for (jj = 0; jj < 10; jj += 2) {
for (kk = 9; kk >= 0; kk--) {
for (ll = 0; ll < 10; ll += 2) {
if (FourDArray[ii][jj][kk][ll] != 10)
array4_check[ii][jj][kk][ll] = 10;
else
array4_check[ii][jj][kk][ll] = 5;
}
}
}
}
for (ii = 0; ii < 10; ii++)
for (jj = 0; jj < 10; jj++)
for (kk = 0; kk < 10; kk++)
for (ll = 0; ll < 10; ll++)
if (array4_check[ii][jj][kk][ll] != array4[ii][jj][kk][ll]) {
#if HAVE_IO
printf("array4_check[%d][%d][%d][%d] = %d\n",ii, jj, kk, ll,
array4_check[ii][jj][kk][ll]);
printf("array4[%d][%d][%d][%d] = %d\n",ii, jj, kk, ll,
array4[ii][jj][kk][ll]);
#endif
return 9;
}
return 0;
}

View File

@ -1,56 +0,0 @@
/* { dg-do compile } */
/* { dg-options "-fcilkplus" } */
#include <stdlib.h>
int main (void)
{
int x = 3, y, z, array[10], array2[10], TwodArray[10][10], jj,kk,ll ;
int array2_check[10], array2d_check[10][10], array2d[10][10];
int FourDArray[10][10][10][10], array4[10][10][10][10];
int array4_check[10][10][10][10];
int ii = 0;
x = 5;
y = 10;
z = 2;
if (!array[:]) /* This is OK! */
array2[:] = 5;
else
array2[:] = 10;
if (!(array[0:10:1] + array[0:10:1])) /* { dg-error "condition and the then-block" "" { target c } } */
array2d[:][:] = 5; /* { dg-error "rank mismatch with controlling expression of parent" "" { target c++ } } */
else
array2[:] = 10;
if (!(array[0:10:1] + array[0:10:1])) /* { dg-error "condition and the else-block" "" { target c } } */
array2[:] = 5;
else
array2d[:][:] = 10; /* { dg-error "rank mismatch with controlling expression of parent" "" { target c++ } } */
if (TwodArray[:][:] != 10) /* { dg-error "condition and the then-block" "" { target c } } */
array2[:] = 10; /* { dg-error "rank mismatch with controlling expression of parent" "" { target c++ } } */
else
array2[:] = 5;
if (FourDArray[43][:][:][:] != 10) /* This is OK! */
array4[45][:][:][:] = 10;
else
array4[32][:][:][:] = 5;
/* atoi(argv[1]) == 10, so it will convert all 10's to 5's */
if (FourDArray[42][0:10:1][9:10:-1][0:5:2] != 10) /* { dg-error "condition and the then-block" "" { target c } } */
array4[0:10:1][0:5:2][9:10:-1][0:5:2] = 10; /* { dg-error "rank mismatch with controlling expression of parent" "" { target c++ } } */
else
array4[0:10:1][0:5:2][9:10:-1][0:5:2] = 5;
/* atoi(argv[1]) == 10, so it will convert all 10's to 5's */
if (FourDArray[0:10:1][0:5:2][9:10:-1][x:y:z] +
FourDArray[0:10:1][0:5:2][9:-10:1][x:y:z] != 20)
array4[0:10:1][0:5:2][9:10:-1][x:y:z] = 10;
else
array4[0:10][0:5:2][9:10:-1][x:y:z] = 5;
return 0;
}

Some files were not shown because too many files have changed in this diff Show More