[DenseMap] Share rehash and grow for relocatable bucket types. NFC (#225018)
DenseMap is heavily instantiated and moveFrom and grow are among the
largest code families. For trivially copy constructible and destructible
bucket types (also satisfied by std::pair), call an out-of-line
`growRelocatable` with size/align/hasher (dictionary passing style).
A pointer key hashed by its value hashes inline, which a null
BucketHasher asks for, sparing a call per entry.
DenseMapInfo<T *>::PointerValueHash names the class declaring it, so an
info that specializes or inherits it to hash the pointee -- Attributor's
InstExclusionSet, VPCSEDenseMapInfo, MachineInstrExpressionTrait --
keeps its own hash. Any other key hashes through a thunk, one per
(KeyT, KeyInfoT) whatever the map's value type.
SmallDenseMap's in-place rehash for remove_if shares the loop through
`rehashRelocatable`. It rehashes once rather than into a temporary map
and back, which can reorder a probe chain that wraps around the table.
[3 lines not shown]
[IR] Memory effects for floating-point operations
Floating-point operations in a strictfp function have side effects,
which are modeled using memory effects in the form of a read-write
access to "inaccessible memory". This helps maintain strictfp semantics
but may hinder optimizations. Floating-point operations may depend on
rounding mode or not - this fact may be used to reorder them in a more
optimal way. Similarly, functions that control floating-point
environment (like `set_rounding`, `set_fpmode` etc.) also have more
specific access than generic read-write. Also, "inaccessible memory" is
used in cases other than FP operation, this results in unnecessary
restrictions.
This change implements two new memory location to use instead of the
access to "inaccessible memory". The "fpcontrol" location is used to
represent access to floating-point control modes, of which only rounding
mode is currently supported. The other location, "fpstatus", represents
access to floating-point exceptions. Together they replace the use of
"inaccessible memory".
[21 lines not shown]
Remove cl::callback from AArch64CodeLayoutOpt and AddressSanitizer (#226757)
cl::callback will be removed to enable migration to TableGen based
representation
LLM-aided
[libc++][AIX] Add system library path via blibpath for lldb (#223837)
On AIX some tools we use for testing libc++, like lldb, are linked
against the system libc++, which has additional members (e.g
`shr2_64.o`) that the newly built libc++.a doesn't have. But the current
test harness set the `LIBPATH` to point at the newly built libc++, which
can load break these tools.
This change removes the `LIBPATH` and instead sets the `blibpath`
(equivalent to rpath on other systems), which helps lldb find the system
libc++.a, while still running the tests against the libc++ build under
test.
[AMDGPU] Remove remaining BaseInfo duplicates of TargetParser APIs
Use TargetParser for LDS sizes and architectural VGPR limits, preserving
the distinction between VGPRs and AGPRs on unified-register-file targets.
Remove the TargetID factory wrapper and redundant type and SGPR constant
aliases, updating the remaining callers.
Cover physical LDS allocation boundaries across GPU generations and
full/half-SIMD modes in the assembler tests.
Change-Id: I9fa8447a69de3649792809424d2b0251dae0155b
[AMDGPU] Move dynamic VGPR addressability to TargetParser
Extend getAddressableNumVGPRs with a dynamic block size and share the
eight-block limit through TargetParser. Remove the BaseInfo counterpart
and update its subtarget, occupancy, scheduler, and diagnostic callers.
Cover dynamic addressability, static limits, and unified register files.
Change-Id: Ie4dae7ba34cce8e8ea50e24f7075242a8a045505
[AMDGPU] Move dynamic VGPR allocation granules to TargetParser
Extend getVGPRAllocGranule with a dynamic block size and preserve the
fixed gfx90a-family granule. Remove the BaseInfo counterpart and migrate
its occupancy, scheduler, frame lowering, and register-block callers.
Cover dynamic allocation, static mode, and gfx90a-family exceptions.
Change-Id: Id441ddcea2d7a33121ddb4139af4c5f52f273ff3
[AMDGPU] Move getVGPREncodingGranule to TargetParser
Add GPUKind and SubArch encoding-granule queries with an explicit wave size.
Remove the BaseInfo counterpart and update codegen, assembler, and
disassembler callers, preserving kernel descriptor wave-size overrides.
Cover encoding granules across GPU generations and both wave sizes.
Change-Id: I1982fef776e5a0b7c613c274e544ba3e3f86f136
lang/ghc: use getexecpath(3) for executablePath on OpenBSD
getexecpath(3) is new in OpenBSD 8.0. Without it ghc-internal falls through
to the argv[0] fallback and System.Environment.executablePath is Nothing.
Also let ghc-boot use base's executablePath, choosing at run time so the port
still builds with a bootstrap compiler whose base predates getexecpath(3),
and mark openbsd as query-capable in the executablePath test.
Bump REVISION for the getexecpath change
System.Environment.executablePath goes from Nothing to a working query, and
getExecutablePath from argv[0] to a canonicalized absolute path, so the
package behaves differently and needs to be distinguishable.
OK kili@