diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2015-04-04 14:49:42 +0300 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2015-04-09 19:10:25 +0300 |
commit | 3439c466273378021821473d3fc84990e089ae34 (patch) | |
tree | 33b4a42582af2d5eafa0052d8192b6c91167c027 /libdecnumber | |
parent | 071aa5c98a31c966f5fbfc573fcee61350fd1936 (diff) | |
download | gdb-3439c466273378021821473d3fc84990e089ae34.zip gdb-3439c466273378021821473d3fc84990e089ae34.tar.gz gdb-3439c466273378021821473d3fc84990e089ae34.tar.bz2 |
xtensa: optimize find_removed_literal
find_removed_literal uses linear search to find removed literal by its
VMA. The list of literals is fixed at that point, build an ordered index
array and use binary search instead.
Original profile:
% time self children called name
-----------------------------------------
56.72 0.00 297578/669392 translate_reloc
70.86 0.00 371814/669392 relax_section
67.9 127.58 0.00 669392 find_removed_literal
-----------------------------------------
Same data, after optimization:
% time self children called name
-----------------------------------------
0.00 0.00 297578/669392 translate_reloc
0.00 0.00 371814/669392 relax_section
0.0 0.00 0.00 669392 find_removed_literal
0.00 0.00 23838/23838 map_removed_literal
-----------------------------------------
2015-04-03 Max Filippov <jcmvbkbc@gmail.com>
bfd/
* elf32-xtensa.c (removed_literal_map_entry): new typedef.
(removed_literal_map_entry_struct): new structure.
(removed_literal_list_struct): add new fields: n_map and map.
(map_removed_literal, removed_literal_compare): new functions.
(find_removed_literal): build index array for literals ordered
by VMA, use binary search to find removed literal.
Diffstat (limited to 'libdecnumber')
0 files changed, 0 insertions, 0 deletions