[mlir][gpu] Use `arith` dialect to lower gpu.global_id (#171614)
This PR lowers the`gpu.global_id` op using the arith dialect instead of
the index dialect. Fixes #171303.
[libc++][complex] Applied `[[nodiscard]]` (#171027)
`[[nodiscard]]` should be applied to functions where discarding the
return value is most likely a correctness issue.
- https://libcxx.llvm.org/CodingGuidelines.html
There appears to be an issue with annotating `operator*` and
`operator/`, see: https://llvm.org/PR171031
---------
Co-authored-by: A. Jiang <de34 at live.cn>
[ExposeObjCDirect] Setup helper functions
1. GenerateDirectMethodsPreconditionCheck: Move some functionalities to a separate functions.
Those functions will be reused if we move precondition checks into a thunk
2. Create `DirectMethodInfo`, which will be used to manage true implementation and its thunk
[LLVM][CMake] Build examples for llvm-test-depends
Build examples and example plug-ins by default when running tests. If
examples are unwanted, they can still be disabled completely using
LLVM_INCLUDE_EXAMPLES=OFF. Plugin tests depend on examples and it is
beneficial to test them by default. By default, Examples will still not
be included in the default target or be installed, this remains
controlled by LLVM_BUILD_EXAMPLES (which defaults to OFF).
The additional cost for building examples for tests is 17 compilation
units (12 C++, 5 C), which should be tolerable.
I don't know how broken the examples currently are in the various build
configurations, but if we find breakage, it would be good to fix it.
Pull Request: https://github.com/llvm/llvm-project/pull/171998
[orc-rt] Add build options for EH and RTTI, and a config.h header. (#172129)
Clients should be able to build the ORC runtime with or without
exceptions/RTTI, and this choice should be able to be made independently
of the corresponding settings for LLVM (e.g. it should be fine to build
LLVM with exceptions/RTTI disabled, and orc-rt with them enabled).
The orc-rt-c/config.h header will provide C defines that can be used by
both the ORC runtime and API clients to determine the value of the
options.
Future patches should build on this work to provide APIs that enable
some interoperability between the ORC runtime's error return mechanism
(Error/Expected) and C++ exceptions.
[orc-rt] Refactor ErrorHandlerTraits to use CallableTraitsHelper. (#172126)
Using CallableTraitsHelper simplifies the expression of
ErrorHandlerTraits, which is responsible for running handlers based on
their argument and return types.