[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)
Erich Keane via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 6 08:18:39 PST 2025
================
@@ -2761,6 +2761,41 @@ etc.).
Query for this feature with ``__has_builtin(__builtin_assume_separate_storage)``.
+``__builtin_assume_dereferenceable``
+-------------------------------------
+
+``__builtin_assume_derefernceable`` is used to provide the optimizer with the
+knowledge that the pointer argument P is dereferenceable up to the specified
+number of bytes.
+
+**Syntax**:
+
+.. code-block:: c++
+
+ __builtin_assume_dereferenceable(const void *, size_t)
----------------
erichkeane wrote:
Is it just Github? There is a lot of weirdly italic stuff in this section of the patch.
https://github.com/llvm/llvm-project/pull/121789
More information about the llvm-commits
mailing list