diff options
author | Nathan Sidwell <nathan@acm.org> | 2021-03-03 11:22:56 -0800 |
---|---|---|
committer | Nathan Sidwell <nathan@acm.org> | 2021-03-03 11:32:32 -0800 |
commit | 499193a692efa33c9b2fe3ad8da0f4d5e5fd0e0c (patch) | |
tree | 646724dddc6814d966646641b8a6caf69ad9ea6c /gcc/tree-pretty-print.c | |
parent | d6177870dd2696501e3b8d3930fd5549d4acaeae (diff) | |
download | gcc-499193a692efa33c9b2fe3ad8da0f4d5e5fd0e0c.zip gcc-499193a692efa33c9b2fe3ad8da0f4d5e5fd0e0c.tar.gz gcc-499193a692efa33c9b2fe3ad8da0f4d5e5fd0e0c.tar.bz2 |
c++: Defer specialization registration [PR 99170]
This defers inserting specializations into the specialization table,
until we have completed their streaming. When streaming a cluster we
ensure that all imports are populated before any of the cluster, so
they need no visibility of other specializations. Further within the
same import, we've already partitioned the graph, so no earlier
cluster can be refering to a specialization in a later cluster.
Inserting them early causes problems when other specializations of the
same template are inserted. (This doesn't fix 99170, but is a
necessary change for that PR).
Earlier on, I had less deferred processing, but it has become clearer
that deferred worklists are the right way of handling a few things.
This patch highlights a fixme, in that we're streaming a key twice,
and need not do that, but I wanted to get correctness first. Besides
the second streaming will end up being a back reference, which is of
course much cheaper than a by-value stream.
PR c++/99170
gcc/cp/
* module.cc (trees_out::decl_value): Stream specialization keys
after decl.
(trees_in::decl_value): Stream them back and insert after
completing the decl.
(trees_out::key_mergeable): Drop some streaming here ...
(trees_in::key_mergeable): ... and here. Don't insert into
specialization tables.
Diffstat (limited to 'gcc/tree-pretty-print.c')
0 files changed, 0 insertions, 0 deletions