aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-pass.h
diff options
context:
space:
mode:
authorDavid Faust <david.faust@oracle.com>2024-05-30 14:06:27 -0700
committerDavid Faust <david.faust@oracle.com>2024-07-02 10:16:12 -0700
commitd3f586ec50d3d502e0727e8307ae76770fdaee79 (patch)
tree090ef7cc5f395d3eb5245a6f437ae5aa533da282 /gcc/tree-pass.h
parentd04c5537f5ae4a3acd3f5135347d7e2d8c218811 (diff)
downloadgcc-d3f586ec50d3d502e0727e8307ae76770fdaee79.zip
gcc-d3f586ec50d3d502e0727e8307ae76770fdaee79.tar.gz
gcc-d3f586ec50d3d502e0727e8307ae76770fdaee79.tar.bz2
ctf, btf: restructure CTF/BTF emission
This commit makes some structural changes to the CTF/BTF debug info emission. In particular: a) CTF is new always fully generated and emitted before any BTF-related procedures are run. This means that BTF-related functions can change, even irreversibly, the shared in-memory representation used by the two formats without issue. b) BTF generation has fewer entry points, and is cleanly divided into early_finish and finish. c) BTF is now always emitted at finish (called from dwarf2out_finish), for all targets in non-LTO builds, rather than being emitted at early_finish for targets other than BPF CO-RE. In LTO builds, BTF is emitted at early_finish as before. Note that this change alone does not alter the contents of BTF at all, regardless of whether it would have previously been emitted at early_finish or finish, because the calculation of the BTF to be emitted is not moved by this patch, only the write-out. The changes are transparent to both CTF and BTF emission. gcc/ * btfout.cc (btf_init_postprocess): Rename to... (btf_early_finish): ...this. (btf_output): Rename to... (btf_finish): ...this. * ctfc.h: Analogous changes. * dwarf2ctf.cc (ctf_debug_early_finish): Conditionally call btf_early_finish, or ctf_finalize as appropriate. Emit BTF here for LTO builds. (ctf_debug_finish): Always call btf_finish here if generating BTF info in non-LTO builds. (ctf_debug_finalize, ctf_debug_init_postprocess): Delete. * dwarf2out.cc (dwarf2out_early_finish): Remove call to ctf_debug_init_postprocess.
Diffstat (limited to 'gcc/tree-pass.h')
0 files changed, 0 insertions, 0 deletions