- 30 Jan, 2020 23 commits
-
-
What happens on this testcase is with the out of bounds rotate we get: Trying 13 -> 16: 13: r129:SI=r132:DI#0<-<0x20 REG_DEAD r132:DI 16: r123:DI=r129:SI<0 REG_DEAD r129:SI Successfully matched this instruction: (set (reg/v:DI 123 [ <retval> ]) (const_int 0 [0])) during combine. So, perhaps we could also change simplify-rtx.c to punt if it is out of bounds rather than trying to optimize anything. Or, but probably GCC11 material, if we decide that ROTATE/ROTATERT doesn't have out of bounds counts or introduce targetm.rotate_truncation_mask, we should truncate the argument instead of punting. Punting is better for backports though. 2020-01-30 Jakub Jelinek <jakub@redhat.com> PR middle-end/93505 * combine.c (simplify_comparison) <case ROTATE>: Punt on out of range rotate counts. * gcc.c-torture/compile/pr93505.c: New test.
Jakub Jelinek committed -
When instantiating a template tsubst_copy_and_build suppresses -Wtype-limits warnings about e.g. == always being false because it might not always be false for an instantiation with other template arguments. But we should warn if the operands don't depend on template arguments. PR c++/82521 * pt.c (tsubst_copy_and_build) [EQ_EXPR]: Only suppress warnings if the expression was dependent before substitution.
Jason Merrill committed -
PR fortran/87103 * expr.c (gfc_check_conformance): Check vsnprintf for truncation. * iresolve.c (gfc_get_string): Likewise. * symbol.c (gfc_new_symbol): Remove check for maximum symbol name length. Remove redundant 0 setting of new calloc()ed gfc_symbol.
Andrew Benson committed -
Fixes ICE in testcase gcc.dg/pr81228.c 2020-01-30 Andrew Stubbs <ams@codesourcery.com> gcc/ * config/gcn/gcn.c (print_operand): Handle LTGT. * config/gcn/predicates.md (gcn_fp_compare_operator): Allow ltgt.
Andrew Stubbs committed -
* gcc.dg/tree-ssa/ssa-dse-26.c: Make existing dg-final scan conditional on !c6x. Add dg-final scan pattern for c6x.
Jeff Law committed -
gcc/testsuite/ChangeLog: * gcc.dg/Warray-bounds-57.c: New test.
Martin Sebor committed -
This wraps { ... } in _Literal (type) for consumption by the GIMPLE FE. 2020-01-30 Richard Biener <rguenther@suse.de> * tree-pretty-print.c (dump_generic_node): Wrap VECTOR_CST and CONSTRUCTOR in _Literal (type) with TDF_GIMPLE.
Richard Biener committed -
PR analyzer/93450 reports an ICE trying to fold an EQ_EXPR comparison of (int)0 with (float)Inf. Most comparisons inside the analyzer come from gimple conditions, for which the necessary casts have already been added. This one is done inside constant_svalue::eval_condition as part of purging sm-state for an unknown function call, and fails to check the types being compared, leading to the ICE. sm_state_map::set_state calls region_model::eval_condition_without_cm in order to handle pointer equality (so that e.g. (void *)&r and (foo *)&r transition together), which leads to this code generating a bogus query to see if the two constants are equal. This patch fixes the ICE in two ways: - It avoids generating comparisons within constant_svalue::eval_condition unless the types are equal (thus for constants, but not for pointer values, which are handled by region_svalue). - It updates sm_state_map::set_state to bail immediately if the new state is the same as the old one, thus avoiding the above for the common case where an svalue_id has no sm-state (such as for the int and float constants in the reproducer), for which the above becomes a no-op. gcc/analyzer/ChangeLog: PR analyzer/93450 * program-state.cc (sm_state_map::set_state): For the overload taking an svalue_id, bail out if the set_state on the ec does nothing. Convert the latter's return type from void to bool, returning true if anything changed. (sm_state_map::impl_set_state): Convert the return type from void to bool, returning true if the state changed. * program-state.h (sm_state_map::set_state): Convert return type from void to bool. (sm_state_map::impl_set_state): Likewise. * region-model.cc (constant_svalue::eval_condition): Only call fold_build2 if the types are the same. gcc/testsuite/ChangeLog: PR analyzer/93450 * gcc.dg/analyzer/torture/pr93450.c: New test.
David Malcolm committed -
2020-01-30 John David Anglin <danglin@gcc.gnu.org> * config/pa/pa.c (pa_elf_select_rtx_section): Place function pointers without a DECL in .data.rel.ro.local.
John David Anglin committed -
uaddvdi4 expander has an optimization for the low 32-bits of the 2nd input operand known to be 0. Unfortunately, in that case it only emits copying of the low 32 bits to the low 32 bits of the destination, but doesn't emit the addition with overflow detection for the high 64 bits. Well, to be precise, it emits it, but into an RTL sequence returned by gen_uaddvsi4, but that sequence isn't emitted anywhere. 2020-01-30 Jakub Jelinek <jakub@redhat.com> PR target/93494 * config/arm/arm.md (uaddvdi4): Actually emit what gen_uaddvsi4 returned. * gcc.c-torture/execute/pr93494.c: New test.
Jakub Jelinek committed -
PR bootstrap/93409 * plugin/configfrag.ac (enable_offload_targets): Skip HSA and GCN plugin besides -m32 also for -mx32. * configure: Regenerate.
Tobias Burnus committed -
PR c++/90338 * g++.dg/pr90338.C: New.
Paolo Carlini committed -
Some time ago, patterns were added to optimize move mask followed by zero extension from 32 bits to 64 bit. As the testcase shows, the intrinsics actually return int, not unsigned int, so it will happen quite often that one actually needs sign extension instead of zero extension. Except for vpmovmskb with 256-bit operand, sign vs. zero extension doesn't make a difference, as we know the bit 31 will not be set (the source will have 2 or 4 doubles, 4 or 8 floats or 16 or 32 chars). So, for the floating point patterns, this patch just uses a code iterator so that we handle both zero extend and sign extend, and for the byte one adds a separate pattern for the 128-bit operand. 2020-01-30 Jakub Jelinek <jakub@redhat.com> PR target/91824 * config/i386/sse.md (*<sse>_movmsk<ssemodesuffix><avxsizesuffix>_zext): Renamed to ... (*<sse>_movmsk<ssemodesuffix><avxsizesuffix>_<u>ext): ... this. Use any_extend code iterator instead of always zero_extend. (*<sse>_movmsk<ssemodesuffix><avxsizesuffix>_zext_lt): Renamed to ... (*<sse>_movmsk<ssemodesuffix><avxsizesuffix>_<u>ext_lt): ... this. Use any_extend code iterator instead of always zero_extend. (*<sse>_movmsk<ssemodesuffix><avxsizesuffix>_zext_shift): Renamed to ... (*<sse>_movmsk<ssemodesuffix><avxsizesuffix>_<u>ext_shift): ... this. Use any_extend code iterator instead of always zero_extend. (*sse2_pmovmskb_ext): New define_insn. (*sse2_pmovmskb_ext_lt): New define_insn_and_split. * gcc.target/i386/pr91824-2.c: New test.
Jakub Jelinek committed -
Like any other instruction with 32-bit GPR destination operand in 64-bit mode, popcntl also clears the upper 32 bits of the register (and other bits too, it can return only 0 to 32 inclusive). During combine, the zero or sign extensions of it show up as paradoxical subreg of the popcount & 63, there 63 is the smallest power of two - 1 mask that can represent all the 0 to 32 inclusive values. 2020-01-30 Jakub Jelinek <jakub@redhat.com> PR target/91824 * config/i386/i386.md (*popcountsi2_zext): New define_insn_and_split. (*popcountsi2_zext_falsedep): New define_insn. * gcc.target/i386/pr91824-1.c: New test.
Jakub Jelinek committed -
This is something that has been discussed already a few months ago, but seems to have stalled. Here is Paul's patch from the PR except for the TREE_STATIC hunk which is wrong, and does the most conservative fn spec tweak for the problematic two builtins we are aware of (to repeat what is in the PR, both .wR and .ww are wrong for these builtins that transform one layout of an descriptor to another one; while the first pointer is properly marked that we only store to what it points to, from the second pointer we copy and reshuffle the content and store into the first one; if there wouldn't be any pointers, ".wr" would be just fine, but as there is a pointer and that pointer is copied to the area pointed by first argument, the pointer effectively leaks that way, so we e.g. can't optimize stores into what the data pointer in the descriptor points to). I haven't analyzed other fn spec attributes in the FE, but think it is better to fix at least this one we have analyzed. 2020-01-30 Paul Thomas <pault@gcc.gnu.org> Jakub Jelinek <jakub@redhat.com> PR fortran/92123 * trans-decl.c (gfc_get_symbol_decl): Call gfc_defer_symbol_init for CFI descs. (gfc_build_builtin_function_decls): Use ".w." instead of ".ww" or ".wR" for gfor_fndecl_{cfi_to_gfc,gfc_to_cfi}. (convert_CFI_desc): Handle references to CFI descriptors. Co-authored-by: Paul Thomas <pault@gcc.gnu.org>
Jakub Jelinek committed -
Commit 54b3d52c ("Emit .note.GNU-stack for hard-float linux targets.") was missing generated files. Add them now. gcc/ChangeLog: 2020-01-30 Dragan Mladjenovic <dmladjenovic@wavecomp.com> * config.in: Regenerated. * configure: Regenerated.
Dragan Mladjenovic committed -
By standard, coroutine body should be encapsulated in try-catch block as following: try { // coroutine body } catch(...) { promise.unhandled_exception(); } Given above try-catch block is implemented in the coroutine actor function called by coroutine ramp function, so the promise should be accessed via actor function's coroutine frame pointer argument, rather than the ramp function's coroutine frame variable. This patch cleans code a bit to make fix easy. gcc/cp * coroutines.cc (act_des_fn): New. (morph_fn_to_coro): Call act_des_fn to build actor/destroy decls. Access promise via actor function's frame pointer argument. (build_actor_fn, build_destroy_fn): Use frame pointer argument.
Bin Cheng committed -
Function co_await_expander expands CO_AWAIT_EXPR and inserts expanded code before result of co_await is used, however, it doesn't cover the type conversion case and leads to gimplify ICE. This patch fixes it. gcc/cp * coroutines.cc (co_await_expander): Handle type conversion case. gcc/testsuite * g++.dg/coroutines/co-await-syntax-09-convert.C: New test.
Bin Cheng committed -
Patch by Svante Signell. Updates PR go/93468 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/216959
Ian Lance Taylor committed -
Patch from Svante Signell. Updates PR go/93468 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/216958
Ian Lance Taylor committed -
Since expand_stack_vars and such know how to deal with variables aligned beyond MAX_SUPPORTED_STACK_ALIGNMENT, we shouldn't reject alignas of large alignments. And if we don't do that, there's no point in having check_cxx_fundamental_alignment_constraints at all, since check_user_alignment already enforces MAX_OFILE_ALIGNMENT. PR c++/89357 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
Jason Merrill committed -
GCC Administrator committed
-
The test uses __int128_t, so won't work on targets that don't support it. 2020-01-30 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/92706 * gcc.dg/tree-ssa/pr92706-1.c: Require int128 effective target.
Jakub Jelinek committed
-
- 29 Jan, 2020 17 commits
-
-
My fix for 60503 fixed handling of C++11 attributes following the lambda-declarator. My patch for 89640 re-added support for GNU attributes, but attributes after the trailing return type were parsed as applying to the return type rather than to the function. This patch adjusts parsing of a trailing-return-type to ignore GNU attributes at the end of the declaration so that they will be applied to the declaration as a whole. I also considered parsing the attributes between the closing paren and the trailing-return-type, and tried a variety of approaches to implementing that, but I think it's better to stick with the documented rule that "An attribute specifier list may appear immediately before the comma, '=' or semicolon terminating the declaration of an identifier...." Anyone disagree? Meanwhile, C++ committee discussion about the lack of any way to apply attributes to a lambda op() seems to have concluded that they should go between the introducer and declarator, so I've implemented that as well. PR c++/90333 PR c++/89640 PR c++/60503 * parser.c (cp_parser_type_specifier_seq): Don't parse attributes in a trailing return type. (cp_parser_lambda_declarator_opt): Parse C++11 attributes before parens.
Jason Merrill committed -
PR bootstrap/93409 * config/gcn/gcn-hsa.h (ASM_SPEC): Add -mattr=-code-object-v3 as LLVM's assembler changed the default in version 9.
Tobias Burnus committed -
This test got fixed by r10-1976-gdaaa6fcc so let's add it to the testsuite. PR c++/88092 * g++.dg/cpp2a/nontype-class31.C: New test.
Marek Polacek committed -
Improve DSE which in turn eliminates the need for jump threading and block duplication for the original testcase in pr89689 which in turn eliminates the false positive -Warray-bounds warning for the original testcase. PR tree-optimization/89689 * builtins.def (BUILT_IN_OBJECT_SIZE): Make it const rather than pure. PR tree-optimization/89689 * gcc.dg/pr89689.c: New test.
Jeff Law committed -
The patch caused regressions in gcc.target/sh/pr64345-1.c on sh3-linux-gnu and gcc.target/m68k/pr39726.c on m68k-linux-gnu. It didn't look like they would be fixable in an acceptably non-invasive and unhacky way, so punting till future releases. 2020-01-29 Richard Sandiford <richard.sandiford@arm.com> gcc/ Revert: 2020-01-28 Richard Sandiford <richard.sandiford@arm.com> PR rtl-optimization/87763 * simplify-rtx.c (simplify_truncation): Extend sign/zero_extract simplification to handle subregs as well as bare regs. * config/i386/i386.md (*testqi_ext_3): Match QI extracts too.
Richard Sandiford committed -
Here we fail to compile the attached test, stating that the use of T<s> in T<s>::T() {} is "invalid use of incomplete type". It is a function definition so grokdeclarator checks that the qualifying type is complete. When we parsed the class T, finish_struct gave the class a non-null TYPE_SIZE, making it COMPLETE_TYPE_P. But then we're parsing T<s>, a TEMPLATE_ID, in T<s>::T() {} so try to lookup_template_class T. This failed because we couldn't find such a class: comp_template_args told us that the argument lists don't match, because one of the args was wrapped in a VIEW_CONVERT_EXPR to make it look const. It seems to me that we should see through these artificial wrappers and consider the args same. 2020-01-29 Marek Polacek <polacek@redhat.com> PR c++/91754 - Fix template arguments comparison with class NTTP. * pt.c (class_nttp_const_wrapper_p): New. (template_args_equal): See through class_nttp_const_wrapper_p arguments. * g++.dg/cpp2a/nontype-class30.C: New test.
Marek Polacek committed -
This PR points out an ICE with an alias template and class NTTP, but I found that there are more issues. Trouble arise when we use a (non-type) template parameter as an argument to the template arg list of a template that accepts a class NTTP and a conversion to a class is involved, e.g. struct A { A(int) { } }; template<A a> struct B { }; template<int X> void fn () { B<X> b; } Normally for such a conversion we create a TARGET_EXPR with an AGGR_INIT_EXPR that calls a __ct_comp with some arguments, but not in this case: when converting X to type A in convert_nontype_argument we are in a template and the template parameter 'X' is value-dependent, and AGGR_INIT_EXPR don't work in templates. So it just creates a TARGET_EXPR that contains "A::A(*this, X)", but with that overload resolution fails: error: no matching function for call to 'A::A(A*, int)' That happens because finish_call_expr for a BASELINK creates a dummy object, so we have 'this' twice. I thought for the value-dependent case we could use IMPLICIT_CONV_EXPR, as in the patch below. Note that I only do this when we convert to a different type than the type of the expr. The point is to avoid the call to a converting ctor. The second issue was an ICE in tsubst_copy: when there's a conversion like the above involved then /* Wrapper to make a C++20 template parameter object const. */ op = tsubst_copy (op, args, complain, in_decl); might not produce a _ZT... VAR_DECL with const type, so the assert gcc_assert (CP_TYPE_CONST_P (TREE_TYPE (op))); fails. Allowing IMPLICIT_CONV_EXPR there probably makes sense. And since convert_nontype_argument uses value_dependent_expression_p a lot, I used a dedicated bool to speed things up. 2020-01-29 Marek Polacek <polacek@redhat.com> PR c++/92948 - Fix class NTTP with template arguments. * pt.c (convert_nontype_argument): Use IMPLICIT_CONV_EXPR when converting a value-dependent expression to a class type. (tsubst_copy) <case VIEW_CONVERT_EXPR>: Allow IMPLICIT_CONV_EXPR as the result of the tsubst_copy call. * g++.dg/cpp2a/nontype-class28.C: New test. * g++.dg/cpp2a/nontype-class29.C: New test.
Marek Polacek committed -
Fix synchronization issues in <stop_token>. Replace shared_ptr with _Stop_state_ref and a reference count embedded in the shared state. Replace std::mutex with spinlock using one bit of a std::atomic<> that also tracks whether a stop request has been made and how many stop_source objects share ownership of the state. PR libstdc++/92895 * include/std/stop_token (stop_token::stop_possible()): Call new _M_stop_possible() function. (stop_token::stop_requested()): Do not use stop_possible(). (stop_token::binary_semaphore): New class, as temporary stand-in for std::binary_semaphore. (stop_token::_Stop_cb::_M_callback): Add noexcept to type. (stop_token::_Stop_cb::_M_destroyed, stop_token::_Stop_cb::_M_done): New data members for symchronization with stop_callback destruction. (stop_token::_Stop_cb::_Stop_cb): Make non-template. (stop_token::_Stop_cb::_M_linked, stop_token::_Stop_cb::_S_execute): Remove. (stop_token::_Stop_cb::_M_run): New member function. (stop_token::_Stop_state::_M_stopped, stop_token::_Stop_state::_M_mtx): Remove. (stop_token::_Stop_state::_M_owners): New data member to track reference count for ownership. (stop_token::_Stop_state::_M_value): New data member combining a spinlock, the stop requested flag, and the reference count for associated stop_source objects. (stop_token::_Stop_state::_M_requester): New data member for synchronization with stop_callback destruction. (stop_token::_Stop_state::_M_stop_possible()): New member function. (stop_token::_Stop_state::_M_stop_requested()): Inspect relevant bit of _M_value. (stop_token::_Stop_state::_M_add_owner) (stop_token::_Stop_state::_M_release_ownership) (stop_token::_Stop_state::_M_add_ssrc) (stop_token::_Stop_state::_M_sub_ssrc): New member functions for updating reference counts. (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock) (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock) (stop_token::_Stop_state::_M_try_lock) (stop_token::_Stop_state::_M_try_lock_and_stop) (stop_token::_Stop_state::_M_do_try_lock): New member functions for managing spinlock. (stop_token::_Stop_state::_M_request_stop): Use atomic operations to read and update state. Release lock while running callbacks. Use new data members to synchronize with callback destruction. (stop_token::_Stop_state::_M_remove_callback): Likewise. (stop_token::_Stop_state::_M_register_callback): Use atomic operations to read and update state. (stop_token::_Stop_state_ref): Handle type to manage _Stop_state, replacing shared_ptr. (stop_source::stop_source(const stop_source&)): Update reference count. (stop_source::operator=(const stop_source&)): Likewise. (stop_source::~stop_source()): Likewise. (stop_source::stop_source(stop_source&&)): Define as defaulted. (stop_source::operator=(stop_source&&)): Establish postcondition on parameter. (stop_callback): Enforce preconditions on template parameter. Replace base class with data member of new _Cb_impl type. (stop_callback::stop_callback(const stop_token&, Cb&&)) (stop_callback::stop_callback(stop_token&&, Cb&&)): Fix TOCTTOU race. (stop_callback::_Cb_impl): New type wrapping _Callback member and defining the _S_execute member function. * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc: New test. * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: New test. * testsuite/30_threads/stop_token/stop_callback/destroy.cc: New test. * testsuite/30_threads/stop_token/stop_callback/destructible_neg.cc: New test. * testsuite/30_threads/stop_token/stop_callback/invocable_neg.cc: New test. * testsuite/30_threads/stop_token/stop_callback/invoke.cc: New test. * testsuite/30_threads/stop_token/stop_source/assign.cc: New test. * testsuite/30_threads/stop_token/stop_token/stop_possible.cc: New test.
Jonathan Wakely committed -
libgomp/ * oacc-init.c (name_of_acc_device_t): Handle acc_device_radeon. Reviewed-by: Thomas Schwinge <thomas@codesourcery.com>
Frederik Harwath committed -
A previous change to simplify LRA introduced in 11b809 (From-SVN: r279550) disabled hard register splitting for -O0. This causes a problem on aarch64 in cases where parameters are passed in multiple registers (in the bug report an OI passed in 2 V4SI registers). This is mandated by the AAPCS. gcc/ChangeLog: 2020-01-29 Joel Hutton <Joel.Hutton@arm.com> PR target/93221 * ira.c (ira): Revert use of simplified LRA algorithm. gcc/testsuite/ChangeLog: 2020-01-29 Joel Hutton <Joel.Hutton@arm.com> PR target/93221 * gcc.target/aarch64/pr93221.c: New test.
Andre Vieira committed -
The __3way_builtin_ptr_cmp concept can use three_way_comparable_with to check whether <=> is valid. Doing that makes it obvious that the disjunction on compare_three_way::operator() is redundant, because the second constraint subsumes the first. The workaround for PR c++/91073 can also be removed as that bug is fixed now. * libsupc++/compare (__detail::__3way_builtin_ptr_cmp): Use three_way_comparable_with. (__detail::__3way_cmp_with): Remove workaround for fixed bug. (compare_three_way::operator()): Remove redundant constraint from requires-clause. (__detail::_Synth3way::operator()): Use three_way_comparable_with instead of workaround. * testsuite/18_support/comparisons/object/93479.cc: Prune extra output due to simplified constraints on compare_three_way::operator().
Jonathan Wakely committed -
Currently types that cannot be compared using <=> but which are convertible to pointers will be compared by converting to pointers first. They should not be comparable. PR libstdc++/93479 * libsupc++/compare (__3way_builtin_ptr_cmp): Require <=> to be valid. * testsuite/18_support/comparisons/object/93479.cc: New test.
Jonathan Wakely committed -
* testsuite/std/ranges/access/end.cc: Do not assume test_range::end() returns the same type as test_range::begin(). Add comments. * testsuite/std/ranges/access/rbegin.cc: Likewise. * testsuite/std/ranges/access/rend.cc: Likewise. * testsuite/std/ranges/range.cc: Do not assume the sentinel for test_range is the same as its iterator type. * testsuite/util/testsuite_iterators.h (test_range::sentinel): Add operator- overloads to satisfy sized_sentinel_for when the iterator satisfies random_access_iterator.
Jonathan Wakely committed -
2020-01-29 Martin Jambor <mjambor@suse.cz> PR tree-optimization/92706 * tree-sra.c (struct access): Fields first_link, last_link, next_queued and grp_queued renamed to first_rhs_link, last_rhs_link, next_rhs_queued and grp_rhs_queued respectively, new fields first_lhs_link, last_lhs_link, next_lhs_queued and grp_lhs_queued. (struct assign_link): Field next renamed to next_rhs, new field next_lhs. Updated comment. (work_queue_head): Renamed to rhs_work_queue_head. (lhs_work_queue_head): New variable. (add_link_to_lhs): New function. (relink_to_new_repr): Also relink LHS lists. (add_access_to_work_queue): Renamed to add_access_to_rhs_work_queue. (add_access_to_lhs_work_queue): New function. (pop_access_from_work_queue): Renamed to pop_access_from_rhs_work_queue. (pop_access_from_lhs_work_queue): New function. (build_accesses_from_assign): Also add links to LHS lists and to LHS work_queue. (child_would_conflict_in_lacc): Renamed to child_would_conflict_in_acc. Adjusted parameter names. (create_artificial_child_access): New parameter set_grp_read, use it. (subtree_mark_written_and_enqueue): Renamed to subtree_mark_written_and_rhs_enqueue. (propagate_subaccesses_across_link): Renamed to propagate_subaccesses_from_rhs. (propagate_subaccesses_from_lhs): New function. (propagate_all_subaccesses): Also propagate subaccesses from LHSs to RHSs. testsuite/ * gcc.dg/tree-ssa/pr92706-1.c: New test.
Martin Jambor committed -
2020-01-29 Martin Jambor <mjambor@suse.cz> PR tree-optimization/92706 * tree-sra.c (struct access): Adjust comment of grp_total_scalarization. (find_access_in_subtree): Look for single children spanning an entire access. (scalarizable_type_p): Allow register accesses, adjust callers. (completely_scalarize): Remove function. (scalarize_elem): Likewise. (create_total_scalarization_access): Likewise. (sort_and_splice_var_accesses): Do not track total scalarization flags. (analyze_access_subtree): New parameter totally, adjust to new meaning of grp_total_scalarization. (analyze_access_trees): Pass new parameter to analyze_access_subtree. (can_totally_scalarize_forest_p): New function. (create_total_scalarization_access): Likewise. (create_total_access_and_reshape): Likewise. (total_should_skip_creating_access): Likewise. (totally_scalarize_subtree): Likewise. (analyze_all_variable_accesses): Perform total scalarization after subaccess propagation using the new functions above. (initialize_constant_pool_replacements): Output initializers by traversing the access tree. testsuite/ * gcc.dg/tree-ssa/pr92706-2.c: New test. * gcc.dg/guality/pr59776.c: Xfail tests for s2.g.
Martin Jambor committed -
2020-01-29 Martin Jambor <mjambor@suse.cz> * tree-sra.c (verify_sra_access_forest): New function. (verify_all_sra_access_forests): Likewise. (create_artificial_child_access): Set parent. (analyze_all_variable_accesses): Call the verifier.
Martin Jambor committed -
* cgraph.c (cgraph_edge::resolve_speculation): Only lookup direct edge if called on indirect edge. (cgraph_edge::redirect_call_stmt_to_callee): Lookup indirect edge of speculative call if needed. * gcc.dg/tree-prof/indir-call-prof-2.c: New testcase.
Jan Hubicka committed
-