aboutsummaryrefslogtreecommitdiff
path: root/offload/test/ompt/veccopy_data.c
diff options
context:
space:
mode:
authorAugusto Noronha <anoronha@apple.com>2026-02-23 11:41:13 -0800
committerGitHub <noreply@github.com>2026-02-23 11:41:13 -0800
commitb3f3b57aed375b53d1801d532333bd66417b11ef (patch)
tree8f78fa540d4f46637fad8b32cbdeffb9116ad580 /offload/test/ompt/veccopy_data.c
parent5edbaf9c82983eb8be0ace107ef8399fb6eac938 (diff)
downloadllvm-main.zip
llvm-main.tar.gz
llvm-main.tar.bz2
[lldb] Speed up SymbolContextList::AppendIfUnique (#181952)HEADmain
d7fb086668dff68 changed some calls from SymbolContextList::Append to SymbolContextList::AppendIfUnique. This has unfortunately caused a huge slow down in operations involving a large amount of symbol contexts (for example, trying to autocomplete from an empty input "b <TAB>" will add every function to the list), since AppendIfUnique scans the entire symbol context list. Speed this up by adding a hash set to quickly answer whether a symbol context is on the list or not. This takes the time from running "b <TAB>" when debugging yaml2obj on my machine from 600 seconds down to 13, which is about the same as before d7fb086668dff68. Note that AppendIfUnique has a logic error, which has been present since its introduction. This has to do with the behavior controlled by "merge_symbol_into_function", which will try to merge symbols with symbol context containing the equivalent function to that symbol. The previous patch tried to correct this by adding CompareConsideringPossiblyNullSymbol(), which is not quite correct. With CompareConsideringPossiblyNullSymbol(), if symbols are added in this order: - Symbol context without symbol. - Equivalent symbol context with symbol. The list will have only one symbol context WITHOUT the symbol. If we stop using CompareConsideringPossiblyNullSymbol() and instead go back to the == operator which d7fb086668dff68 introduced, with symbols added in this order, the following will happen: - Symbol context without symbol. - Equivalent symbol context with symbol. - The bare symbol, with "merge_symbol_into_function = true", the list will have the same symbol twice. This patch does not attempt to solve this, and instead focuses on the performance issue d7fb086668dff68 introduced. rdar://170477680
Diffstat (limited to 'offload/test/ompt/veccopy_data.c')
0 files changed, 0 insertions, 0 deletions