[Instrumentor] Add unreachable support; unreachable stack trace printing
Allow to instrument unreachable and provide a use case to identify an
unreachable was reached.
Require explicit yield in iterator op
Remove the implicit terminator trait from omp.iterator so iterator
modifiers must explicitly yield the value used to form the iterated list.
Add and update verfier and test accordingly.
Fix failure for clang/test/Frontend/rewrite-includes-bom.c for zOS (#197501)
This test is failing on zOS due to the lowercase HEX characters in the BOM. This PR changes the test to do a case-insensitive search.
Remove utf-8 characters from clang/test/CXX/basic/basic.link/p19.cppm (#197500)
This PR fixes the failure for `FAIL: Clang :: CXX/basic/basic.link/p19.cppm` on zOS.
Simplify map iterator clause assembly
- Split MLIR map syntax into separate map_entries(...) and map_iterated(...),
removing the custom MapEntryList parser/printer.
- Moved omp.target map_iterated out of TargetOpRegion
- it now prints before the target region instead of as map_iterated_entries(...) after the region.
- Renamed LLVMIR TODO helper to clause-style checkMap.
- Added DeclareMapperInfoOp builder from DeclareMapperInfoOperands
and updated Flang call sites so they do not need to spell out newly
added operands..
[HLSL] Adding matrix support for asfloat, asint and asuint casting functions. (#197039)
This patch adds matrix support for as uint, asint and asfloat casting
functions. Those are really similar and small, that is why they were
packed into the same patch.
Fix: #184471, #184472 and #184474
---------
Co-authored-by: Joao Saffran <jderezende at microsoft.com>
[HLSL] Add matrix support to atan2 (#194984)
This patch updates atan2 hlsl intrinsic overloads to support matrix
types.
Fix: https://github.com/llvm/llvm-project/issues/184476
---------
Co-authored-by: Deric C. <cheung.deric at gmail.com>
Co-authored-by: Farzon Lotfi <farzonl at gmail.com>
[ADT] Hash pointers with densemap::detail::mix (#197390)
The current DenseMapInfo<T*>::getHashValue is very weak.
Distinct bump-allocated pointers — the dominant key shape in clang and
the LLVM IR layer — share their high bits and differ only in low bits
that this hash collapses to a short range of buckets.
Quadratic probing has been masking the weakness because its probe
sequence spreads collisions out, but the latent quality issue still
hurts at high load factor and shows up directly as primary clustering
once probing becomes linear.
DeclContext::lookupImpl over a StoredDeclsMap keyed on DeclarationName
is the hottest example: the underlying IdentifierInfo* comes from
clang's bump allocator, so consecutive identifiers land on consecutive
low-bit hash values.
Switch to densemap::detail::mix, the splitmix64 mixer already defined
above and already used by the >32-bit unsigned integral specialization.
[6 lines not shown]
Fix based on feedback
- Split MLIR map syntax into separate map_entries(...) and map_iterated(...), removing the custom MapEntryList parser/printer.
- Moved omp.target map_iterated out of TargetOpRegion; it now prints before the target region instead of as map_iterated_entries(...) after the region.
- Renamed LLVMIR TODO helper to clause-style checkMap.
- Added DeclareMapperInfoOp builder from DeclareMapperInfoOperands and updated Flang call sites.
where: Installation becomes introductory paragraph
This page is really long, and has no introductory paragraph.
Instead of hiding the installation section at the bottom, simplify
it into an introductory paragraph.
Reviewed by: cperciva
Differential Revision: https://reviews.freebsd.org/D56956
[IR] Use isa<ConstantPointerNull> instead of isNullValue for pointer null checks (NFC)
Replace isNullValue() with isa<ConstantPointerNull>() in core IR files
where the check is semantically testing for a null pointer rather than a
generic zero value. This makes the intent explicit and prepares for
future non-zero null pointer support.
Affected files: Constants.h, Constants.cpp, AsmWriter.cpp, Verifier.cpp.
[clang] Add Tom Honermann as SYCL maintainer (#197351)
Tom Honermann has become a key contributor to SYCL support in Clang,
delivering high-quality front-end improvements.
He is also an active reviewer, providing thorough feedback
and helping maintain code quality across the SYCL implementation.
Updated my account ids: added Discord and Discourse and removed
Phabricator.
Fix LOCAL_PEERCRED in 32-bit compat mode
Previously the cr_pid field would be incorrectly copied to userland, due
to a size mismatch between the structure as defined in 32-bit vs 64-bit
builds. Fix it by converting the structure before copying it to
userland.
PR: 294833
Sponsored by: ConnectWise
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D56675
(cherry picked from commit 1d24638d3e8875e4b99a4b5e39f4241e37221b3d)
[lldb][NFC] Use DenseMap in ObjCLanguageRuntime
This is a multimap of Hash -> ObjCISA (lldb::addr_t), and it shows up
cpu traces of swift applications. This commit replaces
`std::multimap<hash, addr_t>` with `DenseMap<hash, SmallVector<addr_t, 3>>`.
This data structure was chosen because of the following experiment. When
evaluating a frame variable command for a SwiftUI variable, this object
gets populated with ~186,000 entries:
* over a thousand of them had 2 hash collisions.
* 300 of them had 3 hash collisions.
* 21 of them had 4 hash collisions.
* 1 of them had 5 hash collisions.
On a release build (no asserts), this patch brought down the CPU cycles
measured for that command from 487M cycles to 389M cycles.