AMDGPU: Simplify placeholder replacement in AMDGPUPromoteAlloca (#188202)
If `promoteAllocaUserToVector` returns the placeholder, it means the
instruction does not actually modify the alloca. we don't need to add
the placeholder as block available value for correctness. Instructions
appear afterwards in the the same block could still get the placeholder
as source value through GetCurVal() call. Instructions in other block
which access the alloca will be set up later when we really do
placeholder replacement.
This help simplify the placeholder replacement logic.
[libc][docs][NFC] Expand entrypoints technical reference (#4) (#188255)
Expanded entrypoints.rst with details about definitions, registration
rules, and the lifecycle of an entrypoint.
Updated multiple documents to remove redundant technical details and
link to the centralized entrypoints reference:
- libc/docs/dev/cmake_build_rules.rst
- libc/docs/dev/implementation_standard.rst
- libc/docs/porting.rst
- libc/docs/dev/source_tree_layout.rst
emulators/Ymir: remove USES= desktop-file-utils
As the .desktop file doesn't define MimeTypes,
we don't need USES= desktop-file-utils.
PR: 294031
Reported by: Stefan Schlosser <bsdcode at disroot.org> (maintainer)
Approved by: Stefan Schlosser (maintainer), vvd (mentor)
[compiler-rt] CRT builtins tests should not run on mac/windows under LLVM_ENABLE_RUNTIMES (#187835)
#171941 got the builtins tests running under LLVM_ENABLE_RUNTIMES by
testing the builtins as part of the runtimes build.
As a consequence, CMake in `lib/builtins/` is no longer visible when
configuring the tests (but `test/builtins/` is). This means that the
`cmake_dependent_option` from `lib/builtins/` is not accounted for by
the tests, allowing COMPILER_RT_BUILD_CRT to be YES when
COMPILER_RT_HAS_CRT is NO. As a consequence, the CRT tests are running
on platforms where COMPILER_RT_HAS_CRT is false (#176892).
https://github.com/llvm/llvm-project/blob/367da15a11c52886c50e7f020cb4de59fe6d07ca/compiler-rt/lib/builtins/CMakeLists.txt#L1106-L1108
Although the long-term solution could be to split both the builtins (and
their tests) out of compiler-rt into a top-level directory with shared
options, this works around the issue for the moment by checking both
COMPILER_RT_HAS_CRT and COMPILER_RT_BUILD_CRT before enabling the "crt"
[2 lines not shown]
[Reland] [ClangScanDeps] Do not emit warning for P1689 format (#186966) (#188401)
Close https://github.com/llvm/llvm-project/issues/185394
This is only for P1689 format as ClangScanDeps/optimize-vfs-pch.m will
check for warning message. I'll leave this to people who want to change
that.
[asan] Convert __SANITIZER_DISABLE_CONTAINER_OVERFLOW__ tests to C (#188406)
As-is tests do not pass on android with older C++ headers.
There is nothing C++ specific in tests.
Followup to #181721.
In the namei callback for __pledge_open() invert the logic of checking
pledge/namei modes and then checking for the path. Now, first
identify the path with array bsearch then check the pledge/namei modes.
Since this is __pledge_open(), if the path is not known, terminate with
an EACCES abort. If the path is known but the pledge/namei modes don't
suggest an unveil bypass, allow the code to fallthrough to the rpath/wpath
checks, and then back into namei for unveil validation.
ok dgl
[Clang] define memory scopes as a builtin enum
Clang currently represents memory scopes as pre-defined preprocessor macros that
evaluate to integers. But so far, there are three sets of conflicting scopes:
"common" clang scopes, HIP scopes and OpenCL scopes. These sets use the same
integers in different orders, making it impossible to validate their use. A
better approach is to represent these scopes as enum types, so that the integer
values become less significant. Sema can now validate the scope argument by its
type instead.
Both C and C++ define an enum for memory_order, but there is no standard enum
for memory_scope. This change introduces a Clang-specific enum "memory_scope".
The pre-defined macros are now mapped to this enum. Later changes can add
similar enums for other languages.
enum __memory_scope {
__memory_scope_system,
__memory_scope_device,
__memory_scope_workgroup,
[19 lines not shown]