[clang-doc] Improve complexity of Index construction
The existing implementation ends up with an O(N^2) algorithm due to
repeated linear scans during index construction. Switching to a
StringMap allows us to reduce this to O(N), since we no longer need to
search the vector.
The `BM_Index_Insertion` benchmark measures the time taken to insert N
unique records into the index.
| Scale (N Items) | Baseline (ns) | Patched (ns) | Speedup | Change |
|----------------:|--------------:|-------------:|--------:|-------:|
| 10 | 9,977 | 11,004 | 0.91x | +10.3% |
| 64 | 69,249 | 69,166 | 1.00x | -0.1% |
| 512 | 1,932,714 | 525,877 | 3.68x | -72.8% |
| 4,096 | 92,411,535 | 4,589,030 | 20.1x | -95.0% |
| 10,000 | 577,384,945 | 12,998,039 | 44.4x | -97.7% |
The patch delivers significant improvements to scalability. At 10,000
[13 lines not shown]
[clang-doc] Add basic benchmarks for library functionality
clang-doc's performance is good, but we suspect it could be better. To
track this with more fidelity, we can add a set of GoogleBenchmarks that
exercise portions of the library. To start we try to track high level
items that we monitor via the TimeTrace functions, and give them their
own micro benchmarks. This should give us more confidence that switching
out data structures or updating algorthms will have a positive
performance impact.
Note that an LLM helped generate portions of the benchmarks and
parameterize them. Most of the internal logic was written by me, but
the LLM was used to handle boilerplate and adaptation to the harness.
17881 loader: file_load() should not allocate loadaddr
Reviewed by: Andrew Stormont <andyjstormont at gmail.com>
Reviewed by: Jason King <jason.brian.king+illumos at gmail.com>
Approved by: Dan McDonald <danmcd at edgecast.io>
[AArch64][MachineOutliner] Clear debug locations on bundled instructions (#175655)
When the machine outliner duplicates instructions, it clears their debug
locations to avoid having the outlined function reference DISubprograms
from the original functions. However, this only cleared the debug
location on the bundle header, not on the individual instructions inside
the bundle.
This caused assertion failures in `LexicalScopes::getOrCreateRegularScope`,
because the bundled instructions still had debug locations pointing to
the original function's.
Fix this by iterating through all instructions in a bundle and clearing
their debug locations as well.
AMDGPU: Try to fix leak in AMDGPULibFunc (#182583)
I don't know why this was trying to do placement do. I guess
this was overriding the unique_ptr, bypassing its destructor.
[NFC][MC] Add LLVM_ABI annotations to createAsmParser functions (#182393)
Following the MCLFIRewriter PR, this adds the `LLVM_ABI` annotations for
related functions that were flagged by the ABI bot.
libnetbsd: import `__CTASSERT(..)` macros
These compile-time assert macros are similar to `Static_assert` on FreeBSD.
These macros are in use in newer versions of `contrib/netbsd-tests`.
Obtained from: https://github.com/NetBSD/src (c26cc77b3a0b26b95a2)
MFC after: 1 week
net-mgmt/victoria-logs: Improve RC script
* Have the RC system perform user switch
* Initialize default variables
* Have the RC system handle start, status, stop
* Set the process title for ps/top
* Remove reload since victoria-logs does not support it
* Use single-hyphen command line options
PR: 293061
Approved by: samm (maintainer)