Files
clang-p2996/llvm/lib/Support/YAMLTraits.cpp
Amir Ayupov ec129c28af [YAML][NFC] Use BumpPtrAllocator instead of unique_ptrs
Avoid both memory leaks and expensive dynamic allocations by using
SpecificBumpPtrAllocator for HNode types. It's expected they're not deallocated
until the `Input` class is destroyed, so deallocating all at once works well in
this case.

Reduces YAML profile pre-processing time in BOLT from
>   11.2067 (  3.2%)   1.6487 (  7.3%)  12.8554 (  3.5%)  12.8635 (  5.6%)  pre-process profile data
to
>   10.6613 (  3.1%)   1.6489 (  6.7%)  12.3102 (  3.3%)  12.3134 (  5.3%)  pre-process profile data

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D155006
2023-08-09 16:42:25 -07:00

30 KiB