From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2F1353857683; Mon, 31 Oct 2022 20:20:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2F1353857683 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667247658; bh=n0I2P6zfdogTU/ArGHuxLANLoX1b5ANnMrlYgwLv34M=; h=From:To:Subject:Date:From; b=VTzxHbNjcvzORgNtYgDfctqTumYi7KGxXSpw7kiwkCB4B9HUYN6oBXgltTQg96tzL OQxPovCFo6BmPuEyKeMNEO3uYv78LmPLQeHNBjX0C15PhRgTlk67AVLqbCpysGeoUU P0uco21iXxOnQO3adN7dEVxdju0q9oVi+rrQfX3M= From: "david.faust at oracle dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/107479] New: bpf: add __builtin_btf_type_id Date: Mon, 31 Oct 2022 20:20:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: david.faust at oracle dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107479 Bug ID: 107479 Summary: bpf: add __builtin_btf_type_id Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: david.faust at oracle dot com Target Milestone: --- LLVM supports a BPF builtin: __builtin_btf_type_id (param, flag) which returns the BTF type id of 'param' to the program, and records a BPF CO-RE relocation according to 'flag'. We should support the same functionality in GCC.=20 These are the relevant changes in LLVM and clang: https://reviews.llvm.org/D74572 https://reviews.llvm.org/D74668=