David Faust 36774cec1f ctf: use pointers instead of IDs internally
This patch replaces all inter-type references in the ctfc internal data
structures with pointers, rather than the references-by-ID which were
used previously.

A couple of small updates in the BPF backend are included to make it
compatible with the change.

This change is only to the in-memory representation of various CTF
structures to make them easier to work with in various cases.  It is
outwardly transparent; there is no change in emitted CTF.

gcc/
	* btfout.cc (BTF_VOID_TYPEID, BTF_INIT_TYPEID): Move defines to
	include/btf.h.
	(btf_dvd_emit_preprocess_cb, btf_emit_preprocess)
	(btf_dmd_representable_bitfield_p, btf_asm_array, btf_asm_varent)
	(btf_asm_sou_member, btf_asm_func_arg, btf_init_postprocess):
	Adapt to structural changes in ctf_* structs.
	* ctfc.h (struct ctf_dtdef): Add forward declaration.
	(ctf_dtdef_t, ctf_dtdef_ref): Move typedefs earlier.
	(struct ctf_arinfo, struct ctf_funcinfo, struct ctf_sliceinfo)
	(struct ctf_itype, struct ctf_dmdef, struct ctf_func_arg)
	(struct ctf_dvdef): Use pointers instead of type IDs for
	references to other types and use typedefs where appropriate.
	(struct ctf_dtdef): Add ref_type member.
	(ctf_type_exists): Use pointer instead of type ID.
	(ctf_add_reftype, ctf_add_enum, ctf_add_slice, ctf_add_float)
	(ctf_add_integer, ctf_add_unknown, ctf_add_pointer)
	(ctf_add_array, ctf_add_forward, ctf_add_typedef)
	(ctf_add_function, ctf_add_sou, ctf_add_enumerator)
	(ctf_add_variable): Likewise. Return pointer instead of ID.
	(ctf_lookup_tree_type): Return pointer to type instead of ID.
	* ctfc.cc: Analogous changes.
	* ctfout.cc (ctf_asm_type, ctf_asm_slice, ctf_asm_varent)
	(ctf_asm_sou_lmember, ctf_asm_sou_member, ctf_asm_func_arg)
	(output_ctf_objt_info): Adapt to changes.
	* dwarf2ctf.cc (gen_ctf_type, gen_ctf_void_type)
	(gen_ctf_unknown_type, gen_ctf_base_type, gen_ctf_pointer_type)
	(gen_ctf_subrange_type, gen_ctf_array_type, gen_ctf_typedef)
	(gen_ctf_modifier_type, gen_ctf_sou_type, gen_ctf_function_type)
	(gen_ctf_enumeration_type, gen_ctf_variable, gen_ctf_function)
	(gen_ctf_type, ctf_do_die): Likewise.
	* config/bpf/btfext-out.cc (struct btf_ext_core_reloc): Use
	pointer instead of type ID.
	(bpf_core_reloc_add, bpf_core_get_sou_member_index)
	(output_btfext_core_sections): Adapt to above changes.
	* config/bpf/core-builtins.cc (process_type): Likewise.

include/
	* btf.h (BTF_VOID_TYPEID, BTF_INIT_TYPEID): Move defines here,
	from gcc/btfout.cc.
2024-07-02 10:16:12 -07:00
2024-05-09 10:58:01 +00:00
2024-04-17 00:18:45 +00:00
2024-06-06 00:16:43 +00:00
2024-06-28 00:18:04 +00:00
2024-04-16 00:18:06 +00:00
2024-01-03 12:19:35 +01:00
2024-06-26 00:17:38 +00:00
2024-06-17 00:16:32 +00:00
2024-03-17 00:17:21 +00:00
2024-06-22 00:18:44 +00:00
2024-04-03 00:17:29 +00:00
2024-07-02 00:17:36 +00:00
2024-06-15 00:16:29 +00:00
2024-06-07 00:16:38 +00:00
2024-05-30 00:16:44 +00:00
2024-04-29 11:39:58 -07:00
2024-07-02 00:17:36 +00:00
2024-02-21 13:51:26 +01:00
2024-04-03 00:17:29 +00:00
2024-06-01 00:17:20 +00:00
2024-04-03 00:17:29 +00:00
2024-06-01 00:17:20 +00:00
2024-05-09 10:58:01 +00:00
2024-02-17 00:17:08 +00:00
2024-05-09 10:58:01 +00:00
2024-06-29 00:17:22 +00:00
2024-06-01 00:17:20 +00:00
2024-01-03 12:19:35 +01:00
2024-04-27 00:18:05 +00:00
2023-10-23 00:16:43 +00:00
2023-11-14 00:47:11 +01:00
2024-07-02 00:17:36 +00:00

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.
Description
No description provided
Readme 1.5 GiB
Languages
C++ 30.7%
C 30%
Ada 14.5%
D 6.1%
Go 5.7%
Other 12.5%