Simplify CFG copying tables
This simplifies the maps between original and new basic blocks and
loops as used for CFG copying. Instead of using a pointer hash
table to allocated mapping entries use a hash_map with int_hash,
removing the indirection and code duplication. We can use -1 and
-2 as empty/deleted values as those are not valid basic-block
indices or loop numbers.
2020-10-21 Richard Biener <rguenther@suse.de>
* cfg.c (htab_bb_copy_original_entry): Remove.
(bb_copy_hasher): Likewise.
(bb_original, bb_copy, loop_copy): Use
hash_map<int_hash<int, -1, -2>, int>.
(original_copy_bb_pool): Remove.
(initialize_original_copy_tables): Adjust.
(reset_original_copy_tables): Likewise.
(free_original_copy_tables): Likewise.
(original_copy_tables_initialized_p): Likewise.
(copy_original_table_clear): Simplify.
(copy_original_table_set): Likewise.
(get_bb_original): Likewise.
(get_bb_copy): Likewise.
(get_loop_copy): Likewise.