Re: Builtin for consulting value analysis (better ffs() code gen)

2024-03-14 Thread Florian Weimer via Gcc
* Andrew Cooper via Gcc: > Anyway - is there a way of doing this that I've managed to overlook? Use __builtin_ffs? I think there's some concern for GCC that some of the alternative x86-64 implementations do not follow the AMD and Intel behavior. Thanks, Florian

Re: Builtin for consulting value analysis (better ffs() code gen)

2024-03-14 Thread Andrew Cooper via Gcc
On 14/03/2024 6:04 am, Alexander Monakov wrote: > On Thu, 14 Mar 2024, Andrew Cooper via Gcc wrote: > >> I suppose that what I'm looking for is something a little like >> __builtin_constant_p() which can either be used in a straight if(), or >> in a __builtin_choose_expr(). >> >> Anyway - is there

Re: Builtin for consulting value analysis (better ffs() code gen)

2024-03-14 Thread Andrew Cooper via Gcc
On 14/03/2024 11:02 am, Florian Weimer wrote: > * Andrew Cooper via Gcc: > >> Anyway - is there a way of doing this that I've managed to overlook? > Use __builtin_ffs? > > I think there's some concern for GCC that some of the alternative x86-64 > implementations do not follow the AMD and Intel beha

Re: Builtin for consulting value analysis (better ffs() code gen)

2024-03-14 Thread Andreas Schwab via Gcc
On Mär 14 2024, Andrew Cooper via Gcc wrote: > so any known-constant value can be folded.  What I'm dealing with is the > remainder of the cases. Which cases remain? -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now fo

Using std types and functions within GCC

2024-03-14 Thread Pierrick Philippe
Hi all, I was wondering, is there any conventions or guidelines regarding the usage of types and/or functions coming from the C++ std library within the compiler? To explicit a bit more, I am working on modification on the analyzer and might need to use a pair. Thank you for your time, Pierrick

Re: Using std types and functions within GCC

2024-03-14 Thread Jonathan Wakely via Gcc
On Thu, 14 Mar 2024 at 12:54, Pierrick Philippe wrote: > > Hi all, > > I was wondering, is there any conventions or guidelines regarding the > usage of types and/or functions coming from the C++ std library within > the compiler? The relevant header needs to be included from the gcc/system.h head

Re: Using std types and functions within GCC

2024-03-14 Thread David Malcolm via Gcc
On Thu, 2024-03-14 at 13:28 +, Jonathan Wakely via Gcc wrote: > On Thu, 14 Mar 2024 at 12:54, Pierrick Philippe > wrote: > > > > Hi all, Hi Pierrick! It was good to meet you at FOSDEM. > > > > I was wondering, is there any conventions or guidelines regarding > > the > > usage of types and

Re: Using std types and functions within GCC

2024-03-14 Thread Jonathan Wakely via Gcc
On Thu, 14 Mar 2024 at 14:49, David Malcolm wrote: > > On Thu, 2024-03-14 at 13:28 +, Jonathan Wakely via Gcc wrote: > > On Thu, 14 Mar 2024 at 12:54, Pierrick Philippe > > wrote: > > > > > > Hi all, > > Hi Pierrick! It was good to meet you at FOSDEM. > > > > > > > I was wondering, is there

Re: Builtin for consulting value analysis (better ffs() code gen)

2024-03-14 Thread Andrew Cooper via Gcc
On 14/03/2024 12:03 pm, Andreas Schwab wrote: > On Mär 14 2024, Andrew Cooper via Gcc wrote: > >> so any known-constant value can be folded.  What I'm dealing with is the >> remainder of the cases. > Which cases remain? None, thanks to the answers on this thread. The overall structure I've got no

Re: [RFC] add regenerate Makefile target

2024-03-14 Thread Simon Marchi via Gcc
On 2024-03-13 04:02, Christophe Lyon via Gdb wrote: > Hi! > > After recent discussions on IRC and on the lists about maintainer-mode > and various problems with auto-generated source files, I've written > this small prototype. > > Based on those discussions, I assumed that people generally wan

Re: GSoC

2024-03-14 Thread Thomas Schwinge
Hi Abhinav! Thanks for your interest in contributing to GCC, and thanks to Martin for all the information you already provided. Just a bit more, to get you started on developing a proper project proposal: On 2024-03-13T14:54:52+0100, Martin Jambor wrote: > On Tue, Mar 12 2024, Abhinav Gupta wro

gcc-11-20240314 is now available

2024-03-14 Thread GCC Administrator via Gcc
Snapshot gcc-11-20240314 is now available on https://gcc.gnu.org/pub/gcc/snapshots/11-20240314/ and on various mirrors, see https://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 11 git branch with the following options: git://gcc.gnu.org/git/gcc.git branch

RELLEB relocation format for ELF

2024-03-14 Thread Fangrui Song via Gcc
The relocation formats REL and RELA for ELF are inefficient. In a release build of Clang for x86-64, .rela.* sections consume a significant portion (approximately 20.9%) of the file size. I propose RELLEB, a new format offering significant file size reductions: 17.2% (x86-64), 16.5% (aarch64), and