• R/O
  • HTTP
  • SSH
  • HTTPS

提交列表

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

RSS
Rev. 时间 作者
ae5de5a 2022-11-08 17:34:57 Bob Duff

ada: Add new -gnatw_q switch to usage message

...along with -gnatw_Q.

gcc/ada/

* usage.adb: Add -gnatw_q and -gnatw_Q.

acbfa2b 2022-11-08 12:07:49 Jonathan Wakely

libstdc++: Update my author blurb in the manual

libstdc++-v3/ChangeLog:

* doc/xml/authors.xml: Update the blurb listing my doc
contributions.

4596339 2022-11-08 12:07:49 Jonathan Wakely

libstdc++: Remove empty <author> elements in manual

This fixes a spurious comma before the list of authors in the PDF
version of the libstdc++ manual.

Also fix the commented-out examples which should show <personblurb> not
<authorblurb>.

libstdc++-v3/ChangeLog:

* doc/xml/authors.xml: Remove empty author element.
* doc/xml/manual/spine.xml: Likewise.
* doc/html/manual/index.html: Regenerate.

1f7b130 2022-11-08 12:00:47 konglin1

Revert "i386: Prefer remote atomic insn for atomic_fetch{add, and, or, xor}"

This reverts commit 48fa4131e419942efc9dd762694fdc7e819de392.

a14598b 2022-11-08 11:59:48 Haochen Jiang

Add m_CORE_ATOM for atom cores

gcc/ChangeLog:

* config/i386/i386-options.cc (m_CORE_ATOM): New.
* config/i386/x86-tune.def
(X86_TUNE_SCHEDULE): Initial tune for CORE_ATOM.
(X86_TUNE_PARTIAL_REG_DEPENDENCY): Ditto.
(X86_TUNE_SSE_PARTIAL_REG_DEPENDENCY): Ditto.
(X86_TUNE_SSE_PARTIAL_REG_FP_CONVERTS_DEPENDENCY): Ditto.
(X86_TUNE_SSE_PARTIAL_REG_CONVERTS_DEPENDENCY): Ditto.
(X86_TUNE_DEST_FALSE_DEP_FOR_GLC): Ditto.
(X86_TUNE_MEMORY_MISMATCH_STALL): Ditto.
(X86_TUNE_USE_LEAVE): Ditto.
(X86_TUNE_PUSH_MEMORY): Ditto.
(X86_TUNE_USE_INCDEC): Ditto.
(X86_TUNE_INTEGER_DFMODE_MOVES): Ditto.
(X86_TUNE_PREFER_KNOWN_REP_MOVSB_STOSB): Ditto.
(X86_TUNE_MISALIGNED_MOVE_STRING_PRO_EPILOGUES): Ditto.
(X86_TUNE_USE_SAHF): Ditto.
(X86_TUNE_USE_BT): Ditto.
(X86_TUNE_AVOID_FALSE_DEP_FOR_BMI): Ditto.
(X86_TUNE_ONE_IF_CONV_INSN): Ditto.
(X86_TUNE_AVOID_MFENCE): Ditto.
(X86_TUNE_USE_SIMODE_FIOP): Ditto.
(X86_TUNE_EXT_80387_CONSTANTS): Ditto.
(X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL): Ditto.
(X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Ditto.
(X86_TUNE_SSE_TYPELESS_STORES): Ditto.
(X86_TUNE_SSE_LOAD0_BY_PXOR): Ditto.
(X86_TUNE_AVOID_4BYTE_PREFIXES): Ditto.
(X86_TUNE_USE_GATHER_2PARTS): Ditto.
(X86_TUNE_USE_GATHER_4PARTS): Ditto.
(X86_TUNE_USE_GATHER): Ditto.

3d2d04c 2022-11-08 11:52:46 David Malcolm

analyzer: start adding support for errno

gcc/analyzer/ChangeLog:
* region-model-impl-calls.cc
(region_model::impl_call_errno_location): New.
* region-model-manager.cc
(region_model_manager::region_model_manager): Initialize
m_thread_local_region and m_errno_region.
* region-model-manager.h (region_model_manager::get_errno_region):
New accessor.
(region_model_manager::m_thread_local_region): New.
(region_model_manager::m_errno_region): New.
* region-model.cc (region_model::on_call_pre): Special-case
"__errno_location".
(region_model::set_errno): New.
* region-model.h (impl_call_errno_location): New decl.
(region_model::set_errno): New decl.
* region.cc (thread_local_region::dump_to_pp): New.
(errno_region::dump_to_pp): New.
* region.h (enum memory_space): Add MEMSPACE_THREAD_LOCAL.
(enum region_kind): Add RK_THREAD_LOCAL and RK_ERRNO.
(class thread_local_region): New.
(is_a_helper <const thread_local_region *>::test): New.
(class errno_region): New.
(is_a_helper <const errno_region *>::test): New.
* store.cc (binding_cluster::escaped_p): New.
(store::escaped_p): Treat errno as always having escaped.
(store::replay_call_summary_cluster): Handle RK_THREAD_LOCAL and
RK_ERRNO.
* store.h (binding_cluster::escaped_p): Remove definition.

gcc/testsuite/ChangeLog:
* gcc.dg/analyzer/errno-1.c: New test.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>

be9fdbd 2022-11-08 11:52:40 David Malcolm

analyzer: introduce succeed_or_fail_call_info

This makes some followup code much cleaner.

gcc/analyzer/ChangeLog:
* call-info.cc (success_call_info::get_desc): Delete.
(failed_call_info::get_desc): Likewise.
(succeed_or_fail_call_info::get_desc): New.
* call-info.h (class succeed_or_fail_call_info): New.
(class success_call_info): Convert to a subclass of
succeed_or_fail_call_info.
(class failed_call_info): Likewise.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>

55e0424 2022-11-08 11:52:30 David Malcolm

analyzer: fix "when 'strchr' returns non-NULL" message

Tweak analyzer handling of strchr, so that we show the
when 'strchr' returns non-NULL
message for that execution path.

gcc/analyzer/ChangeLog:
* region-model-impl-calls.cc (region_model::impl_call_strchr):
Move to on_call_post. Handle both outcomes using bifurcation,
rather than just the "not found" case.
* region-model.cc (region_model::on_call_pre): Move
BUILT_IN_STRCHR and "strchr" to...
(region_model::on_call_post): ...here.

gcc/testsuite/ChangeLog:
* gcc.dg/analyzer/strchr-1.c (test_literal): Detect writing to a
string literal. Verify that we emit the "when '__builtin_strchr'
returns non-NULL" message.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>

8d03269 2022-11-08 10:41:00 Joseph Myers

libstdc++: Fix syntax error in old-glibc case in floating_from_chars.cc [PR107562]

PR libstdc++/107562
* src/c++17/floating_from_chars.cc (from_chars_impl): Fix syntax
error.

431be04 2022-11-08 09:54:04 Jason Merrill

c++: implement P2468R2, the equality operator you are looking for

This paper is resolving the problem of well-formed C++17 code becoming
ambiguous in C++20 due to asymmetrical operator== being compared with itself
in reverse. I had previously implemented a tiebreaker such that if the two
candidates were functions with the same parameter types, we would prefer the
non-reversed candidate. But the committee went with a different approach:
if there's an operator!= with the same parameter types as the operator==,
don't consider the reversed form of the ==.

So this patch implements that, and changes my old tiebreaker to give a
pedwarn if it is used. I also noticed that we were giving duplicate errors
for some testcases, and fixed the tourney logic to avoid that.

As a result, a lot of tests of the form

struct A { bool operator==(const A&); };

need to be fixed to add a const function-cv-qualifier, e.g.

struct A { bool operator==(const A&) const; };

The committee thought such code ought to be fixed, so breaking it was fine.

18_support/comparisons/algorithms/fallback.cc also breaks with this patch,
because of the similarly asymmetrical

bool operator==(const S&, S&) { return true; }

As a result, some of the asserts need to be reversed.

The H test in spaceship-eq15.C is specified in the standard to be
well-formed because the op!= in the inline namespace is not found by the
search, but that seems wrong to me. I've implemented that behavior, but
disabled it for now; if we decide that is the way we want to go, we can just
remove the "0 &&" in add_candidates to enable it.

Co-authored-by: Jakub Jelinek <jakub@redhat.com>

gcc/cp/ChangeLog:

* cp-tree.h (fns_correspond): Declare.
* decl.cc (fns_correspond): New.
* call.cc (add_candidates): Look for op!= matching op==.
(joust): Complain about non-standard reversed tiebreaker.
(tourney): Fix champ_compared_to_predecessor logic.
(build_new_op): Don't complain about error_mark_node not having
'bool' type.
* pt.cc (tsubst_copy_and_build): Don't try to be permissive
when seen_error().

gcc/testsuite/ChangeLog:

* g++.dg/cpp2a/spaceship-eq15.C: New test.
* g++.dg/cpp0x/defaulted3.C: Add const.
* g++.dg/cpp2a/bit-cast7.C: Add const.
* g++.dg/cpp2a/spaceship-rewrite1.C: Expect error.
* g++.dg/cpp2a/spaceship-rewrite5.C: Expect error.
* g++.old-deja/g++.jason/byval2.C: Expect error.
* g++.old-deja/g++.other/overload13.C: Add const.

libstdc++-v3/ChangeLog:

* testsuite/18_support/comparisons/algorithms/fallback.cc: Adjust
asserts.

c838119 2022-11-08 09:22:19 Andrew MacLeod

Add transitive inferred range processing.

Rewalk statements at the end of a block to see if any inferred ranges
affect earlier calculations and register those as inferred ranges.

gcc/
PR tree-optimization/104530
* gimple-range-cache.cc (ranger_cache::register_inferred_value):
New. Split from:
(ranger_cache::apply_inferred_ranges): Move setting cache to
separate function.
* gimple-range-cache.h (register_inferred_value): New prototype.
* gimple-range-infer.cc (infer_range_manager::has_range_p): New.
* gimple-range-infer.h (has_range_p): New prototype.
* gimple-range.cc (register_transitive_inferred_ranges): New.
* gimple-range.h (register_transitive_inferred_ranges): New proto.
* tree-vrp.cc (rvrp_folder::fold_stmt): Check for transitive inferred
ranges at the end of the block before folding final stmt.

gcc/testsuite/
* gcc.dg/pr104530.c: New.

f8d901d 2022-11-08 09:17:53 GCC Administrator

Daily bump.

b457b77 2022-11-08 08:35:09 Jakub Jelinek

libstdc++: Fix up libstdc++ build against glibc 2.25 or older [PR107562]

On Mon, Nov 07, 2022 at 05:48:42PM +0000, Jonathan Wakely wrote:
> On Mon, 7 Nov 2022 at 16:11, Joseph Myers <joseph@codesourcery.com> wrote:
> >
> > On Wed, 2 Nov 2022, Jakub Jelinek via Gcc-patches wrote:
> >
> > > APIs. So that one can build gcc against older glibc and then compile
> > > user programs on newer glibc, the patch uses weak references unless
> > > gcc is compiled against glibc 2.26+. strfromf128 unfortunately can't
> >
> > This support for older glibc doesn't actually seem to be working, on an
> > older system with glibc 2.19 I'm seeing
> >
> > /scratch/jmyers/fsf/gcc-mainline/libstdc++-v3/src/c++17/floating_to_chars.cc:52:3: error: expected initializer before '__asm'
> > 52 | __asm ("strfromf128");
> > | ^~~~~
> >
> > and a series of subsequent errors.
>
> This seems to "fix" it (not sure if it's right though):
>
> #ifndef _GLIBCXX_HAVE_FLOAT128_MATH
> extern "C" _Float128 __strtof128(const char*, char**)
> __attribute__((__weak__));
> #endif
> extern "C" _Float128 __strtof128(const char*, char**)
> __asm ("strtof128");

It is, but floating_from_chars.cc has the same problem,
and I think we can avoid the duplication, like this:

2022-11-08 Jakub Jelinek <jakub@redhat.com>

PR libstdc++/107562
* src/c++17/floating_from_chars.cc (__strtof128): Put __asm before
__attribute__.
* src/c++17/floating_to_chars.cc (__strfromf128): Likewise.

93ab7d0 2022-11-08 07:37:22 David Faust

bpf: cleanup missed refactor

Commit 068baae1864 "bpf: add preserve_field_info builtin" factored out
some repeated code to a new function maybe_make_core_relo (), but missed
using it in one place. Clean that up.

gcc/

* config/bpf/bpf.cc (handle_attr_preserve): Use maybe_make_core_relo().

a239a63 2022-11-08 04:59:21 Aldy Hernandez

Improve multiplication by powers of 2 in range-ops.

For unsigned numbers, multiplication by X, where X is a power of 2 is
[0,0][X,+INF].

This patch causes a regression to g++.dg/pr71488.C where
-Wstringop-overflow gets the same IL as before, but better ranges
cause it to issue a bogus warning. I will create a PR with some
notes.

No discernible changes in performance.

Tested on x86-64 Linux.

PR tree-optimization/55157

gcc/ChangeLog:

* range-op.cc (operator_mult::wi_fold): Optimize multiplications
by powers of 2.

gcc/testsuite/ChangeLog:

* gcc.dg/tree-ssa/pr55157.c: New test.

03ed4e5 2022-11-08 04:18:21 H.J. Lu

Extend optimization for integer bit test on __atomic_fetch_[or|and]_*

Extend optimization for

_1 = __atomic_fetch_or_4 (ptr_6, 0x80000000, _3);
_5 = (signed int) _1;
_4 = _5 >= 0;

to

_1 = __atomic_fetch_or_4 (ptr_6, 0x80000000, _3);
_5 = (signed int) _1;
if (_5 >= 0)

gcc/

PR middle-end/102566
* tree-ssa-ccp.cc (optimize_atomic_bit_test_and): Also handle
if (_5 < 0) and if (_5 >= 0).

gcc/testsuite/

PR middle-end/102566
* g++.target/i386/pr102566-7.C

2ee0165 2022-11-08 03:29:42 Patrick Palka

libstdc++: Implement ranges::as_rvalue_view from P2446R2

libstdc++-v3/ChangeLog:

* include/std/ranges (as_rvalue_view): Define.
(enable_borrowed_range<as_rvalue_view>): Define.
(views::__detail::__can_as_rvalue_view): Define.
(views::_AsRvalue, views::as_rvalue): Define.
* testsuite/std/ranges/adaptors/as_rvalue/1.cc: New test.

f471cb7 2022-11-08 03:29:30 Patrick Palka

libstdc++: Implement ranges::cartesian_product_view from P2374R4

This also implements the proposed resolutions of the tentatively ready
LWG issues 3760, 3761 and 3801 for cartesian_product_view.

I'm not sure how/if we should implement the recommended practice of:

iterator::difference_type should be the smallest signed-integer-like
type that is sufficiently wide to store the product of the maximum
sizes of all underlying ranges if such a type exists

because for e.g.

extern std::vector<int> x, y;
auto v = views::cartesian_product(x, y);

IIUC it'd mean difference_type should be __int128 (on 64-bit systems),
which seems quite wasteful: in practice the size of any cartesian product
probably won't exceed the precision of say ptrdiff_t, and using anything
larger will just incur unnecessary space/time overhead. It's also
probably not worth the complexity to use less precision than ptrdiff_t
(when possible) either. So this patch defines difference_type as

common_type_t<ptrdiff_t, range_difference_t<_First>, range_difference_t<_Vs>...>

which should mean it's least as large as the difference_type of each
underlying range, and at least as large as ptrdiff_t. This patch also
adds assertions to catch any overflow that occurs due to this choice of
difference_type.

libstdc++-v3/ChangeLog:

* include/std/ranges (__maybe_const_t): New alias for
__detail::__maybe_const_t.
(__detail::__cartesian_product_is_random_access): Define.
(__detail::__cartesian_product_common_arg): Define.
(__detail::__cartesian_product_is_bidirectional): Define.
(__detail::__cartesian_product_is_common): Define.
(__detail::__cartesian_product_is_sized): Define.
(__detail::__cartesian_is_sized_sentinel): Define.
(__detail::__cartesian_common_arg_end): Define.
(cartesian_product_view): Define.
(cartesian_product_view::_Iterator): Define.
(views::__detail::__can_cartesian_product_view): Define.
(views::_CartesianProduct, views::cartesian_product): Define.
* testsuite/std/ranges/cartesian_product/1.cc: New test.

42f42d7 2022-11-08 03:26:02 Nathan Sidwell

C++: Template lambda mangling testcases

I found some additional cases when working on the demangler. May as
well check their mangling.

gcc/testsuite/
* g++.dg/abi/lambda-tpl1.h: Add more cases.
* g++.dg/abi/lambda-tpl1-17.C: Add checks.
* g++.dg/abi/lambda-tpl1-18.C: Likewise.
* g++.dg/abi/lambda-tpl1-18vs17.C: Likewise.

9aa1b63 2022-11-08 01:36:06 Richard Purdie

Fix NULL filename handling

The previous commit introduced a regression as some Ada tests end up passing
NULL as the filename to remap_filename. Handle this as before to fix them.

gcc/
* file-prefix-map.cc (remap_filename): Handle NULL filenames.

cb0ceea 2022-11-07 23:17:21 Jakub Jelinek

libstdc++: Update from latest fast_float [PR107468]

The following patch updates from fast_float trunk. That way
it grabs two of the 4 LOCAL_PATCHES, some smaller tweaks, to_extended
cleanups and most importantly fix for the incorrect rounding case,
PR107468 aka https://github.com/fastfloat/fast_float/issues/149
Using std::fegetround showed in benchmarks too slow, so instead of
doing that the patch limits the fast path where it uses floating
point multiplication rather than integral to cases where we can
prove there will be no rounding (the multiplication will be exact, not
just that the two multiplication or division operation arguments are
exactly representable).

2022-11-07 Jakub Jelinek <jakub@redhat.com>

PR libstdc++/107468
* src/c++17/fast_float/MERGE: Adjust for merge from upstream.
* src/c++17/fast_float/LOCAL_PATCHES: Remove commits that were
upstreamed.
* src/c++17/fast_float/README.md: Merge from fast_float
662497742fea7055f0e0ee27e5a7ddc382c2c38e commit.
* src/c++17/fast_float/fast_float.h: Likewise.
* testsuite/20_util/from_chars/pr107468.cc: New test.

e5bcbcd 2022-11-07 23:15:50 Jakub Jelinek

libstdc++: Add _Float128 to_chars/from_chars support for x86, ia64 and ppc64le with glibc

The following patch adds std::{to,from}_chars support for std::float128_t
on glibc 2.26+ for {i?86,x86_64,ia64,powerpc64le}-linux.
When long double is already IEEE quad, previous changes already handle
it by using long double overloads in _Float128 overloads.
The powerpc64le case (with explicit or implicit -mabi=ibmlongdouble)
is handled by using the __float128/__ieee128 entrypoints which are
already in the library and used for -mabi=ieeelongdouble.
For i?86, x86_64 and ia64 this patch adds new library entrypoints,
mostly by enabling the code that was already there for powerpc64le-linux.
Those use __float128 or __ieee128, the patch uses _Float128 for the
exported overloads and internally as template parameter. While
powerpc64le-linux uses __sprintfieee128 and __strtoieee128,
for _Float128 the patch uses the glibc 2.26 strfromf128 and strtof128
APIs. So that one can build gcc against older glibc and then compile
user programs on newer glibc, the patch uses weak references unless
gcc is compiled against glibc 2.26+. strfromf128 unfortunately can't
handle %.0Lf and %.*Le, %.*Lf, %.*Lg format strings sprintf/__sprintfieee128
use, we need to remove the L from those and replace * with actually
directly printing the precision into the format string (i.e. it can
handle %.0f and %.27f (floating point type is implied from the function
name)).
Unlike the std::{,b}float16_t support, this one actually exports APIs
with std::float128_t aka _Float128 in the mangled name, because no
standard format is superset of it. On the other side, e.g. on i?86/x86_64
it doesn't have restrictions like for _Float16/__bf16 which ISAs need
to be enabled in order to use it.

The denorm_min case in the testcase is temporarily commented out because
of the ERANGE subnormal issue Patrick posted patch for.

2022-11-07 Jakub Jelinek <jakub@redhat.com>

* include/std/charconv (from_chars, to_chars): Add _Float128
overfloads if _GLIBCXX_HAVE_FLOAT128_MATH is defined.
* config/abi/pre/gnu.ver (GLIBCXX_3.4.31): Export
_ZSt8to_charsPcS_DF128_, _ZSt8to_charsPcS_DF128_St12chars_format,
_ZSt8to_charsPcS_DF128_St12chars_formati and
_ZSt10from_charsPKcS0_RDF128_St12chars_format.
* src/c++17/floating_from_chars.cc (USE_STRTOF128_FOR_FROM_CHARS):
Define if needed.
(__strtof128): Declare.
(from_chars_impl): Handle _Float128.
(from_chars): New _Float128 overload if USE_STRTOF128_FOR_FROM_CHARS
is define.
* src/c++17/floating_to_chars.cc (__strfromf128): Declare.
(FLOAT128_TO_CHARS): Define even when _Float128 is supported and
wider than long double.
(F128_type): Use _Float128 for that case.
(floating_type_traits): Specialize for F128_type rather than
__float128.
(sprintf_ld): Add length argument. Handle _Float128.
(__floating_to_chars_shortest, __floating_to_chars_precision):
Pass length to sprintf_ld.
(to_chars): Add _Float128 overloads for the F128_type being
_Float128 cases.
* testsuite/20_util/to_chars/float128_c++23.cc: New test.

5d060d8 2022-11-07 22:01:14 Alexander Monakov

tree-ssa-sink: do not touch calls that return twice

Avoid moving pure/const calls that may return twice in tree-ssa-sink:
properly redirecting the associated abnormal edge is non-trivial.

gcc/ChangeLog:

PR tree-optimization/107505
* tree-ssa-sink.cc (statement_sink_location): Additionally
reject ECF_RETURNS_TWICE calls.

gcc/testsuite/ChangeLog:

PR tree-optimization/107505
* gcc.dg/pr107505.c: New test.

3bff15c 2022-11-07 20:41:41 Aldy Hernandez

[range-op] Restrict division by power of 2 optimization to positive numbers.

The problem here is that we are transforming a division by a power of
2 into a right shift, and using this to shift the maybe nonzero bits.
This gives the wrong result when the number being divided is negative.

In the testcase we are dividing this by 8:

[irange] int [-256, -255] NONZERO 0xffffff01

and coming up with:

[irange] int [-32, -31] NONZERO 0xffffffe0

The maybe nonzero bits are wrong as -31 has the LSB set (0xffffffe1)
whereas the bitmask says the lower 4 bits are off.

PR tree-optimization/107541

gcc/ChangeLog:

* range-op.cc (operator_div::fold_range): Restrict power of 2
optimization to positive numbers.

gcc/testsuite/ChangeLog:

* gcc.dg/tree-ssa/pr107541.c: New test.

071d00e 2022-11-07 19:32:33 Tobias Burnus

Fortran: Fix reallocation on assignment for kind=4 strings [PR107508]

The check whether reallocation on assignment was required did not handle
kind=4 characters correctly such that there was always a reallocation,
implying issues with pointer addresses and lower bounds. Additionally,
with all deferred strings, the old memory was not freed on reallocation.
And, finally, inside the block which was only executed if string lengths
or bounds or dynamic types changed, was a subcheck of the same, which
was effectively a no op but still confusing and at least added with -O0
extra instructions to the binary.

PR fortran/107508

gcc/fortran/ChangeLog:

* trans-array.cc (gfc_alloc_allocatable_for_assignment): Fix
string-length check, plug memory leak, and avoid generation of
effectively no-op code.
* trans-expr.cc (alloc_scalar_allocatable_for_assignment): Extend
comment; minor cleanup.

gcc/testsuite/ChangeLog:

* gfortran.dg/widechar_11.f90: New test.

21cd625 2022-11-07 18:35:04 konglin1

i386: Fix typo in sse-22.c pragma

gcc/testsuite/ChangeLog:

* gcc.target/i386/sse-22.c: Fix typo in pragma GCC target.

7314b98 2022-11-07 17:59:26 Richard Biener

unswitch most profitable condition first

When doing the loop unswitching re-org we promised to followup
with improvements on the cost modeling. The following makes sure we
try to unswitch on the most profitable condition first. As most profitable
we pick the condition leading to the edge with the highest profile count.

Note the profile is only applied when picking the first unswitching
opportunity since the profile counts are not updated with earlier
unswitchings in mind. Further opportunities are picked in DFS order.

* tree-ssa-loop-unswitch.cc (unswitch_predicate::count): New.
(unswitch_predicate::unswitch_predicate): Initialize count.
(init_loop_unswitch_info): First collect candidates and
determine the outermost loop to unswitch.
(tree_ssa_unswitch_loops): First perform all guard hoisting,
then perform unswitching on innermost loop predicates.
(find_unswitching_predicates_for_bb): Keep track of the
most profitable predicate to unswitch on.
(tree_unswitch_single_loop): Unswitch given predicate if
not NULL.

a8fb90e 2022-11-07 17:54:09 Martin Liska

docs: update: document sanitizers can trigger warnings

gcc/ChangeLog:

* doc/invoke.texi: Improve wording.

Co-Authored-By: Gerald Pfeifer <gerald@pfeifer.com>

33dc1ba 2022-11-07 17:51:14 Martin Liska

Mitigate clang warnings:

gcc/range-op.cc:1752:16: warning: 'wi_fold' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
gcc/range-op.cc:1757:16: warning: 'wi_op_overflows' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
gcc/range-op.cc:1759:16: warning: 'op1_range' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
gcc/range-op.cc:1763:16: warning: 'op2_range' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
gcc/range-op.cc:1928:16: warning: 'wi_fold' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
gcc/range-op.cc:1933:16: warning: 'wi_op_overflows' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]

gcc/ChangeLog:

* range-op.cc: Add final override keywords.

96c0533 2022-11-07 17:36:36 Cedric Landet

ada: Document that gprof won't work on windows with PIE.

Document that gprof won't work on windows with PIE and -no-pie must be
used.

gcc/ada/

* doc/gnat_ugn/gnat_and_program_execution.rst: Mention the needed
-no-pie for windows to use gprof.
* gnat_ugn.texi: Regenerate.