Re: [PATCH] sched-deps: do not schedule pseudos across calls [PR108117]

2023-01-13 Thread Jose E. Marchesi via Gcc-patches
> On Fri, 23 Dec 2022, Jose E. Marchesi wrote: > >> > +1 for trying this FWIW. There's still plenty of time to try an >> > alternative solution if there are unexpected performance problems. >> >> Let me see if Alexander's patch fixes the is

Re: [PATCH,WWWDOCS] htdocs: add an Atom feed for GCC news

2023-01-17 Thread Jose E. Marchesi via Gcc-patches
> On Wed, 11 Jan 2023, Thomas Schwinge wrote: >> On 2022-12-23T10:50:13+0100, "Jose E. Marchesi via Gcc-patches" >> wrote: >>> This patch adds an Atom feed for GCC news, which can then be easily >>> aggregated in other sites, such as the GNU

[COMMITTED] bpf: disable -fstack-protector in BPF

2023-01-17 Thread Jose E. Marchesi via Gcc-patches
The stack protector is not supported in BPF. This patch disables -fstack-protector in bpf-* targets, along with the emission of a note indicating that the feature is not supported in this platform. Regtested in bpf-unknown-none. gcc/ChangeLog: * config/bpf/bpf.cc (bpf_option_override):

Re: [PATCH] bpf: Use enum for resolved overloaded builtins

2022-11-07 Thread Jose E. Marchesi via Gcc-patches
Hi David. > Change several places in the eBPF backend dealing with overloaded > built-in functions to consistently use the enum bpf_builtins type, > rather than variously using integer constants or booleans. The result is > eaiser to read and extend. > > Tested on bpf-unknown-none, no known regr

Re: [PATCH] bpf: fix memory constraint of ldx/stx instructions [PR108790]

2023-02-14 Thread Jose E. Marchesi via Gcc-patches
Hi David. > In some cases where the target memory address for an ldx or stx > instruction could be reduced to a constant, GCC could emit a malformed > instruction like: > > ldxdw %r0,0 > > Rather than the expected form: > > ldxdw %rX, [%rY + OFFSET] > > This is due to the constraint allo

Re: [patch] bpf: Fix double whitespace warning

2023-02-15 Thread Jose E. Marchesi via Gcc-patches
> Hi! > > Since a recent commit, the BPF target produces a new warning due to > two consecutive non-quoted spaces in a message. This'll fix it: > > gcc/ > * config/bpf/bpf.cc (bpf_option_override): Fix doubled space. > > > Ok? OK. Thanks for the patch. (Sorry I didn't fix this when you f

Re: [committed] Docs: Fix formatting issues in BPF built-ins documentation

2023-03-20 Thread Jose E. Marchesi via Gcc-patches
Hi Sandra. > This section of the GCC manual had some issues with lines in the > example overflowing into the right margin of the PDF-format document, > but as I looked at it more closely I also saw that it was full of > missing or incorrect Texinfo markup, too. I've cleaned it up thusly. Thank

Re: [PATCH] bpf: add preserve_field_info builtin

2022-10-20 Thread Jose E. Marchesi via Gcc-patches
Hi David. Thanks for the patch. Please see a few comments below. > @@ -975,6 +978,161 @@ static tree bpf_core_compute (tree, vec > *); > static int bpf_core_get_index (const tree); > static bool is_attr_preserve_access (tree); > > +static void > +maybe_make_core_relo (tree expr, enum btf_c

Re: [PATCH v2] bpf: add preserve_field_info builtin

2022-10-25 Thread Jose E. Marchesi via Gcc-patches
> Hi Jose, > > Thanks for your comments. I think I've addressed them all in the updated > patch below. > >>>+ get_inner_reference (src, &bitsize, &bitpos, &var_off, &mode, &unsignedp, >>>+ &reversep, &volatilep); >> >>Since the information returned by the builtin is always cons

Re: [PATCH v3] bpf: add preserve_field_info builtin

2022-10-26 Thread Jose E. Marchesi via Gcc-patches
Hi David. Thanks for the updates. OK for master. >>> I'm not sure whether this behavior is a known limitation or an >>> oversight. In my opinion it makes more sense to error at compile time, >>> becuase even after the loader patches the return value it still will >>> not be correct for these ca

Re: [ping2][PATCH 0/8][RFC] Support BTF decl_tag and type_tag annotations

2022-05-24 Thread Jose E. Marchesi via Gcc-patches
> On 5/11/22 11:44 AM, David Faust wrote: >> >> On 5/10/22 22:05, Yonghong Song wrote: >>> >>> >>> On 5/10/22 8:43 PM, Yonghong Song wrote: On 5/6/22 2:18 PM, David Faust wrote: > > > On 5/5/22 16:00, Yonghong Song wrote: >> >> >> On 5/4/22 10:03 AM, David

Re: [PATCH 5/7] bpf: BPF CO-RE support

2021-08-10 Thread Jose E. Marchesi via Gcc-patches
Hi David. This BPF part is OK. > This commit introduces support for BPF Compile Once - Run > Everywhere (CO-RE) in GCC. > > gcc/ChangeLog: > > * config/bpf/bpf.c: Adjust includes. > (bpf_handle_preserve_access_index_attribute): New function. > (bpf_attribute_table): Use it here

Re: [PATCH 6/7] bpf testsuite: Add BPF CO-RE tests

2021-08-10 Thread Jose E. Marchesi via Gcc-patches
Hi David. This BPF part is OK. > This commit adds several tests for the new BPF CO-RE functionality to > the BPF target testsuite. > > gcc/testsuite/ChangeLog: > > * gcc.target/bpf/core-attr-1.c: New test. > * gcc.target/bpf/core-attr-2.c: Likewise. > * gcc.target/bpf/core-attr

Re: [PATCH,V2 1/3] bpf: Add new -mcore option for BPF CO-RE

2021-08-10 Thread Jose E. Marchesi via Gcc-patches
> On Thu, Aug 5, 2021 at 2:54 AM Indu Bhagat via Gcc-patches > wrote: >> >> -mcore in the BPF backend enables code generation for the CO-RE usecase. LTO >> is >> disabled for CO-RE compilations. > > -mcore reads like "core", why not -mco-re? Anyway, ... > >> gcc/ChangeLog: >> >> * conf

Re: [PATCH, V2 2/3] targhooks: New target hook for CTF/BTF debug info emission

2021-08-19 Thread Jose E. Marchesi via Gcc-patches
> On Tue, Aug 17, 2021 at 7:26 PM Indu Bhagat wrote: >> >> On 8/17/21 1:04 AM, Richard Biener wrote: >> > On Mon, Aug 16, 2021 at 7:39 PM Indu Bhagat wrote: >> >> >> >> On 8/10/21 4:54 AM, Richard Biener wrote: >> >>> On Thu, Aug 5, 2021 at 2:52 AM Indu Bhagat via Gcc-patches >> >>> wrote: >>

Re: [PATCH, V2 2/3] targhooks: New target hook for CTF/BTF debug info emission

2021-08-19 Thread Jose E. Marchesi via Gcc-patches
> Hmm, well. How about emitting .BTF.ext.string from GCC and have the linker > merge the .BTF.ext.string section with the CTF string section then? You can't > really say "the ship has sailed" if I read the CTF webpage - there seems to be > many format changes planned. Forgot to mention that BP

Re: [PATCH,V2 1/3] bpf: Add new -mcore option for BPF CO-RE

2021-08-26 Thread Jose E. Marchesi via Gcc-patches
Hi Richard. > On Tue, Aug 10, 2021 at 5:45 PM Jose E. Marchesi > wrote: >> >> >> > On Thu, Aug 5, 2021 at 2:54 AM Indu Bhagat via Gcc-patches >> > wrote: >> >> >> >> -mcore in the BPF backend enables code generation for the CO-RE

Re: [PATCH] bpf: correct zero_extend output templates

2021-09-09 Thread Jose E. Marchesi via Gcc-patches
Hi David. > The output templates for zero_extendhidi2 and zero_extendqidi2 could > lead to incorrect code generation when zero-extending one register into > another. This patch adds a new output template to the define_insns to > handle such cases and produce correct asm. > > gcc/ChangeLog: >

Re: [COMMITTED][patch][version 9]add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-09-10 Thread Jose E. Marchesi via Gcc-patches
gt; "proposed". :) > > Can you two work on wording to add to gcc-12/changes.html for this > feature? I think it deserves a release note. Likewise the CTF/BTF > support btw. What about something like this for the BPF, CTF and BTF changes.. commit 3826495d1a2c265954d5da13ca71925

Re: [PATCH 0/3] bpf: add -mcpu and related feature options

2021-09-10 Thread Jose E. Marchesi via Gcc-patches
Hi David. > New instructions have been added over time to the eBPF ISA, but > previously there has been no good method to select which version to > target in GCC. > > This patch adds the following options to the BPF backend: > > -mcpu={v1, v2, v3} > Select which version of the eBPF ISA to

Re: [COMMITTED][patch][version 9]add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-09-13 Thread Jose E. Marchesi via Gcc-patches
> On Fri, Sep 10, 2021 at 3:47 PM Jose E. Marchesi via Gcc-patches > wrote: >> >> >> Hi Richard. >> >> > On Thu, 9 Sep 2021, Kees Cook wrote: >> > >> >> On Thu, Sep 09, 2021 at 10:49:11PM +, Qing Zhao wrote: >> >&g

Re: [PATCH] bpf: correct extra_headers

2021-09-28 Thread Jose E. Marchesi via Gcc-patches
Hi David. > The BPF CO-RE support (commit 8bdabb37549f12ce727800a1c8aa182c0b1dd42a) > mistakenly overwrote bpf-*-* extra_headers in config.gcc, causing > bpf-helpers.h to not be installed. The redefinition with coreout.h is > unneeded, so delete it. This is OK. Thanks. > > gcc/ChangeLog: > >

[COMMITTED] dwarf2ctf: fix typo in comment

2021-10-13 Thread Jose E. Marchesi via Gcc-patches
gcc/ChangeLog: * dwarf2ctf.c: Fix typo in comment. --- gcc/dwarf2ctf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/dwarf2ctf.c b/gcc/dwarf2ctf.c index b686bafda44..c9e70798a3b 100644 --- a/gcc/dwarf2ctf.c +++ b/gcc/dwarf2ctf.c @@ -33,7 +33,7 @@ static ctf_id_t

[COMMITTED] bpf: mark/remove unused arguments and remove an unused function

2021-12-06 Thread Jose E. Marchesi via Gcc-patches
This patch does a little bit of cleanup by removing some unused arguments, or marking them as unused. It also removes the function ctfc_debuginfo_early_finish_p and the corresponding hook macro definition, which are not used by GCC. gcc/ * config/bpf/bpf.c (bpf_handle_preserve_access_inde

Re: [PATCH v2] bpf: write CO-RE relocation record size only once

2022-01-18 Thread Jose E. Marchesi via Gcc-patches
Hi David. > [Changed from v1: Adjust to account for file renaming so patch applies.] > > The CO-RE relocation record size should be written only once in the > .BTF.ext section, not once for each section with relocations. > > Tested for bpf-unknown-none. OK to install? This is OK. Thanks for the

Re: [PATCH v2] bpf: ensure correct string offsets in BTF.ext

2022-01-18 Thread Jose E. Marchesi via Gcc-patches
Hi David. > [Changed from v1: Adjust to account for file renaming so patch applies.] > > BPF CO-RE relocations contain offsets to strings buffered in the BTF > string table. These BTF-specific strings are stored in memory in the > CTF auxilliary strtab, which at output time is concatenated onto

Re: [[PATCH V9] 0/7] Support for the CTF and BTF debug formats

2021-06-14 Thread Jose E. Marchesi via Gcc-patches
ping > [Changes from V8: > - Rebased to today's master. > - Adapted to use the write-symbols new infrastructure recently > applied upstream. > - Little change in libiberty to copy .BTF sections over when > LTOing.] > > Hi people! > > Last year we submitted a first patch series introducing su

Re: [[PATCH V9] 3/7] CTF/BTF debug formats

2021-06-21 Thread Jose E. Marchesi via Gcc-patches
> OK otherwise. I think I OKed 1/7 lst time and thus this should now have > all parts OKed by me besides the BPF backend changes. > > Please leave others a day or two to comment (and obviously the BPF > maintainer to ack his part). The BPF parts are OK. (Speaking as the BPF maintainer.) > Than

Re: [[PATCH V9] 1/7] dwarf: add a dwarf2int.h internal interface

2021-06-24 Thread Jose E. Marchesi via Gcc-patches
Hi Jason. > On 5/31/21 12:57 PM, Jose E. Marchesi via Gcc-patches wrote: >> This patch introduces a dwarf2int.h header, to be used by code that >> needs access to the internal DIE structures and their attributes. > > Why not put these bits in dwarf2out.h? We think that it

Re: [[PATCH V9] 1/7] dwarf: add a dwarf2int.h internal interface

2021-06-24 Thread Jose E. Marchesi via Gcc-patches
This patch introduces a dwarf2int.h header, to be used by code that needs access to the internal DIE structures and their attributes. >>> >>> Why not put these bits in dwarf2out.h? >> We think that it makes sense to have a separated interface file for >> the >> implementation of DWARF-b

[COMMITTED V10 1/7] dwarf: externalize some DWARF internals for needs of CTF/BTF

2021-06-28 Thread Jose E. Marchesi via Gcc-patches
types in dwarf2out.h: - dw_get_die_child - dw_get_die_sib - dw_get_die_tag 2021-06-28 Jose E. Marchesi * dwarf2out.c (AT_class): Function is no longer static. (AT_int): Likewise. (AT_unsigned): Likewise. (AT_loc): Likewise. (get_AT): Lik

[COMMITTED V10 2/7] dejagnu: modularize gcc-dg-debug-runtest a bit

2021-06-28 Thread Jose E. Marchesi via Gcc-patches
Move some functionality into a procedure of its own. This is only so that when the patch for ctf comes along, the gcc-dg-debug-runtest procedure looks bit more uniform. gcc/testsuite/ChangeLog: * lib/gcc-dg.exp (gcc-dg-target-supports-debug-format): New procedure. --- gcc/testsuite/lib/g

[COMMITTED V10 0/7] Support for the CTF and BTF debug formats

2021-06-28 Thread Jose E. Marchesi via Gcc-patches
[Changes from V9: All the patches have been OKed, provided a few things were fixed before pushing. These points, raised by Richard Biener and Jason Merrill, have been all addressed as part of the following changes: - No dwarf2int.h header is introduced anymore in the patch series. Instea

[COMMITTED V10 5/7] CTF/BTF documentation

2021-06-28 Thread Jose E. Marchesi via Gcc-patches
This commit documents the new command line options introduced by the CTF and BTF debug formats. 2021-06-28 Indu Bhagat * doc/invoke.texi: Document the CTF and BTF debug info options. --- gcc/doc/invoke.texi | 32 +++- 1 file changed, 31 insertions(+), 1 del

[COMMITTED V10 7/7] libiberty: copy over .BTF section when using LTO

2021-06-28 Thread Jose E. Marchesi via Gcc-patches
libiberty/ChangeLog: * simple-object.c (handle_lto_debug_sections): Copy over .BTF section. --- libiberty/simple-object.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libiberty/simple-object.c b/libiberty/simple-object.c index 909995dd166..facbf94fd09 100644 --- a/libiberty/simp

[COMMITTED V10 6/7] Enable BTF generation in the BPF backend

2021-06-28 Thread Jose E. Marchesi via Gcc-patches
This patch changes the BPF GCC backend in order to use the DWARF debug hooks and therefore enables the user to generate BTF debugging information with -gbtf. Generating BTF is crucial when compiling BPF programs, since the CO-RE (compile-once, run-everwhere) mechanism used by the kernel BPF loader

[COMMITTED V10 4/7] CTF/BTF testsuites

2021-06-28 Thread Jose E. Marchesi via Gcc-patches
This commit adds a new testsuite for the CTF debug format. 2021-06-28 Indu Bhagat David Faust gcc/testsuite/ * lib/gcc-dg.exp (gcc-dg-frontend-supports-ctf): New procedure. (gcc-dg-debug-runtest): Add -gctf support. * gcc.dg/debug/btf/btf-1.c: New test.

<    1   2   3   4   5