- Jun 13, 2024
-
-
Akira Hatanaka authored
Merge remote-tracking branch 'origin/users/ahmedbougacha/ptrauth-sign-constant' into users/ahmedbougacha/ptrauth-function-pointers
-
Akira Hatanaka authored
-
Akira Hatanaka authored
- Remove unneeded declarations. - Fix includes. - Use `llvm::to_underlying`. - Fix variable names. - Fix size and type of bit-fields. - Add test case for `err_drv_ptrauth_not_supported`.
-
- Jun 04, 2024
-
-
Ahmed Bougacha authored
- test elf as well - rename every variable.
-
Ahmed Bougacha authored
Merge branch 'users/ahmedbougacha/ptrauth-string-discriminator' into users/ahmedbougacha/ptrauth-sign-constant
-
Ahmed Bougacha authored
-
Ahmed Bougacha authored
- add missing sema test - also test ELF codegen for intrinsics - various capitalization and type nits
-
Ahmed Bougacha authored
-
Ahmed Bougacha authored
-
Akira Hatanaka authored
-
- May 31, 2024
-
-
Akira Hatanaka authored
Co-Authored-By:John McCall <rjmccall@apple.com>
-
Ahmed Bougacha authored
This is constant-expression equivalent to __builtin_ptrauth_sign, allowing its usage in global initializers, but requiring constant pointers and discriminators. Co-Authored-By:John McCall <rjmccall@apple.com>
-
Ahmed Bougacha authored
This exposes the ABI-stable hash function that allows computing a 16-bit discriminator from a constant string. This allows manually matching the implicit string discriminators computed in the ABI (e.g., from mangled names for vtable pointer/entry signing), as well as enabling the use of interesting discriminators when manually annotating specific pointers with the __ptrauth qualifier. Co-Authored-By:John McCall <rjmccall@apple.com>
-
Ahmed Bougacha authored
Based on the SipHash reference implementation: https://github.com/veorq/SipHash which has very graciously been licensed under our llvm license (Apache-2.0 WITH LLVM-exception) by Jean-Philippe Aumasson. This lightly modifies it to fit into libSupport, and wraps it for the two main interfaces we're interested in (16/64-bit). This intentionally doesn't expose a raw interface beyond that to encourage others to carefully consider their use. The exact algorithm is the little-endian interpretation of the non-doubled (i.e. 64-bit) result of applying a SipHash-2-4 using a specific key value which can be found in the source. By "stable" we mean that the result of this hash algorithm will the same across different compiler versions and target platforms. The 16-bit variant is used extensively for the AArch64 ptrauth ABI, because AArch64 can efficiently load a 16-bit immediate into the high bits of a register without disturbing the remainder of the value, which serves as a nice blend operation. 16 bits is also sufficiently compact to not inflate a loader relocation. We disallow zero to guarantee a different discriminator from the places in the ABI that use a constant zero. Co-Authored-By:
John McCall <rjmccall@apple.com>
-
Ahmed Bougacha authored
These are currently gated by __APPLE__; we can figure out a way to define these on ELF targets as well, and maybe have them be defined by clang itself, depending on ABI modes.
-
- May 29, 2024
-
-
Matthew Devereau authored
This is a second attempt to land #84501 which failed on several targets. This patch adds the HAS_IEE754_FLOAT128 define which makes the check for typedef'ing float128 more precise by checking whether __uint128_t is available and checking if the host does not use __ibm128 which is prevalent on power pc targets and replaces IEEE754 float128s.
-
Matt Arsenault authored
FP typed atomic load/store coverage was mostly missing, especially for half and bfloat.
-
Younan Zhang authored
This patch takes Richard's approach of no longer modeling dependent NTTP arguments with TemplateParamObjectDecls. Clang used to do so, which left behind a problem in that we might mess up dependent and non-dependent arguments that boil down to the same canonical type because there's a default argument on the NTTP. The problem of "canonical expression" is still present because this patch doesn't touch the profiling part. Namely, #92292 seems different. Fixes https://github.com/llvm/llvm-project/issues/84052
-
Eli Friedman authored
There's some code in AggExprEmitter::VisitCXXParenListOrInitListExpr to try to do early cleanup for GEPs for fields that aren't accessed. But it's unlikely to actually save significant compile-time, and it's subtly wrong in cases where EmitLValueForFieldInitialization() doesn't create a GEP. So just delete the code. Fixes #88077. Fixes #89547.
-
Carl Ritson authored
Opcodes are the same for these instructions in GFX11 and 12, hence this typo has no functional impact.
-
Mehdi Amini authored
Reverts llvm/llvm-project#86223 windows pre-merge is broken.
-
Louis Dionne authored
Instead of using FOO_TEST_DEPS global variables that don't get updated properly from subdirectories, use targets to propagate the dependencies across directories.
-
Louis Dionne authored
A while back, the cxx_under_test Lit parameter was removed. This patch reintroduces a Lit parameter called "compiler" which controls the value of the %{cxx} substitution used in the test suite. To run the test suite with a different compiler, one can now pass --param compiler=<path>. -
Louis Dionne authored
In essence, this header has always been related to configuration of the library but we didn't want to put it inside <__config> due to complexity reasons. Now that we have sub-headers in <__config>, we can move <__availability> to it and stop including it everywhere since we already obtain the required macros via <__config>.
-
Jim Ingham authored
This reverts commit 0380044e. While I figure out some mysterious CMake error.
-
yronglin authored
Since we have already addressed the LWG issue, this PR marks LWG3951 as implemented. Signed-off-by:
yronglin <yronglin777@gmail.com> Co-authored-by:
A. Jiang <de34@live.cn>
-
Eric Fiselier authored
-
Ruiling, Song authored
The DominatorTree can be reused if no CFG changes.
-
Eric Fiselier authored
-
Jim Ingham authored
There was a Darwin only use of setupterm (under USE_SETUPTERM_WORKAROUND) that required libcurses.dylib. That was added to the main build, but not to the unittest.
-
Hui authored
-
Hui authored
-
Hui authored
-
Sterling Augustine authored
Without this change, the build will fail like so: llvm-project/lld/MachO/ObjC.cpp:1387:75: error: ISO C++20 considers use of overloaded operator '==' (with operand types 'ObjcCategoryMerger::PointerListInfo' and 'ObjcCategoryMerger::PointerListInfo') to be ambiguous despite there being a unique best viable function [-Werror,-Wambiguous-reversed-operator] 1387 | parseProtocolListInfo(classIsec, roClassLayout.baseProtocolsOffset) == | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ 1388 | parseProtocolListInfo(metaIsec, roClassLayout.baseProtocolsOffset) && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/assert.h:100:27: note: expanded from macro 'assert' 100 | (static_cast <bool> (expr) \ | ^~~~ llvm-project/lld/MachO/ObjC.cpp:391:17: note: ambiguity is between a regular call to this operator and a call with the argument order reversed 391 | inline bool operator==(const PointerListInfo &cmp) { | ^ llvm-project/lld/MachO/ObjC.cpp:391:17: note: mark 'operator==' as const or add a matching 'operator!=' to resolve the ambiguity 1 error generated. -
Jakub Kuderski authored
Tighten the verifier for arith cast ops to disallow changing tensor dimensions, e.g., static to dynamic. After this change: * `arith.cast_op %x : tensor<4xi32> to tensor<4xf32>` remains valid * `arith.cast_op %x : tensor<4xi32> to tensor<?xf32>` becomes invalid * `arith.cast_op %x : tensor<?xi32> to tensor<4xf32>` becomes invalid This is mostly to simplify the op semantics. See the discussion thread for more context: https://discourse.llvm.org/t/rfc-remove-arith-math-ops-on-tensors/74357/63.
-
Eric Fiselier authored
Testing github actions is such a pain. I swear it should match now.
-
Heejin Ahn authored
This was added in #93586 but caused a compilation warning and is not used anyway.
-
Ahmed Bougacha authored
This defines a new kind of IR Constant that represents a ptrauth signed pointer, as used in AArch64 PAuth. It allows representing most kinds of signed pointer constants used thus far in the llvm ptrauth implementations, notably those used in the Darwin and ELF ABIs being implemented for c/c++. These signed pointer constants are then lowered to ELF/MachO relocations. These can be simply thought of as a constant `llvm.ptrauth.sign`, with the interesting addition of discriminator computation: the `ptrauth` constant can also represent a combined blend, when both address and integer discriminator operands are used. Both operands are otherwise optional, with default values 0/null.
-
Brendan Dahl authored
This reuses most of the code that was created for f32x4 and f64x2 binary instructions and tries to follow how they were implemented. add/sub/mul/div - use regular LL instructions min/max - use the minimum/maximum intrinsic, and also have builtins pmin/pmax - use the wasm.pmax/pmin intrinsics and also have builtins Specified at: https://github.com/WebAssembly/half-precision/blob/29a9b9462c9285d4ccc1a5dc39214ddfd1892658/proposals/half-precision/Overview.md
-
Heejin Ahn authored
This adds `-wasm-enable-exnref`, which will enable the new EH instructions using `exnref` (adopted in Oct 2023 CG meeting): https://github.com/WebAssembly/exception-handling/blob/main/proposals/exception-handling/Exceptions.md This option should be used with `-wasm-enable-eh`.
-