[Clang] Correctly handle UBSan libraries for the GPU (#188290)
Summary:
This PR adds the necessary clang driver plumbing to forward UBSan
arguments on the GPU targets. These are currently only forwarded via the
offloading languages if the user has the relevant library installed.
Enables the support in https://github.com/llvm/llvm-project/pull/188289
[AMDGPU] Add clang builtin for generic AMDGPU shuffle (#185302)
Summary:
AMDGPU introduced a high level intrinsic for shuffles. The main
advantage of this over the ds_bpermute path is that it is correctly
lowered for w32 / w64 and doesn't require the four byte offset. This PR
adds '__builtin_amdgcn_wave_shuffle' to access it.
[NFC][AMDGPU] Move PhiLoweringHelper and related types into AMDGPU namespace (#192586)
Move Incoming, createLaneMaskReg, and PhiLoweringHelper into
llvm::AMDGPU namespace to avoid symbol collisions and improve
target-specific isolation. No functional change.
[lldb] Implement delayed breakpoints
This patch changes the Process class so that it delays *physically*
enabling/disabling breakpoints until the process is about to
resume/detach/be destroyed, potentially reducing the packets transmitted
by batching all breakpoints together.
Most classes only need to know whether a breakpoint is "logically"
enabled, as opposed to "physically" enabled (i.e. the remote server has
actually enabled the breakpoint). However, lower level classes like
derived Process classes, or StopInfo may actually need to know whether
the breakpoint was physically enabled. As such, this commit also adds a
"IsPhysicallyEnabled" API.
https://github.com/llvm/llvm-project/pull/192910
[lldb][NFC] Move BreakpointSite::IsEnabled/SetEnabled into Process
The Process class is the one responsible for managing the state of a
BreakpointSite inside the process. As such, it should be the one
answering questions about the state of the site.
https://github.com/llvm/llvm-project/pull/192910
[libc++][NFC] Remove `pointer_traits<__wrap_iter>` partial specialization (#178864)
Since commit b5270ba20dc3d84df9d880be11d57667f04c6c28, it was decided
that `__wrap_iter` wasn't intended to perform runtime check, so it's
`operator->` won't check whether the iterator is deferenceable. (See
https://llvm.org/PR178521.)
Currently, `pointer_traits<__wrap_iter>` partial specialization is
provided and makes `__to_address`/`to_address` call the member
`to_address` instead of `operator->`. But given these operations are
equivalent and `__wrap_iter::operator->` is improbable to have
behavioral change in the future, perhaps it would be better to remove
the partial specialization.
The changes have no negative impact on compile time, and sometimes have
a negligible positive impact.
Drive-by: Also remove inclusion of `<__memory/addressof.h>` from
`<__iterator/wrap_iter.h>` as we don't need to call `addressof` or its
equivalent internal version.
[IR] LangRef: document behavior of double-lifetime.start (#184296)
lifetime.start after lifetime.start is defined to reset the contents of the
allocation to uninitialized memory.
[lldb][NFC] Move BreakpointSite::IsEnabled/SetEnabled into Process
The Process class is the one responsible for managing the state of a
BreakpointSite inside the process. As such, it should be the one
answering questions about the state of the site.
https://github.com/llvm/llvm-project/pull/192910
[KnownBits][APInt] Optimize isConstant (NFC) (#191919)
`isConstant` used is quite often and should be as lightweight as
possible. Add `APInt::isInverseOf` and utilize it for `isConstant`. It
is equivalent to `LHS == ~RHS`, but avoids intermediate allocations.
[mlir] targeted verification for transform "inlining"
When merging named transform sequences into their include locations,
rely on the InlinerDialectInterface implementation newly added to the
transform dialect instead of the full verification after the fact. This
enables us to only verify aspects of the IR that may change in a way
compatible with the rest of the infra, reducing the overall cost of the
process.
[Sema] Decay functions/array to pointers in `IncompatiblePointerDiscardsQualifiers` and `IncompatibleOBTKinds` cases (#187038)
This PR adds checks that ensure the compiler has the correct type so it
does not crash when trying to get qualifiers from an incorrect type in
the `IncompatiblePointerDiscardsQualifiers` and `IncompatibleOBTKinds`
cases. It achieves this by performing a decay before accessing pointee
qualifiers.
It also adds a test to ensure that such a bug won't arise again.
Fixes #182534
(same as #183616, unfortunately i forgot to create a new branch and
wiped all changes)
[mlir][linalg][shard] Fix andi reduction kind in sharding partition (#192381)
linalg sharding now maps arith.andi combiners to bitwise_and (instead of
sum) when creating shard.all_reduce. Adds a shard-partition regression
test that checks the emitted all-reduce uses reduction = bitwise_and for
an andi reduction.
[Polly][NFC] Convert IslNodeBuilder::preloadInvariantLoad to isl++ (#192942)
Also fix the wrong lifetime annotation of
`IslNodeBuilder::materializeParameters`
[lldb][PlatformDarwin] Fix build failure (#192934)
PR #191454 introduced a constructor call that breaks in certain build
configs, e.g., with C++20 - https://godbolt.org/z/hTb8166qG.
This fix mimics what's done to construct an instance of `XcodeSDK::Info`
further up in the same file.
[lldb] Implement delayed breakpoints
This patch changes the Process class so that it delays *physically*
enabling/disabling breakpoints until the process is about to
resume/detach/be destroyed, potentially reducing the packets transmitted
by batching all breakpoints together.
Most classes only need to know whether a breakpoint is "logically"
enabled, as opposed to "physically" enabled (i.e. the remote server has
actually enabled the breakpoint). However, lower level classes like
derived Process classes, or StopInfo may actually need to know whether
the breakpoint was physically enabled. As such, this commit also adds a
"IsPhysicallyEnabled" API.
[lldb][NFC] Move BreakpointSite::IsEnabled/SetEnabled into Process
The Process class is the one responsible for managing the state of a
BreakpointSite inside the process. As such, it should be the one
answering questions about the state of the site.
[lldb][NFC] Move BreakpointSite::IsEnabled/SetEnabled into Process
The Process class is the one responsible for managing the state of a
BreakpointSite inside the process. As such, it should be the one
answering questions about the state of the site.
[lldbremote] Implement support for MultiBreakpoint packet
This is fairly straightfoward, thanks to the helper functions created in
the previous commit.
https://github.com/llvm/llvm-project/pull/192910