[committed] RISC-V: Drop some commited accidentally code.

2020-11-30 Thread Kito Cheng
gcc/ChangeLog: * config.gcc (riscv*-*-*): Drop some commited accidentally code. --- gcc/config.gcc | 1 - 1 file changed, 1 deletion(-) diff --git a/gcc/config.gcc b/gcc/config.gcc index c348596b1ac..4808b698f3a 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -4615,7 +4615,6 @@ case

[PATCH] Add unordered containers heterogeneous lookup

2020-11-30 Thread François Dumont via Gcc-patches
Let me know if I need to reference a specific paper or any other Standard reference here. Maybe P1690R1 I used here ? I tried to allow the same partition trick you can have on ordered containers (see Partition in tests) even if here elements are not ordered so I aren't sure there can be any

Re: [PATCH] [tree-optimization] Optimize max/min pattern with comparison

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/30/20 7:00 PM, Eugene Rozenfeld wrote: > Thank you for the review Jeff. > > I don't need to look at the opcode to know the result. The pattern will be > matched only in these 4 cases: > > X <= MAX(X, Y) -> true > X > MAX(X, Y) -> false > X >= MIN(X, Y) -> true > X < MIN(X, Y) -> false >

[PATCH] [Refactor] [AVX512] Combine VI12_AVX512VL with VI48_AVX512VL into VI_AVX512VLBW

2020-11-30 Thread Hongtao Liu via Gcc-patches
Hi: There're many pairs of define_insn/define_expand that are very similar to each other except mode iterator and condition. For these patterns VI12_AVX512VL are used under condition TARGET_AVX512BW, and VI48_AVX512VL are used under condition TARGET_AVX512F. This patch is about to introduce a new

Re: [PATCH] i386: Optimize vpsubusw compared to 0 into vpcmpleuw or vpcmpnltuw[PR96906]

2020-11-30 Thread Hongtao Liu via Gcc-patches
On Mon, Nov 30, 2020 at 9:46 PM Jakub Jelinek wrote: > > On Mon, Nov 30, 2020 at 09:11:10PM +0800, Hongtao Liu wrote: > > +;; PR96906 - optimize vpsubusw compared to 0 into vpcmpleuw or vpcmpnltuw. > > +(define_split > > + [(set (match_operand: 0 "register_operand") > > +(unspec: > > +

Re: [PATCH] [tree-optimization] Optimize max/min pattern with comparison

2020-11-30 Thread Eugene Rozenfeld via Gcc-patches
Thank you for the review Jeff. I don't need to look at the opcode to know the result. The pattern will be matched only in these 4 cases: X <= MAX(X, Y) -> true X > MAX(X, Y) -> false X >= MIN(X, Y) -> true X < MIN(X, Y) -> false So, the result will be true for GE_EXPR and LE_EXPR and false

Re: [PATCH][PR target/97770] x86: Add missing popcount2 expander

2020-11-30 Thread Hongyu Wang via Gcc-patches
> OK. Presumably once this is applied Richi is going to look at the > higher level issues in the vectorizer which inhibit creating the HI/QI > vector popcounts? > Yes, this is the prerequisite to look at the vectorization issue. I'll ask Hongtao to help check-in this patch. Thanks for the

Re: [PATCH] handle conditionals in -Wstringop-overflow et al. (PR 92936)

2020-11-30 Thread Martin Sebor via Gcc-patches
On 11/30/20 1:49 PM, Jeff Law wrote: On 11/29/20 3:27 PM, Martin Sebor wrote: On 11/13/20 2:34 PM, Jeff Law wrote: On 11/2/20 7:24 PM, Martin Sebor wrote: The attached patch extends compute_objsize() to handle conditional expressions represented either as PHIs or MIN_EXPR and MAX_EXPR. To

Re: [00/23] Make fwprop use an on-the-side RTL SSA representation

2020-11-30 Thread Michael Matz
Hello, On Mon, 30 Nov 2020, Jeff Law wrote: > >> So, then let's start with one of > >> the prime examples of SSA deconstruction problems, the lost swap, and how > >> it comes to be: we start with a swap: > >> > >> x = ..., y = ... > >> if (cond) > >> tmp=x, x=y, y=tmp > >> > >> (1)

Re: [PATCH] libstdc++: Add C++ runtime support for new 128-bit long double format

2020-11-30 Thread Segher Boessenkool
Hi! Thank you for all this. On Wed, Nov 11, 2020 at 09:50:01PM +, Jonathan Wakely wrote: > This adds support for the new __ieee128 long double format on > powerpc64le targets. > * testsuite/27_numerics/complex/abi_tag.cc: Add u9___ieee128 to > regex matching expected

Re: How to traverse all the local variables that declared in the current routine?

2020-11-30 Thread Qing Zhao via Gcc-patches
On Nov 30, 2020, at 11:18 AM, Martin Sebor wrote: Does gcc provide an iterator to traverse all the local variables that are declared in the current routine? If not, what’s the best way to traverse the local variables? >>> >>> Depends on what for.

Re: [PATCH] detect allocation/deallocation mismatches in user-defined functions (PR94527)

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/13/20 2:45 PM, Martin Sebor via Gcc-patches wrote: > Bug 94527 is request from the kernel developers for an attribute > to indicate that a user-defined function deallocates an object > allocated by an earlier call to an allocation function.  Their > goal is to detect misuses of such

Re: [PATCH] Unbreak build with --disable-analyzer

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/30/20 3:39 PM, David Malcolm wrote: > On Mon, 2020-11-30 at 16:19 -0500, David Malcolm wrote: >> I broke the build with --disable-analyzer with >> g:66dde7bc64b75d4a338266333c9c490b12d49825, due to: >> >> ../../src/gcc/analyzer/analyzer-pass.cc: In member function 'virtual >> unsigned int

Re: [PATCH] Unbreak build with --disable-analyzer

2020-11-30 Thread David Malcolm via Gcc-patches
On Mon, 2020-11-30 at 16:19 -0500, David Malcolm wrote: > I broke the build with --disable-analyzer with > g:66dde7bc64b75d4a338266333c9c490b12d49825, due to: > > ../../src/gcc/analyzer/analyzer-pass.cc: In member function 'virtual > unsigned int {anonymous}::pass_analyzer::execute(function*)': >

[PATCH][GCC] aarch64: Add +flagm to -march

2020-11-30 Thread Przemyslaw Wirkus via Gcc-patches
New +flagm (Condition flag manipulation from Armv8.4-A) feature option for -march command line option. Please note that FLAGM stays an Armv8.4-A feature but now can be assigned to other architectures or CPUs. OK for master? gcc/ChangeLog: * config/aarch64/aarch64-option-extensions.def

Re: [C++ patch] Re: Free more of CFG in release_function_body

2020-11-30 Thread Jason Merrill via Gcc-patches
On 11/27/20 8:26 AM, Jan Hubicka wrote: On Wed, Nov 25, 2020 at 3:11 PM Jan Hubicka wrote: On Tue, 24 Nov 2020, Jan Hubicka wrote: Hi, at the end of processing function body we loop over basic blocks and free all edges while we do not free the rest. I think this is leftover from time eges

Re: [PATCH 3/3] Improve efficiency of copying section from another tree

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/30/20 5:16 AM, Martin Liška wrote: > On 11/13/19 7:29 AM, Strager Neds wrote: >> -/* Worker for set_section.  */ >> +void >> +symtab_node::set_section_for_node (const symtab_node ) >> +{ >> +  if (x_section == other.x_section) >> +    return; >> +  if (get_section () && other.get_section

Re: [PATCH] introduce --param max-object-size

2020-11-30 Thread Martin Sebor via Gcc-patches
On 11/30/20 1:29 PM, Jeff Law wrote: On 11/17/20 7:09 PM, Martin Sebor wrote: On 11/16/20 4:54 PM, Jeff Law wrote: On 11/16/20 2:04 AM, Richard Biener via Gcc-patches wrote: On Sun, Nov 15, 2020 at 1:46 AM Martin Sebor via Gcc-patches wrote: GCC considers PTRDIFF_MAX - 1 to be the size

Re: [PATCH] libstdc++: Add C++ runtime support for new 128-bit long double format

2020-11-30 Thread Michael Meissner via Gcc-patches
Jonathan, could you send a fresh set of patches (or at least replacements)? I tried installing the patches on a master branch I checked out this morning, and I got two rejects: --- libstdc++-v3/testsuite/util/testsuite_abi.cc +++ libstdc++-v3/testsuite/util/testsuite_abi.cc @@ -207,6 +207,7 @@

[PATCH] Unbreak build with --disable-analyzer

2020-11-30 Thread David Malcolm via Gcc-patches
I broke the build with --disable-analyzer with g:66dde7bc64b75d4a338266333c9c490b12d49825, due to: ../../src/gcc/analyzer/analyzer-pass.cc: In member function 'virtual unsigned int {anonymous}::pass_analyzer::execute(function*)': ../../src/gcc/analyzer/analyzer-pass.cc:86:3: error:

Re: [00/23] Make fwprop use an on-the-side RTL SSA representation

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/27/20 9:31 AM, Richard Sandiford via Gcc-patches wrote: > Michael Matz writes: >> Hello, >> >> On Thu, 26 Nov 2020, Richard Sandiford via Gcc-patches wrote: >> > The aim is only to provide a different view of existing RTL instructions. > Unlike gimple, and unlike (IIRC) the old

Re: [PATCH] Objective-C++ : Allow prefix attrs on linkage specs.

2020-11-30 Thread Jason Merrill via Gcc-patches
On 11/27/20 6:08 PM, Iain Sandoe wrote: Jason Merrill wrote: On Mon, Nov 23, 2020 at 8:52 AM Iain Sandoe wrote: Jason Merrill wrote: (NOTE: likewise,   ^~~ starting indent is below ‘int’ for a fixed spacing font) === I’m inclined to think that the second is more useful, but have

Re: [PING] [PATCH] Avoid atomic for guard acquire when that is expensive

2020-11-30 Thread Jason Merrill via Gcc-patches
On 11/30/20 3:08 PM, Bernd Edlinger wrote: Hi, I'd like to ping for this patch: I reviewed it on the 24th: https://gcc.gnu.org/pipermail/gcc-patches/2020-November/560118.html https://gcc.gnu.org/pipermail/gcc-patches/2020-November/559882.html Thanks Bernd. On 11/22/20 9:05 AM, Bernd

Re: [PATCH] Remove redundant builtins for avx512f scalar instructions.

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/30/20 9:26 AM, Jakub Jelinek wrote: > On Mon, Nov 30, 2020 at 09:23:15AM -0700, Jeff Law wrote: >> >> On 11/12/20 11:21 PM, Hongyu Wang wrote: >>> Hi >>> >>> Thanks for reminding me about this patch. I didn't remove any existing >>> intrinsics, just remove redundant builtin functions that

Re: [PATCH v2] rs6000: Disable HTM for Power10 and later

2020-11-30 Thread Segher Boessenkool
Hi! On Mon, Nov 30, 2020 at 06:36:30PM +0800, Kewen.Lin wrote: > --- a/gcc/config/rs6000/rs6000-cpus.def > +++ b/gcc/config/rs6000/rs6000-cpus.def > @@ -51,7 +51,6 @@ >| OPTION_MASK_CRYPTO \ >|

Re: [patch][rtl-optimization][i386][pr97777] Fix a reg-stack df maintenance bug triggered by zero-call-used-regs pass.

2020-11-30 Thread Qing Zhao via Gcc-patches
Hi, Jeff, Sorry for the late reply due to thanksgiving long weekend. > On Nov 25, 2020, at 1:37 PM, Jeff Law wrote: > > > > On 11/19/20 8:59 AM, Qing Zhao via Gcc-patches wrote: >> Hi, >> >> PR9 - ICE: in df_refs_verify, at df-scan.c:3991 with -O >> -ffinite-math-only

Re: [PATCH] handle conditionals in -Wstringop-overflow et al. (PR 92936)

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/29/20 3:27 PM, Martin Sebor wrote: > On 11/13/20 2:34 PM, Jeff Law wrote: >> >> On 11/2/20 7:24 PM, Martin Sebor wrote: >>> The attached patch extends compute_objsize() to handle conditional >>> expressions represented either as PHIs or MIN_EXPR and MAX_EXPR. >>> >>> To simplify the

Re: [PATCH] IPA: drop implicit_section again

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/30/20 5:48 AM, Martin Liška wrote: > As mentioned in the PR, since 4656461585bfd0b9 implicit_section > was not set to false when set_section was called with the argument > equal to NULL. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed?

Re: [PATCH] VAX: Fix the LTO compiler downgrading code to non-PIC model

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/30/20 8:11 AM, Maciej W. Rozycki wrote: > Fix a testsuite failure: > > /tmp/ccL65Mmt.s: Assembler messages: > /tmp/ccL65Mmt.s:36: Warning: Symbol n used as immediate operand in PIC mode. > FAIL: gcc.dg/lto/pr55660 c_lto_pr55660_0.o-c_lto_pr55660_1.o link, -O0 -flto > -flto-partition=none

Re: [PATCH] introduce --param max-object-size

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/17/20 7:09 PM, Martin Sebor wrote: > On 11/16/20 4:54 PM, Jeff Law wrote: >> >> On 11/16/20 2:04 AM, Richard Biener via Gcc-patches wrote: >>> On Sun, Nov 15, 2020 at 1:46 AM Martin Sebor via Gcc-patches >>> wrote: GCC considers PTRDIFF_MAX - 1 to be the size of the largest object

libgo patch committed: Don't define CacheLinePadSize for mips64x

2020-11-30 Thread Ian Lance Taylor via Gcc-patches
This libgo patch changes the internal/cpu package to not define CacheLinePadSize for mips64x. For libgo the definition always comes from the generated file cpugen.go. This fixes GCC PR 98041. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

Go patch committed: Check len and cap for append(s, make(T, I)...)

2020-11-30 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend and runtime checks both len and cap when handling the case of append(s, make(T, I)...). The overflow checks done in growslice always reported an error for the capacity argument, even if it was the length argument that overflowed. This change lets the code pass the

libgo patch committed: Define SO_RCVTIMEO on 32-bit GNU/Linux

2020-11-30 Thread Ian Lance Taylor via Gcc-patches
This libgo patch defines SO_RCVTIMEO on 32-bit GNU/Linux. It was not being defined before because it is defined as a conditional expression that is too complicated for -fdump-go-spec to handle. This fixes https://golang.org/issue/42872. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.

Go patch committed: Improve error messages for expected curly brace

2020-11-30 Thread Ian Lance Taylor via Gcc-patches
This Go frontend patch improves the error messages for an expected curly brace. This is for https://golang.org/issue/17328. This requires updating some tests to the current sources in the main repo. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

Go patch committed: Use correct assignment order for type assertions

2020-11-30 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend uses the use correct assignment order for type assertions. For "a, b := v.(T)" we must set a before b. This is for https://golang.org/issue/13433. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

[PING] [PATCH] Avoid atomic for guard acquire when that is expensive

2020-11-30 Thread Bernd Edlinger
Hi, I'd like to ping for this patch: https://gcc.gnu.org/pipermail/gcc-patches/2020-November/559882.html Thanks Bernd. On 11/22/20 9:05 AM, Bernd Edlinger wrote: > Hi, > > this avoids the need to use -fno-threadsafe-statics on > arm-none-eabi or working around that problem by supplying > a

Go patch committed: Always use int context for index values

2020-11-30 Thread Ian Lance Taylor via Gcc-patches
This patch changes the Go frontend to always use a context that expects an int type when determining the type of an index value. This is for https://golang.org/issue/14844. This requires updating one of the tests in the testsuite to the source version. Bootstrapped and ran Go testsuite on

Go patch committed: Better error messages for missing interface method

2020-11-30 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend generates better error messages for a missing interface method. This is for https://golang.org/issue/10700. This requires updating one test to the one in the source repo. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

Re: [15/23] recog: Add a validate_change_xveclen function

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/13/20 1:19 AM, Richard Sandiford via Gcc-patches wrote: > A later patch wants to be able to use the validate_change machinery > to reduce the XVECLEN of a PARALLEL. This should be more efficient > than allocating a separate PARALLEL at a possibly distant memory > location, especially

Go patch committed: Improve error for import of non-string

2020-11-30 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend improves the error message when using an import statement with something other than a string. This requires updating one of the tests to the current version in the main repo. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

Re: [09/23] Add a cut-down version of std::span (array_slice)

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/13/20 1:15 AM, Richard Sandiford via Gcc-patches wrote: > A later patch wants to be able to pass around subarray views of an > existing array. The standard class to do that is std::span, but it's > a C++20 thing. This patch just adds a cut-down version of it. > > The intention is just

Re: [14/23] simplify-rtx: Put simplify routines into a class

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/13/20 1:18 AM, Richard Sandiford via Gcc-patches wrote: > One of the recurring warts of RTL is that multiplication by a power > of 2 is represented as a MULT inside a MEM but as an ASHIFT outside > a MEM. It would obviously be better if we didn't have this kind of > context sensitivity,

Re: [PATCH] dse: Cope with bigger-than-integer modes [PR98037]

2020-11-30 Thread Richard Biener via Gcc-patches
On November 30, 2020 7:18:37 PM GMT+01:00, Richard Sandiford wrote: >Richard Biener writes: >> On November 30, 2020 4:29:41 PM GMT+01:00, Richard Sandiford via >Gcc-patches wrote: >>>dse.c:find_shift_sequence tries to represent a store and load >>>back as a shift right followed by a

Re: Add 'dg-note' next to 'dg-optimized', 'dg-missed' (was: [PATCH] dumpfile.c: use prefixes other that 'note: ' for MSG_{OPTIMIZED_LOCATIONS|MISSED_OPTIMIZATION})

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/24/20 2:53 AM, Thomas Schwinge wrote: > Hi! > > Ping. > > > Grüße > Thomas > > > On 2020-11-06T10:26:46+0100, I wrote: >> Hi, again! >> >> On 2018-09-25T16:00:14-0400, David Malcolm wrote: >>> As noted at Cauldron, dumpfile.c currently emits "note: " for all kinds >>> of dump message,

Re: Updating the backend status for h8300 on the wiki

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/30/20 7:37 AM, John Paul Adrian Glaubitz wrote: > Hi! > > Now that h8300 has been converted to use MODE_CC, it might be a good idea > to update the documentation on the wiki [1] which still lists h8300 as > being cc0. Thanks.  I'd been meaning to update that. I also took care of updating

[committed] Remove dead cc0 code from H8 port

2020-11-30 Thread Jeff Law via Gcc-patches
This patch removes a bit of now dead cc0 code from the H8 port. In particular it drops the "cc" attribute various insns and removes notice_update_cc.  We keep the attribute, but call it "old_cc" for now.  The compute_*_cc routines get re-purposed in the optimization patches (not yet submitted),

Re: [PATCH] testsuite: remove LIT annotation and reduce

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/30/20 7:02 AM, Martin Liška wrote: > I noticed the test-case contains LIT annotation and > it is possible to reduce. I did that with compiler that > was affected by the PR. > > Ready for master? > Tahnks, > Martin > > gcc/testsuite/ChangeLog: > >     * g++.dg/torture/pr93347.C:

Re: [PATCH v3 01/31] PR target/58901: reload: Handle SUBREG of MEM with a mode-dependent address

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/27/20 1:50 PM, Maciej W. Rozycki wrote: > From: Matt Thomas > > Fix an ICE with the handling of RTL expressions like: > > (subreg:QI (mem/c:SI (plus:SI (plus:SI (mult:SI (reg/v:SI 0 %r0 [orig:67 i ] > [67]) > (const_int 4 [0x4])) > (reg/v/f:SI 7 %r7

Re: [PATCH 25/31] VAX: Fix predicates for widening multiply and multiply-add insns

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/30/20 9:02 AM, Maciej W. Rozycki wrote: > On Fri, 20 Nov 2020, Jeff Law wrote: > >> ps.  Yes, I skipped the insv/extv changes.  They're usually a rats nest >> of special cases.  We'll come back to them. > I've thought of actually reducing the number of patterns to the minimum > possible

Re: [PATCH] dse: Cope with bigger-than-integer modes [PR98037]

2020-11-30 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On November 30, 2020 4:29:41 PM GMT+01:00, Richard Sandiford via Gcc-patches > wrote: >>dse.c:find_shift_sequence tries to represent a store and load >>back as a shift right followed by a truncation. It therefore >>needs to find an integer mode in which to do the shift

[PATCH] Add feature test macro for atomic::wait

2020-11-30 Thread Thomas Rodgers
From: Thomas Rodgers Adds __cpp_lib_atomic_wait feature test macro which was overlooked in the initial commit of this feature. Replaces uses of _GLIBCXX_HAVE_ATOMIC_WAIT. libstdc++-v3/ChangeLog: * include/bits/atomic_base.h: Replace usage of _GLIBCXX_HAVE_ATOMIC_WAIT with

Re: [PATCH] profopt-execute: unset testname_with_flags if create_gcov fails

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/26/20 12:22 PM, Ilya Leoshkevich via Gcc-patches wrote: > Bootstrapped and regtested on x86_64-redhat-linux and > s390x-redhat-linux. Ok for master? > > > > When diffing test results, there sometimes occur spurious "New tests > that PASS" / "Old tests that passed, that have disappeared"

Re: [PATCH] gcc-11/changes: Document new configure flag --enable-s390-excess-float-precision

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/26/20 2:58 AM, Marius Hillenbrand via Gcc-patches wrote: > Hi, > > To document the new behavior around FLT_EVAL_METHOD and configure flag > --enable-s390-excess-float-precision on s390, I propose this update to the > Release Notes. Please commit to git-wwwdocs if you agree. > > Checked

Re: [PATCH] [tree-optimization] Optimize max/min pattern with comparison

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/25/20 3:04 PM, Eugene Rozenfeld via Gcc-patches wrote: > Make the following simplifications: > X <= MAX(X, Y) -> true > X > MAX(X, Y) -> false > X >= MIN(X, Y) -> true > X < MIN(X, Y) -> false > > This fixes PR96708. > > Tested on x86_64-pc-linux-gnu. > > bool

Re: [PATCH] dse: Cope with bigger-than-integer modes [PR98037]

2020-11-30 Thread Richard Biener via Gcc-patches
On November 30, 2020 4:29:41 PM GMT+01:00, Richard Sandiford via Gcc-patches wrote: >dse.c:find_shift_sequence tries to represent a store and load >back as a shift right followed by a truncation. It therefore >needs to find an integer mode in which to do the shift right. >The loop it uses has

Re: [PATCH] ipa-cp: Avoid unwanted multiple propagations (PR 97816)

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/20/20 12:41 PM, Martin Jambor wrote: > Hi, > > this is an updated patch based on our conversation on IRC today. So far > I have had a look at the effects on only tramp3d and although it makes > the heuristics more pessimistic more times than optimistic (number of > clones at -Ofast drops

Re: How to traverse all the local variables that declared in the current routine?

2020-11-30 Thread Martin Sebor via Gcc-patches
On 11/30/20 9:23 AM, Qing Zhao wrote: Hi, Martin, Thanks a lot for your suggestion. On Nov 25, 2020, at 6:08 PM, Martin Sebor > wrote: On 11/24/20 9:54 AM, Qing Zhao via Gcc-patches wrote: On Nov 24, 2020, at 9:55 AM, Richard Biener

Re: [PATCH] driver: Don't imply -dD for -g3 -g0 [PR97989]

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/26/20 1:39 AM, Jakub Jelinek via Gcc-patches wrote: > Hi! > > The driver enables -dD when preprocessing when -g3 is specified, for obvious > reasons > that we need the macros to be preserved somewhere for them to make up the > debug > info. But it enables it even if -g3 is later

Re: [PATCH v2] C-family : Add attribute 'unavailable'.

2020-11-30 Thread Martin Sebor via Gcc-patches
On 11/29/20 6:56 PM, Iain Sandoe wrote: Hi Martin, Martin Sebor via Gcc-patches wrote: On 11/10/20 12:38 PM, Iain Sandoe wrote: —— commit message. If an interface is marked 'deprecated' then, presumably, at some point it will be withdrawn and no longer available.  The 'unavailable'

Re: [PATCH] dse: Cope with bigger-than-integer modes [PR98037]

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/30/20 8:29 AM, Richard Sandiford via Gcc-patches wrote: > dse.c:find_shift_sequence tries to represent a store and load > back as a shift right followed by a truncation. It therefore > needs to find an integer mode in which to do the shift right. > The loop it uses has the form: > >

Re: [PATCH] [tree-optimization] Optimize or+and+or pattern to and+or

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/22/20 6:35 PM, Eugene Rozenfeld via Gcc-patches wrote: > Simplify > ((b | c) & a) | b > to > (a & c) | b. > > This fixes PR96679. > > Tested on x86_64-pc-linux-gnu. > > int f(int a, int b, int c) > { > return ((b | c) & a) | b; > } > > Code without the patch: > or edx,esi > and

Re: [PATCH v3 1/2] generate EH info for volatile asm statements (PR93981)

2020-11-30 Thread J.W. Jagersma via Gcc-patches
On 2020-11-23 09:20, Richard Biener wrote: > On Sun, Nov 22, 2020 at 5:38 PM J.W. Jagersma wrote: >> >> On 2020-11-21 12:27, J.W. Jagersma wrote: >>> ... >>> Another idea I had is to introduce a new operand modifier, eg. '-', which >>> would signify that the output *must* be considered clobbered

Re: [PATCH][AVX512]Lower AVX512 vector compare to AVX version when dest is vector

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/16/20 8:10 PM, Hongtao Liu wrote: > On Tue, Nov 17, 2020 at 8:05 AM Jeff Law wrote: >> >> On 9/2/20 3:34 AM, Hongtao Liu via Gcc-patches wrote: >>> Hi: >>> Add define_peephole2 to eliminate potential redundant conversion >>> from mask to vector. >>> Bootstrap is ok, regression test

Re: [PATCH] ipa: dump symtab to emergency dump file

2020-11-30 Thread Martin Liška
On 11/30/20 4:50 PM, Jan Hubicka wrote: On 11/30/20 7:04 AM, Martin Liška wrote: Hi. It's handy to have symbol table when we dump emergency dump. It's likely next stage1 material. Thoughts? Martin gcc/ChangeLog:     * passes.c (emergency_dump_function): Dump symtab when     we

Re: [PATCH] Remove redundant builtins for avx512f scalar instructions.

2020-11-30 Thread Jakub Jelinek via Gcc-patches
On Mon, Nov 30, 2020 at 09:23:15AM -0700, Jeff Law wrote: > > > On 11/12/20 11:21 PM, Hongyu Wang wrote: > > Hi > > > > Thanks for reminding me about this patch. I didn't remove any existing > > intrinsics, just remove redundant builtin functions that end-users > > would not likely to use. > > >

Re: How to traverse all the local variables that declared in the current routine?

2020-11-30 Thread Qing Zhao via Gcc-patches
Hi, Martin, Thanks a lot for your suggestion. > On Nov 25, 2020, at 6:08 PM, Martin Sebor wrote: > > On 11/24/20 9:54 AM, Qing Zhao via Gcc-patches wrote: >>> On Nov 24, 2020, at 9:55 AM, Richard Biener >>> wrote: >>> >>> On Tue, Nov 24, 2020 at 4:47 PM Qing Zhao wrote:

Re: [PATCH] Remove redundant builtins for avx512f scalar instructions.

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/12/20 11:21 PM, Hongyu Wang wrote: > Hi > > Thanks for reminding me about this patch. I didn't remove any existing > intrinsics, just remove redundant builtin functions that end-users > would not likely to use. > > Also I'm OK to keep current implementation, in case there might be >

[PATCH] changelog: add hint for a file mismatch

2020-11-30 Thread Martin Liška
Pushed to master. It's supposed to provide a hint, e.g. ERR: unchanged file mentioned in a ChangeLog (did you mean "gcc/testsuite/gfortran.dg/goacc-gomp/free-1.f90"?):"gcc/testsuite/gfortran.dg/goacc-gomp/free-1.f" Martin contrib/ChangeLog: * gcc-changelog/git_commit.py: Suggest

Re: [24/32] module mapper

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/12/20 9:24 AM, Nathan Sidwell wrote: > On 11/3/20 4:17 PM, Nathan Sidwell wrote: >> this is the module mapper client and server pieces.  It features a >> default resolver that can read a text file, or generate default >> mappings from module name to cmi name. > > Richard rightly suggested

Re: [PATCH][PR target/97770] x86: Add missing popcount2 expander

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/11/20 6:54 PM, Hongyu Wang via Gcc-patches wrote: > Hi, > > According to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97770, x86 > backend need popcount2 expander so __builtin_popcount could be > auto vectorized with AVX512BITALG/AVX512VPOPCNTDQ targets. > > For DImode the middle-end

[committed] Fix non-unique testnames

2020-11-30 Thread Jeff Law via Gcc-patches
This patch fixes a handful of tests with non-unique names which confuse the living hell out of compare_tests, particularly if one of two tests [x]fail while the other is [x]pass which compare_tests will flag as a regression each and every run. No doubt there's a lot more of these lying around and

Re: [PATCH 25/31] VAX: Fix predicates for widening multiply and multiply-add insns

2020-11-30 Thread Maciej W. Rozycki
On Fri, 20 Nov 2020, Jeff Law wrote: > ps.  Yes, I skipped the insv/extv changes.  They're usually a rats nest > of special cases.  We'll come back to them. I've thought of actually reducing the number of patterns to the minimum possible by folding the existing ones together, and then getting

Re: [PATCH] ipa: dump symtab to emergency dump file

2020-11-30 Thread Jan Hubicka
> > > On 11/30/20 7:04 AM, Martin Liška wrote: > > Hi. > > > > It's handy to have symbol table when we dump emergency dump. > > It's likely next stage1 material. > > > > Thoughts? > > Martin > > > > gcc/ChangeLog: > > > >     * passes.c (emergency_dump_function): Dump symtab when > >    

Re: [PATCH] ipa: dump symtab to emergency dump file

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/30/20 7:04 AM, Martin Liška wrote: > Hi. > > It's handy to have symbol table when we dump emergency dump. > It's likely next stage1 material. > > Thoughts? > Martin > > gcc/ChangeLog: > >     * passes.c (emergency_dump_function): Dump symtab when >     we are in an IPA pass. Your

[PATCH] dse: Cope with bigger-than-integer modes [PR98037]

2020-11-30 Thread Richard Sandiford via Gcc-patches
dse.c:find_shift_sequence tries to represent a store and load back as a shift right followed by a truncation. It therefore needs to find an integer mode in which to do the shift right. The loop it uses has the form: FOR_EACH_MODE_FROM (new_mode_iter,

Re: [PATCH] match.pd: Use ranges to optimize some x * y / y to x [PR97997]

2020-11-30 Thread Andrew MacLeod via Gcc-patches
On 11/26/20 3:52 AM, Jakub Jelinek wrote: Hi! For signed integers with undefined overflow we already optimize x * y / y into x, but for signed integers with -fwrapv or unsigned integers we don't. The following patch allows optimizing that into just x if value ranges prove that x * y will never

[PATCH] VAX: Fix the LTO compiler downgrading code to non-PIC model

2020-11-30 Thread Maciej W. Rozycki
Fix a testsuite failure: /tmp/ccL65Mmt.s: Assembler messages: /tmp/ccL65Mmt.s:36: Warning: Symbol n used as immediate operand in PIC mode. FAIL: gcc.dg/lto/pr55660 c_lto_pr55660_0.o-c_lto_pr55660_1.o link, -O0 -flto -flto-partition=none -fuse-linker-plugin where non-PIC code is substituted by

[committed] libstdc++: Add new C++20 headers to Doxygen settings

2020-11-30 Thread Jonathan Wakely via Gcc-patches
This doesn't actually have any effect unless you also change the predefined value of __cplusplus, as it's currently 201703L. But if somebody does want to do that, the new headers will get processed now. libstdc++-v3/ChangeLog: * doc/doxygen/user.cfg.in (INPUT): Add and . Tested

Re: [committed] libstdc++: Set dg-timeout-factor for some slow tests

2020-11-30 Thread Jonathan Wakely via Gcc-patches
On 26/11/20 16:25 +, Jonathan Wakely wrote: These tests are very, very slow to compile. If the testsuite is run with a low tool_timeout value they are likely to fail. By adding a multiplication factor to those tests, it's still possible to use a low timeout without spurious failures.

Re: [RFC] Decrease default timeout for libstdc++ tests to 6 minutes

2020-11-30 Thread Jonathan Wakely via Gcc-patches
On 27/11/20 21:17 +0100, Christophe Lyon via Libstdc++ wrote: On Fri, 27 Nov 2020 at 17:13, Jonathan Wakely via Gcc-patches wrote: The default for the GCC testsuite is 300, i.e. 5 minutes, which is the same as the DejaGnu default. Libstdc++ overrides this to 600, i.e. 10 minutes. This seems

Re: Fortran: With OpenACC, ignore OpenMP's cond comp sentinels [PR98011]

2020-11-30 Thread Tobias Burnus
... and now committed as r11-5572-g1d6f6ac693a8601bef9fe4ba72eb6fbf7b60b5cd. Thanks again for the suggestions! Tobias On 27.11.20 23:14, Tobias Burnus wrote: On 27.11.20 18:31, Jakub Jelinek via Fortran wrote: Depends on what does the OpenACC standard say. If it has similar wording to OpenMP

Updating the backend status for h8300 on the wiki

2020-11-30 Thread John Paul Adrian Glaubitz
Hi! Now that h8300 has been converted to use MODE_CC, it might be a good idea to update the documentation on the wiki [1] which still lists h8300 as being cc0. Adrian > [1] https://gcc.gnu.org/backends.html -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `.

Re: [Patch] Fortran: -fno-automatic and -fopenacc / recusion check cleanup

2020-11-30 Thread Tobias Burnus
Now installed as r11-5571-gf4e7ea81d1369d4d6cb6d8e440aefb3407142e05. Tobias On 27.11.20 11:16, Tobias Burnus wrote: Two fixes – simple, see patch + commit text. Longer description: * options: Background: - OpenMP, OpenACC and imply that a function is called concurrently and -frecursive

[Patch, committed] Fortran's dump-parse-tree.c: Use '==' not '=' for '.eq.'.

2020-11-30 Thread Tobias Burnus
I was a bit confused by the '=' (assignment?) in the dump; hence, in line with /=, >= etc. it now is '==' for '==' or '.eq.'. Committed as r11-5570-g2610c786f7496c5006bb68d6801ef7450bd231a9 Tobias - Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany

Re: [PATCH] c++, debug: Treat -std=c++20 -gdwarf-5 like C++14 rather than C++98

2020-11-30 Thread Richard Biener via Gcc-patches
On Mon, Nov 30, 2020 at 3:12 PM Jakub Jelinek via Gcc-patches wrote: > > Hi! > > I have noticed that while we use DW_LANG_C_plus_plus_14 for -std=c++17 > -gdwarf-5, > we use DW_LANG_C_plus_plus (aka C++98) for -std=c++20 -gdwarf-5. The > following patch makes those two match. > > Ok for trunk

[Ada] Remove all ^L characters

2020-11-30 Thread Pierre-Marie de Rodat
These control characters are mainly causing confusion at this stage, so remove them. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gcc-interface/Makefile.in, gcc-interface/trans.c: Remove ^L characters.diff --git a/gcc/ada/gcc-interface/Makefile.in

[Ada] Wrong replacement of Component.Discriminant

2020-11-30 Thread Pierre-Marie de Rodat
The procedure Replace_Discr_Ref added a few years ago is overzealous and triggers in too many cases in the case of multiple records with discriminants involved. It appears that this procedure is no longer needed at this stage, so simply remove it. Tested on x86_64-pc-linux-gnu, committed on trunk

[Ada] Fix internal error on extended return and fixed-point result

2020-11-30 Thread Pierre-Marie de Rodat
This prevents the expander from creating an access before elaboration issue for a temporary generated for a range check applied to the expression of a degenerate extended return statement (an extended return statement without an explicit do/end construct). Expand_N_Extended_Return_Statement has

[Ada] Implement inheritance for Default_Initial_Condition and address other gaps

2020-11-30 Thread Pierre-Marie de Rodat
The existing (SPARK-based) implementation of Default_Initial_Condition aspects only applies DIC checks based on a type's own DIC (or only one DIC from an ancestor if the type doesn't specify one, but not from further up the ancestor chain), but Ada 202x (AI12-0265) specifies that all DICs of

[Ada] Expand integer-only implementation of ordinary fixed-point types

2020-11-30 Thread Pierre-Marie de Rodat
This change relaxes the conditions under which the implementation of ordinary fixed-point types uses only underlying integer instructions. These conditions are on the Small of the ordinary fixed-point types, which must now be a rational number whose factors are of a magnitude bounded relatively

[Ada] Enable checks on runtime by default

2020-11-30 Thread Pierre-Marie de Rodat
These checks are not very costly these days and bring additional safety and security guarantees built into the Ada language, so enable them by default. It turns out that enabling checks on s-bitfie.adb makes a latent visibility bug appeared on strict alignment platform (related to alignment

[Ada] Reimplement Ada.Numerics.Big_Numbers.Big_Reals.Fixed_Conversions

2020-11-30 Thread Pierre-Marie de Rodat
This reimplements the aforementioned generic package according to the requirements of the Ada 2020 RM, namely that To_Big_Real be exact and that From_Big_Real use the common conversion rules. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/a-nbnbre.adb

[Ada] Implement -gnateb switch

2020-11-30 Thread Pierre-Marie de Rodat
The -gnateb switch instructs gnat to store configuration pragma files by their basename in ALI files instead of using absolute paths. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Describe -gnateb switch.

[Ada] Add stream-oriented attributes support for 128-bit integer types

2020-11-30 Thread Pierre-Marie de Rodat
This was overlooked in the original implementation of these types. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-xdr): Document that XDR is not supported for 128-bit integer types. * gnat_ugn.texi:

[Ada] Compiler crash on limited conditional expressions

2020-11-30 Thread Pierre-Marie de Rodat
This patch fixes a bug in which if the expression of an expression function is a conditional expression of limited type, the compiler crashes. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch3.adb (Expand_N_Object_Declaration): Avoid crash in case of

[Ada] Improve error recovery

2020-11-30 Thread Pierre-Marie de Rodat
Function P_Formal_Part was unnecessarily calling Scan after calling T_Semicolon: T_Semicolon is already calling Scan to go past the comma-used-insted-of-semicolon. This avoids spurious cascaded errors in case of e.g: procedure P (A : Integer, B : Integer, C : Integer) is where ',' is used

[Ada] Fix folding of comparison operators in GNATprove mode

2020-11-30 Thread Pierre-Marie de Rodat
Folding of comparison operators was disabled for GNATprove in assertion expressions (except for some special cases). However, folding itself is harmless. The problem was only in the current value optimizer, which interferes with assertions that act as cut points for proof. Tested on

[Ada] Fix serial port control setting on GNU/Linux

2020-11-30 Thread Pierre-Marie de Rodat
This fixes an issue when setting the control flags of the serial communication port. The c_cflag termios field should not be set with the baud rate. The speed of the communication is set using the c_ispeed and c_ospeed fields. Setting the baud rate into the c_cflag has unexpected results as it

[Ada] Spurious error on iterator over container with modified private part

2020-11-30 Thread Pierre-Marie de Rodat
The compiler rejects an element iterator (for .. of) over a container that extends a predefined container with additional operations in the private part, when these added operations overload existing GNAT-specific private operations used to optimize such loops. Tested on x86_64-pc-linux-gnu,

[Ada] Potential read of uninitialized variable in exp_dist.adb

2020-11-30 Thread Pierre-Marie de Rodat
Found by using -gnatVa and Initialize_Scalars on GNAT sources. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_dist.adb (RCI_Cache): Initialize.diff --git a/gcc/ada/exp_dist.adb b/gcc/ada/exp_dist.adb --- a/gcc/ada/exp_dist.adb +++ b/gcc/ada/exp_dist.adb @@ -902,7

  1   2   >