-
- Downloads
c++: Support target-specific nodes when streaming modules [PR111224]
Some targets make use of POLY_INT_CSTs and other custom builtin types, which currently violate some assumptions when streaming. This patch adds support for them, such as types like Aarch64 __fp16, PowerPC __ibm128, and vector types thereof. This patch doesn't provide "full" support of AArch64 SVE, however, since for that we would need to support 'target' nodes (tracked in PR108080). Adding the new builtin types means that on Aarch64 we now have 217 global trees created on initialisation (up from 191), so this patch also slightly bumps the initial size of the fixed_trees allocation to 250. PR c++/98645 PR c++/98688 PR c++/111224 gcc/cp/ChangeLog: * module.cc (enum tree_tag): Add new tag for builtin types. (trees_out::start): POLY_INT_CSTs can be emitted. (trees_in::start): Likewise. (trees_out::core_vals): Stream POLY_INT_CSTs. (trees_in::core_vals): Likewise. (trees_out::type_node): Handle vectors with multiple coeffs. (trees_in::tree_node): Likewise. (init_modules): Register target-specific builtin types. Bump initial capacity slightly. gcc/testsuite/ChangeLog: * g++.dg/modules/target-aarch64-1_a.C: New test. * g++.dg/modules/target-aarch64-1_b.C: New test. * g++.dg/modules/target-powerpc-1_a.C: New test. * g++.dg/modules/target-powerpc-1_b.C: New test. * g++.dg/modules/target-powerpc-2_a.C: New test. * g++.dg/modules/target-powerpc-2_b.C: New test. Signed-off-by:Nathaniel Shead <nathanieloshead@gmail.com> Reviewed-by:
Patrick Palka <ppalka@redhat.com>
Showing
- gcc/cp/module.cc 22 additions, 10 deletionsgcc/cp/module.cc
- gcc/testsuite/g++.dg/modules/target-aarch64-1_a.C 17 additions, 0 deletionsgcc/testsuite/g++.dg/modules/target-aarch64-1_a.C
- gcc/testsuite/g++.dg/modules/target-aarch64-1_b.C 13 additions, 0 deletionsgcc/testsuite/g++.dg/modules/target-aarch64-1_b.C
- gcc/testsuite/g++.dg/modules/target-powerpc-1_a.C 7 additions, 0 deletionsgcc/testsuite/g++.dg/modules/target-powerpc-1_a.C
- gcc/testsuite/g++.dg/modules/target-powerpc-1_b.C 10 additions, 0 deletionsgcc/testsuite/g++.dg/modules/target-powerpc-1_b.C
- gcc/testsuite/g++.dg/modules/target-powerpc-2_a.C 20 additions, 0 deletionsgcc/testsuite/g++.dg/modules/target-powerpc-2_a.C
- gcc/testsuite/g++.dg/modules/target-powerpc-2_b.C 12 additions, 0 deletionsgcc/testsuite/g++.dg/modules/target-powerpc-2_b.C
Loading
Please register or sign in to comment