On 8/17/2022 5:11 AM, Richard Biener via Gcc-patches wrote:
The following started as making the backward threader m_imports
use the tree representation. Since that interfaces to a list
representation bitmap in ranger by copying rewriting the tree
to list to perform the copy is inefficient in that it loses
balancing. The following adds bitmap_copy_tree_to_list and
integrates it with the generic bitmap_copy routine. For symmetry
I also added list to tree copy, relying on auto-balancing, and
tree to tree copy which I didn't optimize to preserve the
source balancing but instead use bitmap_copy_tree_to_list and
have the result auto-balanced again.
I've only exercised the tree to list path and I won't actually
end up using it but it's at least worth posting.
Bootstrapped and tested on x86_64-unknown-linux-gnu.
Worth pushing?
* bitmap.h: Document set_copy aka bitmap_copy as usable
for tree representation.
* bitmap.cc (bitmap_copy_tree_to_list): New helper.
(bitmap_copy): Support copying all bitmap representation
combinations.
I'd lean against unless you expect to be using it. But it's not a
strongly held opinion.
jeff