- 21 Jan, 2020 4 commits
-
-
The HSA/ROCm runtime rejects binaries not built for the exact GPU device present. So far, the libgomp amdgcn plugin does not verify that the GPU ISA and the ISA specified at compile time match before handing over the binary to the runtime. In case of a mismatch, the user is confronted with an unhelpful runtime error. This commit implements a runtime ISA check. In case of an ISA mismatch, the execution is aborted with a clear error message and a hint at the correct compilation parameters for the GPU on which the execution has been attempted. libgomp/ * plugin/plugin-gcn.c (EF_AMDGPU_MACH): New enum. * (EF_AMDGPU_MACH_MASK): New constant. * (gcn_isa): New typedef. * (gcn_gfx801_s): New constant. * (gcn_gfx803_s): New constant. * (gcn_gfx900_s): New constant. * (gcn_gfx906_s): New constant. * (gcn_isa_name_len): New constant. * (elf_gcn_isa_field): New function. * (isa_hsa_name): New function. * (isa_gcc_name): New function. * (isa_code): New function. * (struct agent_info): Add field "device_isa" and remove field "gfx900_p". * (GOMP_OFFLOAD_init_device): Adapt agent init to "agent_info" field changes, fail if device has unknown ISA. * (parse_target_attributes): Replace "gfx900_p" by "device_isa". * (isa_matches_agent): New function ... * (create_and_finalize_hsa_program): ... used from here to check that the GPU ISA and the code-object ISA match.
Frederik Harwath committed -
The patch sets current_function_returns_value flag in templates for all co_return/co_yield/co_await cases, as well as for ramp function. gcc/cp/ChangeLog * coroutines.cc (finish_co_await_expr): Set return value flag. (finish_co_yield_expr, morph_fn_to_coro): Ditto. gcc/testsuite/ChangeLog * g++.dg/coroutines/co-return-warning-1.C: New test.
Bin Cheng committed -
gcc/ChangeLog PR target/93304 * config/riscv/riscv-protos.h (riscv_hard_regno_rename_ok): New. * config/riscv/riscv.c (riscv_hard_regno_rename_ok): New. * config/riscv/riscv.h (HARD_REGNO_RENAME_OK): Defined. gcc/testsuite/ChangeLog PR target/93304 * gcc.target/riscv/pr93304.c: New test.
Kito Cheng committed -
GCC Administrator committed
-
- 20 Jan, 2020 20 commits
-
-
* doc/xml/faq.xml: Fix grammar. * doc/xml/manual/appendix_contributing.xml: Improve instructions. * doc/xml/manual/spine.xml: Update copyright years. * doc/html/*: Regenerate.
Jonathan Wakely committed -
* zh_TW.po: Update.
Joseph Myers committed -
2020-01-20 Andrew Stubbs <ams@codesourcery.com> libgomp/ * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Skip test on gcn. * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c (main): Adjust test dimensions for amdgcn. * testsuite/libgomp.oacc-c-c++-common/loop-gwv-1.c (main): Adjust gang/worker/vector expectations dynamically. * testsuite/libgomp.oacc-c-c++-common/loop-red-gwv-1.c (main): Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-v-1.c (main): Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-v-2.c (main): Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-w-1.c (main): Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-w-2.c (main): Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-wv-1.c (main): Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-v-1.c (main): Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-w-1.c (main): Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-wv-1.c (main): Likewise. * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c (acc_gang): Recognise acc_device_radeon. (acc_worker): Likewise. (acc_vector): Likewise. (main): Set expectations for amdgcn. * testsuite/libgomp.oacc-c-c++-common/routine-gwv-1.c (main): Adjust gang/worker/vector expectations dynamically. * testsuite/libgomp.oacc-c-c++-common/routine-v-1.c (main): Likewise. * testsuite/libgomp.oacc-c-c++-common/routine-w-1.c (main): Likewise. * testsuite/libgomp.oacc-c-c++-common/routine-wv-1.c (main): Likewise. * testsuite/libgomp.oacc-c-c++-common/routine-wv-2.c: Set expectations for amdgcn.
Andrew Stubbs committed -
Testing shows the setting of 32:16 for jump alignment has a significant codesize cost, however it doesn't make a difference in performance. So set jump-align to 4 to get 1.6% codesize improvement. gcc/ * config/aarch64/aarch64.c (neoversen1_tunings): Set jump_align to 4.
Wilco Dijkstra committed -
On MIPS, .set noreorder/reorder needs to emitted around the nop. The template for the nop instruction uses %(/%) to do that. But default_print_patchable_function_entry uses fprintf rather than output_asm_insn to output the instruction. This fixes the problem by using output_asm_insn to emit the nop instruction. ChangeLog: PR middle-end/93242 * targhooks.c (default_print_patchable_function_entry): Use output_asm_insn to emit the nop instruction.
Andrew Pinski committed -
* g++.dg/warn/Wstringop-overflow-4.C: Adjust test to avoid failures due to an aparrent VRP limtation. * gcc.dg/Wstringop-overflow-25.c: Same.
Martin Sebor committed -
2020-01-20 Fangrui Song <maskray@google.com> gcc/ PR middle-end/93194 * targhooks.c (default_print_patchable_function_entry): Align to POINTER_SIZE.
Fangrui Song committed -
__has_include is funky in that it is macro-like from the POV of #ifdef and friends, but lexes its parenthesize argument #include-like. We were failing the second part of that, because we used a forwarding macro to an internal name, and hence always lexed the argument in macro-parameter context. We componded that by not setting the right flag when lexing, so it didn't even know. Mostly users got lucky. This reimplements the handline. 1) Remove the forwarding, but declare object-like macros that expand to themselves. This satisfies the #ifdef requirement 2) Correctly set angled_brackets when lexing the parameter. This tells the lexer (a) <...> is a header name and (b) "..." is too (not a string). 3) Remove the in__has_include lexer state, just tell find_file that that's what's happenning, so it doesn't emit an error. We lose the (undocumented) ability to #undef __has_include. That may well have been an accident of implementation. There are no tests for it. We gain __has_include behaviour for all users of the preprocessors -- not just the C-family ones that defined a forwarding macro. libcpp/ PR preprocessor/80005 * include/cpplib.h (BT_HAS_ATTRIBUTE): Fix comment. * internal.h (struct lexer_state): Delete in__has_include field. (struct spec_nodes): Rename n__has_include{,_next}__ fields. (_cpp_defined_macro_p): New. (_cpp_find_file): Add has_include parm. * directives.c (lex_macro_node): Combine defined, __has_inline{,_next} checking. (do_ifdef, do_ifndef): Use _cpp_defined_macro_p. (_cpp_init_directives): Refactor. * expr.c (parse_defined): Use _cpp_defined_macro_p. (eval_token): Adjust parse_has_include calls. (parse_has_include): Add OP parameter. Reimplement. * files.c (_cpp_find_file): Add HAS_INCLUDE parm. Use it to inhibit error message. (_cpp_stack_include): Adjust _cpp_find_file call. (_cpp_fake_include, _cpp_compare_file_date): Likewise. (open_file_failed): Remove in__has_include check. (_cpp_has_header): Adjust _cpp_find_file call. * identifiers.c (_cpp_init_hashtable): Don't init __has_include{,_next} here ... * init.c (cpp_init_builtins): ... init them here. Define as macros. (cpp_read_main_file): Adjust _cpp_find_file call. * pch.c (cpp_read_state): Adjust __has_include{,_next} access. * traditional.c (_cpp_scan_out_locgical_line): Likewise. gcc/c-family/ PR preprocessor/80005 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}. gcc/testsuite/ PR preprocessor/80005 * g++.dg/cpp1y/feat-cxx14.C: Adjust. * g++.dg/cpp1z/feat-cxx17.C: Adjust. * g++.dg/cpp2a/feat-cxx2a.C: Adjust. * g++.dg/cpp/pr80005.C: New.
Nathan Sidwell committed -
Should've have checked for the existance of a non static integer using scan-tree-dump instead of scan-tree-dump-not. A cut and paste error.
Mark Eggleston committed -
To add x32 support to -mtls-dialect=gnu2, we need to replace DI with P in GNU2 TLS patterns. Since DEST set by tls_dynamic_gnu2_64 is in ptr_mode, PLUS in GNU2 TLS address computation must be done in ptr_mode to support -maddress-mode=long. Also replace the "{q}" suffix on lea with "%z0" to support both 32-bit and 64-bit destination register. Tested on Linux/x86-64. gcc/ PR target/93319 * config/i386/i386.c (legitimize_tls_address): Pass Pmode to gen_tls_dynamic_gnu2_64. Compute GNU2 TLS address in ptr_mode. * config/i386/i386.md (tls_dynamic_gnu2_64): Renamed to ... (@tls_dynamic_gnu2_64_<mode>): This. Replace DI with P. (*tls_dynamic_gnu2_lea_64): Renamed to ... (*tls_dynamic_gnu2_lea_64_<mode>): This. Replace DI with P. Remove the {q} suffix from lea. (*tls_dynamic_gnu2_call_64): Renamed to ... (*tls_dynamic_gnu2_call_64_<mode>): This. Replace DI with P. (*tls_dynamic_gnu2_combine_64): Renamed to ... (*tls_dynamic_gnu2_combine_64_<mode>): This. Replace DI with P. Pass Pmode to gen_tls_dynamic_gnu2_64. gcc/testsuite/ PR target/93319 * gcc.target/i386/pr93319-1a.c: New test. * gcc.target/i386/pr93319-1b.c: Likewise. * gcc.target/i386/pr93319-1c.c: Likewise. * gcc.target/i386/pr93319-1d.c: Likewise.
H.J. Lu committed -
Contrary to all documentation, SLOW_BYTE_ACCESS simply means accessing bitfields by their declared type, which results in better codegeneration. gcc/ * config/aarch64/aarch64.h (SLOW_BYTE_ACCESS): Set to 1.
Wilco Dijkstra committed -
2020-01-20 Richard Sandiford <richard.sandiford@arm.com> gcc/ * config/aarch64/aarch64-sve-builtins-base.cc (svld1ro_impl::memory_vector_mode): Remove parameter name.
Richard Sandiford committed -
We were pruning type-local subroutine DIEs if their context is unused despite us later needing those DIEs as abstract origins for inlines. The patch makes code already present for -fvar-tracking-assignments unconditional. 2020-01-20 Richard Biener <rguenther@suse.de> PR debug/92763 * dwarf2out.c (prune_unused_types): Unconditionally mark called function DIEs. * g++.dg/debug/pr92763.C: New testcase.
Richard Biener committed -
The initial structure for vendor and personal branches makes use of the default remote (normally origin) for the upstream repository). Unfortunately, this causes some confusion, especially for personal branches because a push will not push to the correct upstream location. This can be 'fixed' by adding a push refspec for the remote, but that has the unfortunate consequence of breaking the push.default behaviour for git push, and it becomes too easy to accidentally commit something unintended to the main parts of the repository. To work around this, this patch changes the configuration to use separate 'remotes' for these additional refs, with one remote for the personal space and another remote for each vendor's space. The personal space is called after the user's preferred branch-space prefix (default 'me'), the vendor spaces are called vendors/<vendor-name>. As far as possible, I've made the script automatically restructure any existing fetch or push lines that earlier versions of the scripts may have created - the gcc-git-customization.sh script will convert all vendor refs that it can find, so it is not necessary to re-add any vendors you've already added. You might, however, want to run git remote prune <origin> after running to clean up any stale upstream-refs that might still be in your local repo, and then git fetch vendors/<vendor> or git fetch <me> to re-populate the remotes/ structures. Also, for any branch you already have that tracks a personal or vendor branch upstream, you might need to run git config branch.<name>.remote <new-remote> so that merges and pushes go to the right place (I haven't attempted to automate this last part). For vendors, the new structure means that git checkout -b <vendor>/<branch> remotes/vendors/<vendor>/<branch> will correctly set up a remote tracking branch. Please be aware that if you have multiple personal branches set up, then git push <me> will still consider all of them for pushing. If you only want to push one branch, then either write git push <me> HEAD or git push <me> <me>/branch as appropriate. And don't forget '-n' (--dry-run) to see what would be done if this were not a dry run. Finally, now that the vendors spaces are isolated from each other and from the other spaces, I've added an option "--enable-push" to git-fetch-vendor.sh. If passed, then a "push" spec will be added for that vendor to enable pushing to the upstream. If you re-run the script for the same vendor without the option, the push spec will be removed. * gcc-git-customization.sh: Check that user-supplied remote name exists before continuting. Use a separate remotes for the personal commit area. Convert existing personal and vendor fetch rules to new layout. * git-fetch-vendor.sh: New vendor layout. Add --enable-push option.
Richard Earnshaw committed -
PR c++/92536 * g++.dg/cpp1z/pr92536.C: New.
Paolo Carlini committed -
PR tree-optimization/93199 * tree-eh.c (struct leh_state): Add new field outer_non_cleanup. (cleanup_is_dead_in): Pass leh_state instead of eh_region. Add a checking that state->outer_non_cleanup points to outer non-clean up region. (lower_try_finally): Record outer_non_cleanup for this_state. (lower_catch): Likewise. (lower_eh_filter): Likewise. (lower_eh_must_not_throw): Likewise. (lower_cleanup): Likewise.
Martin Liska committed -
When versioning is run the IL is already mangled and finding a VECTORIZED_CALL IFN can fail. 2020-01-20 Richard Biener <rguenther@suse.de> PR tree-optimization/93094 * tree-vectorizer.h (vect_loop_versioning): Adjust. (vect_transform_loop): Likewise. * tree-vectorizer.c (try_vectorize_loop_1): Pass down loop_vectorized_call to vect_transform_loop. * tree-vect-loop.c (vect_transform_loop): Pass down loop_vectorized_call to vect_loop_versioning. * tree-vect-loop-manip.c (vect_loop_versioning): Use the earlier discovered loop_vectorized_call. * gcc.dg/vect/pr93094.c: New testcase.
Richard Biener committed -
Clean up references to SVN in in the GCC docs, redirecting to Git documentation as appropriate. Where references to "the source code repository" rather than a specific VCS make sense, I have used them. You might, after all, change VCSes again someday. I have not modified either generated HTML files nor maintainer scripts. These changes should be complete with repect to the documentation tree. 2020-01-19 Eric S. Raymond <esr@thyrsus.com> gcc/ * doc/contribute.texi: Update for SVN -> Git transition. * doc/install.texi: Likewise. libstdc++-v3 * doc/xml/faq.xml: Update for SVN -> Git transition. * doc/xml/manual/appendix_contributing.xml: Likewise. * doc/xml/manual/status_cxx1998.xml: Likewise. * doc/xml/manual/status_cxx2011.xml: Likewise. * doc/xml/manual/status_cxx2014.xml: Likewise. * doc/xml/manual/status_cxx2017.xml: Likewise. * doc/xml/manual/status_cxx2020.xml: Likewise. * doc/xml/manual/status_cxxtr1.xml: Likewise. * doc/xml/manual/status_cxxtr24733.xml: Likewise.
Eric S. Raymond committed -
gcc/testsuite/ChangeLog: * gcc.dg/analyzer/CVE-2005-1689-dedupe-issue.c: Ensure that all test names are unique. * gcc.dg/analyzer/attribute-nonnull.c: Likewise. * gcc.dg/analyzer/conditionals-notrans.c: Likewise. * gcc.dg/analyzer/data-model-1.c: Likewise. * gcc.dg/analyzer/data-model-18.c: Likewise. * gcc.dg/analyzer/data-model-8.c: Likewise. * gcc.dg/analyzer/data-model-9.c: Likewise. * gcc.dg/analyzer/file-1.c: Likewise. * gcc.dg/analyzer/file-paths-1.c: Likewise. * gcc.dg/analyzer/loop-2.c: Likewise. * gcc.dg/analyzer/loop-2a.c: Likewise. * gcc.dg/analyzer/loop-4.c: Likewise. * gcc.dg/analyzer/loop.c: Likewise. * gcc.dg/analyzer/malloc-1.c: Likewise. * gcc.dg/analyzer/malloc-2.c: Likewise. * gcc.dg/analyzer/malloc-ipa-10.c: Likewise. * gcc.dg/analyzer/malloc-ipa-2.c: Likewise. * gcc.dg/analyzer/malloc-macro-separate-events.c: Likewise. * gcc.dg/analyzer/malloc-paths-1.c: Likewise. * gcc.dg/analyzer/malloc-paths-2.c: Likewise. * gcc.dg/analyzer/malloc-paths-3.c: Likewise. * gcc.dg/analyzer/malloc-paths-4.c: Likewise. * gcc.dg/analyzer/malloc-paths-5.c: Likewise. * gcc.dg/analyzer/malloc-paths-7.c: Likewise. * gcc.dg/analyzer/malloc-paths-9.c: Likewise. * gcc.dg/analyzer/operations.c: Likewise. * gcc.dg/analyzer/params.c: Likewise. * gcc.dg/analyzer/pattern-test-1.c: Likewise. * gcc.dg/analyzer/pattern-test-2.c: Likewise. * gcc.dg/analyzer/sensitive-1.c: Likewise. * gcc.dg/analyzer/switch.c: Likewise. * gcc.dg/analyzer/taint-1.c: Likewise. * gcc.dg/analyzer/unknown-fns.c: Likewise.
David Malcolm committed -
GCC Administrator committed
-
- 19 Jan, 2020 8 commits
-
-
* lib/target-supports.exp (effective_target_march_option): New. I see no (other) way to, depending on the absence of an option, add an option for a specific target. For gcc.dg/torture/pr26515.c and cris-elf, you get an error for supplying multiple (different) -march=... options (where that error is desirable), like testing cris-elf with RUNTESTFLAGS=--target_board=cris-sim/arch=v8, where otherwise -march=v10 and -march=v8 will both be given, and the test would fail. For historians, this was accidentally misordered and committed after the (first) patch using march_option. Oops.
Hans-Peter Nilsson committed -
* gcc.dg/torture/pr26515.c (cris*-*-*): Conditionalize -march=v10 option on target ! march_option. * gcc.target/cris/asm-v10.S, gcc.target/cris/inasm-v10.c, gcc.target/cris/sync-1-v10.c: Similar.
Hans-Peter Nilsson committed -
This patch differs from the reverted patch for 33799 in that it adds the CLEANUP_STMT for the return value at the end of the function, and only if we've seen a cleanup that might throw, so it should not affect most C++11 code. * cp-tree.h (current_retval_sentinel): New macro. (struct language_function): Add throwing_cleanup bitfield. * decl.c (cxx_maybe_build_cleanup): Set it. * except.c (maybe_set_retval_sentinel) (maybe_splice_retval_cleanup): New functions. * parser.c (cp_parser_compound_statement): Call maybe_splice_retval_cleanup. * typeck.c (check_return_expr): Call maybe_set_retval_sentinel.
Jason Merrill committed -
Since we removed the special parsing for C++11 lambdas, it's just been an open-coded copy of cp_parser_function_body. So let's call it instead. This avoids the need to change this code in my revised 33799 patch. * parser.c (cp_parser_lambda_body): Use cp_parser_function_body.
Jason Merrill committed -
this patch implements verifier and fixes one bug where speculative calls produced by ipa-devirt ended up having num_speculative_call_targets = 0 instead of 1. * cgraph.c (cgraph_edge::make_speculative): Increase number of speculative targets. (verify_speculative_call): New function (cgraph_node::verify_node): Use it. * ipa-profile.c (ipa_profile): Fix formating; do not set number of speculations.
Jan Hubicka committed -
this fixes two issues with the new multi-target speculation code which reproduce on Firefox. I can now build firefox with FDO locally but on Mozilla build bots it still fails with ICE in speculative_call_info. One problem is that speuclative code compares call_stmt and lto_stmt_uid in a way that may get unwanted effect when these gets out of sync. It does not make sense to have both non-zero so I added code clearing it and sanity check that it is kept this way. Other problem is cgraph_edge::make_direct not working well with multiple targets. In this case it removed one speuclative target and the indirect call leaving other targets in the tree. This is fixed by iterating across all targets and removing all except the good one (if it exists). PR lto/93318 * cgraph.c (cgraph_edge::resolve_speculation): Fix foramting. (cgraph_edge::make_direct): Remove all indirect targets. (cgraph_edge::redirect_call_stmt_to_callee): Use make_direct.. (cgraph_node::verify_node): Verify that only one call_stmt or lto_stmt_uid is set. * cgraphclones.c (cgraph_edge::clone): Set only one call_stmt or lto_stmt_uid. * lto-cgraph.c (lto_output_edge): Simplify streaming of stmt. (lto_output_ref): Simplify streaming of stmt. * lto-streamer-in.c (fixup_call_stmt_edges_1): Clear lto_stmt_uid.
Jan Hubicka committed -
Thomas König committed
-
GCC Administrator committed
-
- 18 Jan, 2020 8 commits
-
-
When building offloading cross-compiler from x86_64-linux to nvptx-none, the build fails with: ../../gcc/cp/coroutines.cc: In function 'tree_node* get_fn_local_identifier(tree, const char*)': ../../gcc/cp/coroutines.cc:2255:12: error: expected ';' before 'char' 2255 | sep = "$" | ^ | ; ...... 2262 | char *an; | ~~~~ 2020-01-18 Jakub Jelinek <jakub@redhat.com> * coroutines.cc (get_fn_local_identifier): Fix NO_DOT_IN_LABEL but non-NO_DOLLAR_IN_LABEL case build.
Jakub Jelinek committed -
* config/cris/arit.c (DS): Apply attribute fallthrough. Without this, there are, for each compilation of arit.c, 30ish occurrences of "this statement may fall through [-Wimplicit-fallthrough=]", for lines that look like case 32: DS; case 31: DS; case 30: DS; case 29: DS;
Hans-Peter Nilsson committed -
PR libgcc/92988 * crtstuff.c (__do_global_dtors_aux): Only call __cxa_finalize if DEFAULT_USE_CXA_ATEXIT is true.
John David Anglin committed -
This marks the parameter &fi as unused so it doesn't cause a boostrap failure. committed under the obvious rule. gcc/ChangeLog: * config/aarch64/aarch64-sve-builtins-base.cc (memory_vector_mode): Mark parameter unused.
Tamar Christina committed -
2020-01-18 Jakub Jelinek <jakub@redhat.com> PR c/92833 * c-c++-common/pr92833-4.c: Fix dg-message syntax.
Jakub Jelinek committed -
I'm sorry to say that there's no incentive to maintain crisv32-*-* and cris-*-linux* configurations beyond nostalgia, (and I'm out of that for the moment). Support in the Linux kernel for either applicable CRIS variant (CRIS v10 and CRIS v32) is gone since 2018. Their related part of the cc0 transition workload would be noticable. Note that cris-elf remains, but crisv32-elf and the CRIS v32 multilib will be removed, at least for now. I'm not completely happy about the message (the next-next line after the context) "*** unless a maintainer comes forward" because it'd have to be at an infinitesimal maintenance cost to the cris-elf support. Still, I'm not bothered enough to add another case construct or means for "planned obsolescence".
Hans-Peter Nilsson committed -
* varpool.c (ctor_useable_for_folding_p): Fix grammar.
Gerald Pfeifer committed -
C++20 coroutines introduces a new operator with a mangling of 'aw'. This patch adds that to libiberty's demangler. libiberty/ChangeLog: 2020-01-18 Iain Sandoe <iain@sandoe.co.uk> * cp-demangle.c (cplus_demangle_operators): Add the co_await operator. * testsuite/demangle-expected: Test co_await operator mangling.
Iain Sandoe committed
-