[BOLT] Add tests for pre-aggregated parsing (#193843)
Extends e2e coverage of pre-aggregated profile parsing to match the
unit-test coverage added in #192390:
- R (Return) records, including the branch=0 fallback path that
rewrites to the FT_EXTERNAL_RETURN sentinel.
- r (FT_EXTERNAL_RETURN) records.
- B and T records using the negative -1 hex form (#192391),
which is parsed as the BR_ONLY/FT_ONLY sentinel.
- Error paths: invalid record type letter and malformed hex address
(perf2bolt is expected to exit non-zero with a parser error).
The two error-path inputs are tiny raw files under Inputs/ since they
contain intentionally malformed records that link_fdata doesn't process.
Test Plan:
added bolt/test/X86/pre-aggregated-records.s
[libc][math] Qualify fdim funtions to constexpr (#194137)
Signed-off-by: udaykiriti <udaykiriti624 at gmail.com>
Co-authored-by: Muhammad Bassiouni <60100307+bassiounix at users.noreply.github.com>
[lldb][test] Use assertIn in TestThreadBacktraceRepeat.py (NFC) (#194193)
I broke this test locally, and fixed the assets to produce more useful
output upon failure.
[BOLT] Support negative hex in pre-aggregated profile (#192391)
Handle signed values in parseHexField by falling back to int64_t parsing
when uint64_t fails. This allows pre-aggregated profile tools to use -1
for BR_ONLY, -2 for FT_EXTERNAL_ORIGIN, -3 for FT_EXTERNAL_RETURN.
Guard the external address reset loop in parseAggregatedLBREntry to
preserve sentinel values (offsets >= FT_EXTERNAL_RETURN).
Add tests for -1/-2/-3 in parseHexField and T entries with -1,
ffffffffffffffff, and buildid:-1 as BR_ONLY.
[BOLT] Add unit tests for pre-aggregated profile parsing (#192390)
Add PreAggregatedTestHelper fixture with friend access to DataAggregator
internals. Add tests for parseHexField and all pre-aggregated entry
types (B, F, f, r, T, R).
[libc][math] Refactor fmaximum_mag_num family to header-only (#182169)
Refactors the fmaximum_mag_num math family to be header-only.
Closes https://github.com/llvm/llvm-project/issues/182168
Target Functions:
- fmaximum_mag_num
- fmaximum_mag_numbf16
- fmaximum_mag_numf
---------
Co-authored-by: Muhammad Bassiouni <60100307+bassiounix at users.noreply.github.com>
[libc][math] Refactor fdiv family to header-only (#182192)
Refactors the fdiv math family to be header-only.
Closes https://github.com/llvm/llvm-project/issues/182191
Target Functions:
- fdiv
- fdivf128
- fdivl
---------
Co-authored-by: Muhammad Bassiouni <60100307+bassiounix at users.noreply.github.com>
[DenseMap] Resolves asan + msvc build syntax errors (#193695)
The problem was introduced by #183457 as an asan workaround for clang
builds to silence false positices, so the fix here just enables the
workaround for clang builds.
Fixes #189323
Signed-off-by: Davide Grohmann <davide.grohmann at arm.com>
[VPlan] Fix assert in finding WideCanIV (NFC) (#193269)
addActiveLaneMask asserts that the return value of a find_if is
contextully convertible to true, when finding a WideCanonicalIV recipe:
what it should really be checking that the iterator is not the end
iterator. Fix this assert by introducing and using a variant of
vputils::findUserOf.
[Github] Drop LLVM 21 installation from libc Dockerfile (#194178)
The compiler version was bumped in
8abce0a63c10124aa26a070ead80a68f705c95f9, so we no longer need to
include this. We should probably just hash pin the version in future
workflows for future toolchain upgrades.
[clang] Make serenity.cpp more independent of the host (#193981)
Tests matching crt files previously relied on the host system not using
the same file paths as Serenity. This breaks on AIX, as both systems use
`/usr/lib/crt0.o`.
Redirect most tests to an empty sysroot so they match only on the
filename and remain independent of the host system. Also add a test that
verifies crt files can be found in a normal sysroot.
[flang][OpenMP] Replace llvmOmpClause with llvm::omp::Clause (#194162)
Both types, llvmOmpClause (alias of const llvm::omp::Clause) and
llvm::omp::Clause are in use, let's just stick with one.
[NewPM] Adds a port for AArch64SIMDInstrOpt (#188177)
Adds a port for AArch64SIMDInstrOpt
- Refactored to extract base logic as Impl.
- **Note**: Moved theI nstruction Replacement Table and cross-function
cached maps as members of the Impl class.
- **Note**: Updated `InstReplInfo::RC` to be a pointer rather than a
stack object, because we're putting it into MRI
[here](https://github.com/llvm/llvm-project/blob/704c60fe9110256d2698d8e56b8c44ec5d1e733f/llvm/lib/Target/AArch64/AArch64SIMDInstrOpt.cpp#L532).
- Renamed existing pass with "Legacy" suffix and updated references
- Added NewPM pass AArch64SIMDInstrOptPass
- Updated pass type to `aarch64-simd-instr-opt` (prev:
`aarch64-simdinstr-opt`)
No existing `.mir` tests to update.