[libclc] Only check the triple architecture for libclc (#194149)
Summary:
Previously, `nvptx64--` would reject `nvptx64-unknown-unknown`. Two
options, either normalize all the triples in CMake, or just check the
architecture. I went with the former because it makes it easier for
people to pass different values.
[compiler-rt] Use asm .set only for Hexagon (#194160)
Two incompatible assembler syntaxes exist for symbol assignment:
```
sym = val -- accepted by most GNU assembler targets; rejected by
Hexagon, which interprets it as a mnemonic
.set sym, val -- accepted by Hexagon; rejected by Alpha, which
reserves .set for assembler mode flags
```
Switch all to `sym = val`, and opt out Hexagon to `.set sym`.
Fixes: dbb03f8f606e ("[compiler-rt] Replace assignment w/.set directive
(#107667)")
---------
Co-authored-by: Vitaly Buka <vitalybuka at google.com>
[MC] Drop MCTargetOptions parameter from MCTargetAsmParser (#194120)
Since #180464, MCAsmInfo holds the canonical MCTargetOptions.
The MCTargetAsmParser::MCOptions member is a redundant by-value copy,
which may have inconsistent values (llvm-exegesis passes a temporary
MCTargetOptions(), but this probably doesn't matter in practice; other
in-tree uses are correct).
Remove the field in favor of getParser().getContext().getTargetOptions,
and remove the MCTargetOptions parameter from the base ctor, all
subclass ctors, Target::createMCAsmParser, MCAsmParserCtorTy, and
RegisterMCAsmParser.
[MC] Always lower .fill to MCFillFragment (#194164)
Constant-count, constant-pattern .fill expands inline into the current
fragment via emitIntValue per byte, wasting both memory and time (a
redundant copy at MCAssembler.cpp). #50974 reports a 4s compile dropping
to 0.6s when the loop is removed.
Drop the inline path so .fill always becomes MCFillFragment.
This cannot be done before commit 507efbcce03d (2023) allowed
label differences to be separated by a MCFillFragment.
In directive_fill.s, the parse time warning is now diagnosed by
MCAssembler.
Reland "[libc][math] Refactor fmaximum_mag_num family to header-only" (#194194)
Reland #182169
---------
Co-authored-by: Muhammad Bassiouni <60100307+bassiounix at users.noreply.github.com>
[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.