Re: [PATCH] lto-plugin: add support for feature detection

2022-05-15 Thread Alexander Monakov via Gcc-patches
On Sun, 15 May 2022, Rui Ueyama wrote: [snip] > > So get_symbols_v3 allows the linker to discard an LTO .o file to solve this. > > > > In absence of get_symbols_v3 mold tries to ensure correctness by restarting > > itself while appending a list of .o files to be discarded to its command > > line.

Re: [PATCH] lto-plugin: add support for feature detection

2022-05-15 Thread Rui Ueyama via Gcc-patches
On Sun, May 15, 2022 at 3:53 PM Alexander Monakov wrote: > > On Sun, 15 May 2022, Rui Ueyama wrote: > > [snip] > > > So get_symbols_v3 allows the linker to discard an LTO .o file to solve > > > this. > > > > > > In absence of get_symbols_v3 mold tries to ensure correctness by > > > restarting >

Re: [PATCH] lto-plugin: add support for feature detection

2022-05-15 Thread Alexander Monakov via Gcc-patches
On Sun, 15 May 2022, Rui Ueyama wrote: > > Is that a good tradeoff in the LTO case though? I believe you cannot assume > > the plugin to be thread-safe, so you're serializing its API calls, right? > > But the plugin is doing a lot of work, so using the index to feed it with as > > few LTO objects

[PATCH] rs6000: add support for sanitizers on FreeBSD

2022-05-15 Thread Piotr Kubaj
GCC's f732bf6a603721f61102a08ad2d023c7c2670870 merged LLVM's 315d792130258a9b7250494be8d002ebb427b08f, which added sanitizers support for PowerPC on FreeBSD, so this commit only enables building it. Enabled sanitizers are the same as on powerpc*-*-linux*. libsanitizer * configure.tgt: add

Re: [PATCH] lto-plugin: add support for feature detection

2022-05-15 Thread Rui Ueyama via Gcc-patches
On Sun, May 15, 2022 at 4:51 PM Alexander Monakov wrote: > > On Sun, 15 May 2022, Rui Ueyama wrote: > > > > Is that a good tradeoff in the LTO case though? I believe you cannot > > > assume > > > the plugin to be thread-safe, so you're serializing its API calls, right? > > > But the plugin is doi

Re: [PATCH] lto-plugin: add support for feature detection

2022-05-15 Thread Alexander Monakov via Gcc-patches
On Sun, 15 May 2022, Rui Ueyama wrote: > > Makes sense, but I still don't understand why mold wants to discover in > > advance whether the plugin is going to use get_symbols_v3. How would it > > help with what mold does today to handle the _v2 case? > > Currently, mold restarts itself to reset th

Re: [PATCH] lto-plugin: add support for feature detection

2022-05-15 Thread Rui Ueyama via Gcc-patches
On Sun, May 15, 2022 at 6:09 PM Alexander Monakov wrote: > > On Sun, 15 May 2022, Rui Ueyama wrote: > > > > Makes sense, but I still don't understand why mold wants to discover in > > > advance whether the plugin is going to use get_symbols_v3. How would it > > > help with what mold does today to

[PATCH] rs6000: add support for sanitizers on FreeBSD

2022-05-15 Thread Piotr Kubaj
GCC's f732bf6a603721f61102a08ad2d023c7c2670870 merged LLVM's 315d792130258a9b7250494be8d002ebb427b08f, which added sanitizers support for PowerPC on FreeBSD, so this commit only enables building it. Enabled sanitizers are the same as on powerpc*-*-linux*. libsanitizer * configure.tgt: add

Re: [PATCH] lto-plugin: add support for feature detection

2022-05-15 Thread Alexander Monakov via Gcc-patches
On Sun, 15 May 2022, Rui Ueyama wrote: > > Can you simply restart the linker on first call to get_symbols_v2 instead? > > I could, but it may not be a safe timing to call exec(2). I believe we > are expected to call cleanup_hook after calling all_symbols_read_hook, > and it is not clear what will

Re: [PATCH] lto-plugin: add support for feature detection

2022-05-15 Thread Rui Ueyama via Gcc-patches
On Sun, May 15, 2022 at 7:37 PM Alexander Monakov wrote: > > On Sun, 15 May 2022, Rui Ueyama wrote: > > > > Can you simply restart the linker on first call to get_symbols_v2 instead? > > > > I could, but it may not be a safe timing to call exec(2). I believe we > > are expected to call cleanup_hoo

Re: [PATCH] lto-plugin: add support for feature detection

2022-05-15 Thread Alexander Monakov via Gcc-patches
On Sun, 15 May 2022, Rui Ueyama wrote: > > Regarding files, as far as I can tell, GCC plugin will leave a 'resolution > > file' > > on disk, but after re-exec it would recreate it anyway. > > Does it recreate a temporary file with the same file name so that > there's no temporary file left on th

Re: [PATCH] gdc 9, 10 and 11 bug fix

2022-05-15 Thread Iain Buclaw via Gcc-patches
Excerpts from Marc Aurèle La France's message of Mai 12, 2022 10:29 pm: > Greetings. > > No compiler has any business rejecting files for the sole crime of being > symlinked to. The following applies, modulo patch fuzz, to the 9, 10 and 11 > series of compilers. > > Given my use of shadow trees,

Re: libgompd: ADD OMPD support and global ICV functions

2022-05-15 Thread Mohamed Atef via Gcc-patches
Ping في الجمعة، ١٣ مايو، ٢٠٢٢ ٩:١٩ م Mohamed Atef كتب: > Hello Jakub, >I am sorry, but should #ifdef __ELF__ put and separate file and also > the actual functions (e.g. extern ompd_dll_location_valid (void)) > I mean both in the same files or the functions should be in the > omp-tools.h but

Re: libgompd: ADD OMPD support and global ICV functions

2022-05-15 Thread Mohamed Atef via Gcc-patches
في الأحد، ١٥ مايو، ٢٠٢٢ ٤:١٨ م Mohamed Atef كتب: > Ping > > في الجمعة، ١٣ مايو، ٢٠٢٢ ٩:١٩ م Mohamed Atef > كتب: > >> Hello Jakub, >>I am sorry, but should #ifdef __ELF__ put and separate file and also >> the actual functions (e.g. extern ompd_dll_location_valid (void)) >> I mean both in the

[pushed] c++: array {}-init [PR105589]

2022-05-15 Thread Jason Merrill via Gcc-patches
My patch for 105191 made us use build_value_init more frequently from build_vec_init_expr, but build_value_init doesn't like to be called to initialize a class in a template. That's caused trouble in the past, and seems like a strange restriction, so let's fix it. Tested x86_64-pc-linux-gnu, appl

[pushed] c++: parsing injected-class-name as template

2022-05-15 Thread Jason Merrill via Gcc-patches
While I was backporting the patch for PR102300, it occurred to me that it would be cleaner to look through the injected-class-name earlier in the function. I don't think this changes any test results. Tested x86_64-pc-linux-gnu, applying to trunk. gcc/cp/ChangeLog: * parser.cc (cp_parse

[pushed] c++: hidden friend access [DR1699]

2022-05-15 Thread Jason Merrill via Gcc-patches
It has come up several times that Clang considers hidden friends of a class to be sufficiently memberly to be covered by a friend declaration naming the class. This is somewhat unclear in the standard: [class.friend] says "Declaring a class to be a friend implies that private and protected members

[PATCH] i386: Remove constraints when used with constant integer predicates.

2022-05-15 Thread Uros Bizjak via Gcc-patches
const_int_operand and other const*_operand predicates do not need constraints when the constraint is inherited from the range of constant integer predicate. Remove the constraint in case all alternatives use the same inherited constraint. 2022-05-15 Uroš Bizjak gcc/ChangeLog: * config/i3

[GCC 12][committed] d: Merge upstream dmd a53934d18, phobos 604534d7c.

2022-05-15 Thread Iain Buclaw via Gcc-patches
Hi, Upstream dmd has now released v2.100.0, this patch merges in the latest bug fixes since the last sync-up of the release branch. D front-end changes: - Import dmd v2.100.0 release. - The new behavior of issuing deprecation messages for scope violations has been reverted until ne

Re: [PATCH] Expand __builtin_memcmp_eq with ptest for OImode.

2022-05-15 Thread Hongtao Liu via Gcc-patches
ping. On Sat, May 7, 2022 at 1:05 PM liuhongt via Gcc-patches wrote: > > This is adjusted patch only for OImode. > > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. > Ok for trunk? > > gcc/ChangeLog: > > PR target/104610 > * config/i386/i386-expand.cc (ix86_expand_branch

Re: [PATCH] lto-plugin: add support for feature detection

2022-05-15 Thread Rui Ueyama via Gcc-patches
On Sun, May 15, 2022 at 8:07 PM Alexander Monakov wrote: > > On Sun, 15 May 2022, Rui Ueyama wrote: > > > > Regarding files, as far as I can tell, GCC plugin will leave a > > > 'resolution file' > > > on disk, but after re-exec it would recreate it anyway. > > > > Does it recreate a temporary fil

[PATCH v5, rs6000] Add a combine pattern for CA minus one [PR95737]

2022-05-15 Thread HAO CHEN GUI via Gcc-patches
Hi, This patch adds a combine pattern for "CA minus one". As CA only has two values (0 or 1), we could convert following pattern (sign_extend:DI (plus:SI (reg:SI 98 ca) (const_int -1 [0x] to (plus:DI (reg:DI 98 ca) (const_int -1 [0xfff

Re: Supporting RISC-V Vendor Extensions in the GNU Toolchain

2022-05-15 Thread Andrew Waterman
On Fri, May 13, 2022 at 3:38 AM Philipp Tomsich wrote: > On Fri, 13 May 2022 at 12:00, Christoph Müllner > wrote: > > > > On Wed, May 11, 2022 at 2:02 AM Palmer Dabbelt > wrote: > > > > > > [Sorry for cross-posting to a bunch of lists, I figured it'd be best to > > > have all the discussions in

Re: [PATCH 1/3]middle-end: Add the ability to let the target decide the method of argument promotions.

2022-05-15 Thread Richard Biener via Gcc-patches
On Fri, 13 May 2022, Tamar Christina wrote: > Hi All, > > Some targets require function parameters to be promoted to a different > type on expand time because the target may not have native instructions > to work on such types. As an example the AArch64 port does not have native > instructions w

Re: [PATCH] lto-plugin: add support for feature detection

2022-05-15 Thread Alexander Monakov via Gcc-patches
On Mon, 16 May 2022, Rui Ueyama wrote: > If it is a guaranteed behavior that GCC of all versions that support > only get_symbols_v2 don't leave a temporary file behind if it is > suddenly disrupted during get_symbols_v2 execution, then yes, mold can > restart itself when get_symbols_v2 is called f

Re: [PATCH v5, rs6000] Add a combine pattern for CA minus one [PR95737]

2022-05-15 Thread Kewen.Lin via Gcc-patches
Hi Haochen, on 2022/5/16 13:22, HAO CHEN GUI wrote: > Hi, >This patch adds a combine pattern for "CA minus one". As CA only has two > values (0 or 1), we could convert following pattern > (sign_extend:DI (plus:SI (reg:SI 98 ca) > (const_int -1 [0x] > t