diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2018-12-17 13:49:16 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2018-12-17 05:49:16 -0800 |
commit | dc6b21cb4f3fbfbe83d1ca1270ebefb974efa7fa (patch) | |
tree | 3e677886f5fd74a4e30f43e668a35c71ddc3f37f /gcc/combine.c | |
parent | 0418f237b2143b16fd344fedcebafaf73faab571 (diff) | |
download | gcc-dc6b21cb4f3fbfbe83d1ca1270ebefb974efa7fa.zip gcc-dc6b21cb4f3fbfbe83d1ca1270ebefb974efa7fa.tar.gz gcc-dc6b21cb4f3fbfbe83d1ca1270ebefb974efa7fa.tar.bz2 |
DWARF: Don't expand hash table when no insertion is needed
dwarf2out_finish performs:
1. save_macinfo_strings
2. hash table traverse of index_string
3. output_macinfo -> output_macinfo_op
4. output_indirect_strings -> hash table traverse of output_index_string
find_slot_with_hash has
if (insert == INSERT && m_size * 3 <= m_n_elements * 4)
expand ();
which may expand hash table even if no insertion is neeed and change hash
table traverse order. When output_macinfo_op is called, all index strings
have been added to hash table by save_macinfo_strings and we shouldn't
expand index string hash table. Otherwise find_slot_with_hash will expand
hash table when hash table has the right size and hash table traverse of
output_index_string will have a different traverse order from index_string.
PR debug/79342
* dwarf2out.c (find_AT_string_in_table): Add insert argument
defaulting to INSERT and replace INSERT.
(find_AT_string): Likewise.
(output_macinfo_op): Pass NO_INSERT to find_AT_string.
From-SVN: r267202
Diffstat (limited to 'gcc/combine.c')
0 files changed, 0 insertions, 0 deletions