[llvm-branch-commits] [llvm] [SPARC][IAS] Add aliases for %asr20-21 as defined in JPS1 (PR #94247)

2024-06-08 Thread via llvm-branch-commits
https://github.com/koachan updated https://github.com/llvm/llvm-project/pull/94247 >From 74aec4b8d79f1691ee3f7de7ad777eb00bc2f58f Mon Sep 17 00:00:00 2001 From: Koakuma Date: Mon, 3 Jun 2024 23:28:34 +0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20change?=

[llvm-branch-commits] [llvm] [SPARC][IAS] Add support for %uhi and %ulo extensions (PR #94246)

2024-06-08 Thread via llvm-branch-commits
https://github.com/koachan updated https://github.com/llvm/llvm-project/pull/94246 >From 04bfa20fbeba63f405d12f49a5a75c0903b252b8 Mon Sep 17 00:00:00 2001 From: Koakuma Date: Mon, 3 Jun 2024 23:28:19 +0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20change?=

[llvm-branch-commits] [msan] Handle blendv intrinsics (PR #94882)

2024-06-08 Thread Vitaly Buka via llvm-branch-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/94882 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [msan] Handle blendv intrinsics (PR #94882)

2024-06-08 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms Author: Vitaly Buka (vitalybuka) Changes Then are very similar to select, so we adjust arguments and forward them into select handler. --- Patch is 20.02 KiB, truncated to 20.00 KiB below, full version:

[llvm-branch-commits] [NFC][msan] Prepare function to extract main logic (PR #94880)

2024-06-08 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-compiler-rt-sanitizer Author: Vitaly Buka (vitalybuka) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/94880.diff 1 Files Affected: - (modified) llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp (+6-4) ``diff diff

[llvm-branch-commits] [NFC][msan] Extract `handleSelectLikeInst` (PR #94881)

2024-06-08 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms Author: Vitaly Buka (vitalybuka) Changes `blendv` instructions are very similar to `select`. We will add support for them in followup patches. --- Full diff: https://github.com/llvm/llvm-project/pull/94881.diff 1 Files Affected: -

[llvm-branch-commits] [msan] Handle blendv intrinsics (PR #94882)

2024-06-08 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-compiler-rt-sanitizer Author: Vitaly Buka (vitalybuka) Changes Then are very similar to select, so we adjust arguments and forward them into select handler. --- Patch is 20.02 KiB, truncated to 20.00 KiB below, full version:

[llvm-branch-commits] [NFC][msan] Prepare function to extract main logic (PR #94880)

2024-06-08 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms Author: Vitaly Buka (vitalybuka) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/94880.diff 1 Files Affected: - (modified) llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp (+6-4) ``diff diff --git

[llvm-branch-commits] [msan] Handle blendv intrinsics (PR #94882)

2024-06-08 Thread Vitaly Buka via llvm-branch-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/94882 Then are very similar to select, so we adjust arguments and forward them into select handler. ___ llvm-branch-commits mailing list

[llvm-branch-commits] [NFC][msan] Extract `handleSelectLikeInst` (PR #94881)

2024-06-08 Thread Vitaly Buka via llvm-branch-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/94881 `blendv` instructions are very similar to `select`. We will add support for them in followup patches. ___ llvm-branch-commits mailing list

[llvm-branch-commits] [NFC][msan] Prepare function to extract main logic (PR #94880)

2024-06-08 Thread Vitaly Buka via llvm-branch-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/94880 None ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [msan] Implement shadow propagation for _mm_dp_pd, _mm_dp_ps, _mm256_dp_ps (PR #94875)

2024-06-08 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-compiler-rt-sanitizer @llvm/pr-subscribers-llvm-transforms Author: Vitaly Buka (vitalybuka) Changes Default intrinsic handling was to report any uninitialized part of argument. However intrinsics use mask which allow to ignore parts of input, so it's OK

[llvm-branch-commits] [msan] Implement shadow propagation for _mm_dp_pd, _mm_dp_ps, _mm256_dp_ps (PR #94875)

2024-06-08 Thread Vitaly Buka via llvm-branch-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/94875 Default intrinsic handling was to report any uninitialized part of argument. However intrinsics use mask which allow to ignore parts of input, so it's OK to have vectors partially initialized.

[llvm-branch-commits] [clang] [clang][test] add testing for the AST matcher reference (PR #94248)

2024-06-08 Thread Julian Schmidt via llvm-branch-commits
5chmidti wrote: - added a file-level comment in the ASTMatcher.h file on how the syntax works (basically the pr description) - replaced some `type=name` matches with explicit code matches where applicable, to be more expressive - added comments to `count=` matches when they didn't explain why

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Vlad Serebrennikov via llvm-branch-commits
Endilll wrote: @asl It would be nice if you submit the next round of review as a single review, instead of 29 individual comments. https://github.com/llvm/llvm-project/pull/94056 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org

[llvm-branch-commits] [llvm] [Support] Integrate SipHash.cpp into libSupport. (PR #94394)

2024-06-08 Thread Kristof Beyls via llvm-branch-commits
kbeyls wrote: > So, regarding big-endian things. Original siphash is always "little-endian" > regardless of the host platform. On big endian hosts it essentially does byte > swap in the end. We do not have it here, so we will end with different hashes > on platforms with different endianness.

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -4406,10 +4416,19 @@ class CodeGenFunction : public CodeGenTypeCache { } bool isPointerKnownNonNull(const Expr *E); + + /// Create the discriminator from the storage address and the entity hash. + llvm::Value *EmitPointerAuthBlendDiscriminator(llvm::Value

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -4406,10 +4416,19 @@ class CodeGenFunction : public CodeGenTypeCache { } bool isPointerKnownNonNull(const Expr *E); + + /// Create the discriminator from the storage address and the entity hash. + llvm::Value *EmitPointerAuthBlendDiscriminator(llvm::Value

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2456,10 +2456,20 @@ class CodeGenFunction : public CodeGenTypeCache { void InitializeVTablePointers(const CXXRecordDecl *ClassDecl); + // VTableTrapMode - whether we guarantee that loading the + // vtable is guaranteed to trap on authentication failure, + // even if

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -3063,3 +3063,66 @@ void CodeGenFunction::EmitPointerAuthOperandBundle( llvm::Value *args[] = {key, discriminator}; bundles.emplace_back("ptrauth", args); } + +static llvm::Value *EmitPointerAuthCommon(CodeGenFunction , asl wrote: ditto about code

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
https://github.com/asl edited https://github.com/llvm/llvm-project/pull/94056 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -841,6 +866,9 @@ void CodeGenVTables::addVTableComponent(ConstantArrayBuilder , if (FnAS != GVAS) fnPtr = llvm::ConstantExpr::getAddrSpaceCast(fnPtr, CGM.GlobalsInt8PtrTy); + if (auto = +

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -841,6 +866,9 @@ void CodeGenVTables::addVTableComponent(ConstantArrayBuilder , if (FnAS != GVAS) fnPtr = llvm::ConstantExpr::getAddrSpaceCast(fnPtr, CGM.GlobalsInt8PtrTy); + if (auto = asl wrote: ```suggestion if

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -307,10 +309,15 @@ void CodeGenFunction::EmitCallAndReturnForThunk(llvm::FunctionCallee Callee, const CXXMethodDecl *MD = cast(CurGD.getDecl()); // Adjust the 'this' pointer if necessary + const CXXRecordDecl *thisValueClass = +

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -307,10 +309,15 @@ void CodeGenFunction::EmitCallAndReturnForThunk(llvm::FunctionCallee Callee, const CXXMethodDecl *MD = cast(CurGD.getDecl()); // Adjust the 'this' pointer if necessary + const CXXRecordDecl *thisValueClass = +

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -307,10 +309,15 @@ void CodeGenFunction::EmitCallAndReturnForThunk(llvm::FunctionCallee Callee, const CXXMethodDecl *MD = cast(CurGD.getDecl()); // Adjust the 'this' pointer if necessary + const CXXRecordDecl *thisValueClass = asl wrote:

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -219,8 +219,10 @@ CodeGenFunction::GenerateVarArgsThunk(llvm::Function *Fn, "Store of this should be in entry block?"); // Adjust "this", if necessary. Builder.SetInsertPoint(&*ThisStore); - llvm::Value *AdjustedThisPtr = -

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -219,8 +219,10 @@ CodeGenFunction::GenerateVarArgsThunk(llvm::Function *Fn, "Store of this should be in entry block?"); // Adjust "this", if necessary. Builder.SetInsertPoint(&*ThisStore); - llvm::Value *AdjustedThisPtr = -

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -90,6 +90,11 @@ CodeGenVTables::EmitVTTDefinition(llvm::GlobalVariable *VTT, llvm::Constant *Init = llvm::ConstantExpr::getGetElementPtr( VTable->getValueType(), VTable, Idxs, /*InBounds=*/true, InRange); + if (auto = +

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -90,6 +90,11 @@ CodeGenVTables::EmitVTTDefinition(llvm::GlobalVariable *VTT, llvm::Constant *Init = llvm::ConstantExpr::getGetElementPtr( VTable->getValueType(), VTable, Idxs, /*InBounds=*/true, InRange); + if (auto = asl wrote:

[llvm-branch-commits] [clang] [clang] Implement function pointer signing and authenticated function calls (PR #93906)

2024-06-08 Thread Daniil Kovalev via llvm-branch-commits
@@ -14,10 +14,146 @@ #ifndef LLVM_CLANG_BASIC_POINTERAUTHOPTIONS_H #define LLVM_CLANG_BASIC_POINTERAUTHOPTIONS_H +#include "clang/Basic/LLVM.h" +#include "clang/Basic/LangOptions.h" +#include "llvm/Support/ErrorHandling.h" +#include "llvm/Target/TargetOptions.h" +#include

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -23,11 +23,53 @@ #include "llvm/ADT/DenseMap.h" #include "llvm/IR/ValueMap.h" #include "llvm/Analysis/ValueTracking.h" +#include "llvm/Support/SipHash.h" #include using namespace clang; using namespace CodeGen; +/// Given a pointer-authentication schema, return a

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -803,6 +803,14 @@ bool ConstStructBuilder::Build(const APValue , const RecordDecl *RD, llvm::Constant *VTableAddressPoint = CGM.getCXXABI().getVTableAddressPoint(BaseSubobject(CD, Offset), VTableClass); +

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -803,6 +803,14 @@ bool ConstStructBuilder::Build(const APValue , const RecordDecl *RD, llvm::Constant *VTableAddressPoint = CGM.getCXXABI().getVTableAddressPoint(BaseSubobject(CD, Offset), VTableClass); +

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2681,12 +2687,35 @@ void CodeGenFunction::InitializeVTablePointers(const CXXRecordDecl *RD) { llvm::Value *CodeGenFunction::GetVTablePtr(Address This, llvm::Type *VTableTy, - const

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2681,12 +2687,35 @@ void CodeGenFunction::InitializeVTablePointers(const CXXRecordDecl *RD) { llvm::Value *CodeGenFunction::GetVTablePtr(Address This, llvm::Type *VTableTy, - const

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2681,12 +2687,35 @@ void CodeGenFunction::InitializeVTablePointers(const CXXRecordDecl *RD) { llvm::Value *CodeGenFunction::GetVTablePtr(Address This, llvm::Type *VTableTy, - const

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2681,12 +2687,35 @@ void CodeGenFunction::InitializeVTablePointers(const CXXRecordDecl *RD) { llvm::Value *CodeGenFunction::GetVTablePtr(Address This, llvm::Type *VTableTy, - const

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2681,12 +2687,35 @@ void CodeGenFunction::InitializeVTablePointers(const CXXRecordDecl *RD) { llvm::Value *CodeGenFunction::GetVTablePtr(Address This, llvm::Type *VTableTy, - const

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2588,6 +2588,12 @@ void CodeGenFunction::InitializeVTablePointer(const VPtr ) { // the same addr space. Note that this might not be LLVM address space 0. VTableField = VTableField.withElementType(PtrTy); + if (auto authenticationInfo = CGM.getVTablePointerAuthInfo(

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
https://github.com/asl edited https://github.com/llvm/llvm-project/pull/94056 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2588,6 +2588,12 @@ void CodeGenFunction::InitializeVTablePointer(const VPtr ) { // the same addr space. Note that this might not be LLVM address space 0. VTableField = VTableField.withElementType(PtrTy); + if (auto authenticationInfo = CGM.getVTablePointerAuthInfo(

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -3094,9 +3188,10 @@ void VFTableBuilder::AddMethods(BaseSubobject Base, unsigned BaseDepth, ReturnAdjustmentOffset.VirtualBase); } } - +auto thisType = (OverriddenMD ? OverriddenMD : MD)->getThisType().getTypePtr();

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -3094,9 +3188,10 @@ void VFTableBuilder::AddMethods(BaseSubobject Base, unsigned BaseDepth, ReturnAdjustmentOffset.VirtualBase); } } - +auto thisType = (OverriddenMD ? OverriddenMD : MD)->getThisType().getTypePtr();

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
https://github.com/asl edited https://github.com/llvm/llvm-project/pull/94056 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -7064,21 +7119,29 @@ void ItaniumMangleContextImpl::mangleThunk(const CXXMethodDecl *MD, Thunk.Return.Virtual.Itanium.VBaseOffsetOffset); Mangler.mangleFunctionEncoding(MD); + if (!elideOverrideInfo) { +

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -7037,8 +7036,64 @@ void ItaniumMangleContextImpl::mangleCXXDtorComdat(const CXXDestructorDecl *D, Mangler.mangle(GlobalDecl(D, Dtor_Comdat)); } +static void mangleOverrideDiscrimination(CXXNameMangler , + ASTContext , +

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -3088,6 +3089,17 @@ QualType ASTContext::removeAddrSpaceQualType(QualType T) const { return QualType(TypeNode, Quals.getFastQualifiers()); } +uint16_t ASTContext::getPointerAuthVTablePointerDiscriminator( +const CXXRecordDecl *record) { +

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -162,20 +162,27 @@ struct ThunkInfo { /// Holds a pointer to the overridden method this thunk is for, /// if needed by the ABI to distinguish different thunks with equal - /// adjustments. Otherwise, null. + /// adjustments. + /// In the Itanium ABI, this field can

[llvm-branch-commits] [clang] [llvm] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
https://github.com/asl edited https://github.com/llvm/llvm-project/pull/93903 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [llvm] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -47,6 +47,17 @@ void test_blend_discriminator(int *dp, int (*fp)(int), int value) { float *mismatch = __builtin_ptrauth_blend_discriminator(dp, value); // expected-error {{incompatible integer to pointer conversion initializing 'float *' with an expression of type}} }

[llvm-branch-commits] [lld] acb7210 - Revert "[lld][AArch64][ELF][PAC] Support `.relr.auth.dyn` section (#87635)"

2024-06-08 Thread via llvm-branch-commits
Author: Daniil Kovalev Date: 2024-06-08T09:21:11+03:00 New Revision: acb7210fdeaf3ddf80e28cfc0e1faefc939478cf URL: https://github.com/llvm/llvm-project/commit/acb7210fdeaf3ddf80e28cfc0e1faefc939478cf DIFF:

[llvm-branch-commits] [clang] [llvm] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -15,6 +15,29 @@ typedef enum { ptrauth_key_asib = 1, ptrauth_key_asda = 2, ptrauth_key_asdb = 3, + +#ifdef __APPLE__ asl wrote: Looks like this is something from already merged commit. Worth rebasing? https://github.com/llvm/llvm-project/pull/93903

[llvm-branch-commits] [llvm] [Support] Integrate SipHash.cpp into libSupport. (PR #94394)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
asl wrote: So, regarding big-endian things. Original siphash is always "little-endian" regardless of the host platform. On big endian hosts it essentially does byte swap in the end. We do not have it here, so we will end with different hashes on platforms with different endianness. >From the

[llvm-branch-commits] [llvm] [Support] Add SipHash-based 16-bit ptrauth stable hash. (PR #93902)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
https://github.com/asl approved this pull request. https://github.com/llvm/llvm-project/pull/93902 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Valentin Clement ,Valentin Clement Message-ID: In-Reply-To: https://github.com/clementval updated https://github.com/llvm/llvm-project/pull/94771 >From fd911977863888c7c005f00ae05049b32fe9d4d6 Mon Sep 17 00:00:00 2001 From: Valentin Clement

[llvm-branch-commits] [clang] [clang] Implement function pointer signing and authenticated function calls (PR #93906)

2024-06-07 Thread Akira Hatanaka via llvm-branch-commits
@@ -14,10 +14,146 @@ #ifndef LLVM_CLANG_BASIC_POINTERAUTHOPTIONS_H #define LLVM_CLANG_BASIC_POINTERAUTHOPTIONS_H +#include "clang/Basic/LLVM.h" +#include "clang/Basic/LangOptions.h" +#include "llvm/Support/ErrorHandling.h" +#include "llvm/Target/TargetOptions.h" +#include

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Valentin Clement Message-ID: In-Reply-To: clementval wrote: > Beware that the windows failure seems related to this change or the previous > one: > > ``` > > C:\ws\src\flang\lib\Optimizer\Builder\Runtime\Reduction.cpp(1499): error > C2065:

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Valentin Clement Message-ID: In-Reply-To: jeanPerier wrote: Beware that the windows failure seems related to this change or the previous one: ``` C:\ws\src\flang\lib\Optimizer\Builder\Runtime\Reduction.cpp(1499): error C2065:

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw==?=,Valentin Clement Message-ID: In-Reply-To: https://github.com/jeanPerier approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/94771 ___ llvm-branch-commits mailing list

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Slava Zakharin via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw==?=,Valentin Clement Message-ID: In-Reply-To: https://github.com/vzakhari approved this pull request. Thank you, Valentin! https://github.com/llvm/llvm-project/pull/94771 ___ llvm-branch-commits mailing

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Valentin Clement Message-ID: In-Reply-To: clementval wrote: Thanks Slava and Jean for the review! I fixed the mismatch in `ForcedReduceComplex16` and `ForcedReduceComplex16Dim`. Thanks Slava for catching that.

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Valentin Clement Message-ID: In-Reply-To: https://github.com/clementval updated https://github.com/llvm/llvm-project/pull/94771 >From fd911977863888c7c005f00ae05049b32fe9d4d6 Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Thu, 6 Jun 2024

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?Message-ID: In-Reply-To: @@ -540,9 +606,31 @@ struct ForcedReduceComplex16 { auto strTy = fir::ReferenceType::get(mlir::IntegerType::get(ctx, 8)); auto intTy = mlir::IntegerType::get(ctx, 8 * sizeof(int)); auto

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Oliver Hunt via llvm-branch-commits
ojhunt wrote: Had to do a force push to resolve merge conflicts following @ahatanak's PR, so this change now includes `CodeGenFunction::EmitPointerAuthAuth` etc https://github.com/llvm/llvm-project/pull/94056 ___ llvm-branch-commits mailing list

[llvm-branch-commits] [libcxx] [libc++] Implement std::move_only_function (P0288R9) (PR #94670)

2024-06-07 Thread Nikolas Klauser via llvm-branch-commits
@@ -0,0 +1,233 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[llvm-branch-commits] [libcxx] [libc++] Implement std::move_only_function (P0288R9) (PR #94670)

2024-06-07 Thread via llvm-branch-commits
https://github.com/huixie90 edited https://github.com/llvm/llvm-project/pull/94670 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?Message-ID: In-Reply-To: @@ -540,9 +606,31 @@ struct ForcedReduceComplex16 { auto strTy = fir::ReferenceType::get(mlir::IntegerType::get(ctx, 8)); auto intTy = mlir::IntegerType::get(ctx, 8 * sizeof(int)); auto

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Slava Zakharin via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?Message-ID: In-Reply-To: @@ -540,9 +606,31 @@ struct ForcedReduceComplex16 { auto strTy = fir::ReferenceType::get(mlir::IntegerType::get(ctx, 8)); auto intTy = mlir::IntegerType::get(ctx, 8 * sizeof(int)); auto

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Slava Zakharin via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?Message-ID: In-Reply-To: @@ -540,9 +606,31 @@ struct ForcedReduceComplex16 { auto strTy = fir::ReferenceType::get(mlir::IntegerType::get(ctx, 8)); auto intTy = mlir::IntegerType::get(ctx, 8 * sizeof(int)); auto

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?Message-ID: In-Reply-To: @@ -540,9 +606,31 @@ struct ForcedReduceComplex16 { auto strTy = fir::ReferenceType::get(mlir::IntegerType::get(ctx, 8)); auto intTy = mlir::IntegerType::get(ctx, 8 * sizeof(int)); auto

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Slava Zakharin via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw==?= Message-ID: In-Reply-To: @@ -540,9 +606,31 @@ struct ForcedReduceComplex16 { auto strTy = fir::ReferenceType::get(mlir::IntegerType::get(ctx, 8)); auto intTy = mlir::IntegerType::get(ctx, 8 * sizeof(int)); auto

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
@@ -1261,6 +1262,10 @@ class ASTContext : public RefCountedBase { /// space. QualType removeAddrSpaceQualType(QualType T) const; + /// Return the "other" type-specific discriminator for the given type. asl wrote: @ojhunt This looks much better, thanks!

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Oliver Hunt via llvm-branch-commits
@@ -1261,6 +1262,10 @@ class ASTContext : public RefCountedBase { /// space. QualType removeAddrSpaceQualType(QualType T) const; + /// Return the "other" type-specific discriminator for the given type. ojhunt wrote: How would `/// Return the "other"

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Oliver Hunt via llvm-branch-commits
@@ -1261,6 +1262,10 @@ class ASTContext : public RefCountedBase { /// space. QualType removeAddrSpaceQualType(QualType T) const; + /// Return the "other" type-specific discriminator for the given type. ojhunt wrote: @asl thoughts?

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?Message-ID: In-Reply-To: https://github.com/clementval updated https://github.com/llvm/llvm-project/pull/94771 >From fd911977863888c7c005f00ae05049b32fe9d4d6 Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Thu, 6 Jun 2024 14:17:44 -0700

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
@@ -527,10 +571,32 @@ struct ForcedReduceComplex10 { } }; +/// Placeholder for Dim complex(10) version of Reduce Intrinsic +struct ForcedReduceComplex10Dim { + static constexpr const char *name = + ExpandAndQuoteKey(RTNAME(CppReduceComplex10Dim)); + static constexpr

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
@@ -527,10 +571,32 @@ struct ForcedReduceComplex10 { } }; +/// Placeholder for Dim complex(10) version of Reduce Intrinsic +struct ForcedReduceComplex10Dim { + static constexpr const char *name = + ExpandAndQuoteKey(RTNAME(CppReduceComplex10Dim)); + static constexpr

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Slava Zakharin via llvm-branch-commits
@@ -527,10 +571,32 @@ struct ForcedReduceComplex10 { } }; +/// Placeholder for Dim complex(10) version of Reduce Intrinsic +struct ForcedReduceComplex10Dim { + static constexpr const char *name = + ExpandAndQuoteKey(RTNAME(CppReduceComplex10Dim)); + static constexpr

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-flang-fir-hlfir Author: Valentin Clement (バレンタイン クレメン) (clementval) Changes This is a follow up patch to #94652 and handles the lowering of the reduce intrinsic with DIM argument and non scalar result. --- Full diff:

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Valentin Clement バレンタイン クレメン via llvm-branch-commits
https://github.com/clementval created https://github.com/llvm/llvm-project/pull/94771 This is a follow up patch to #94652 and handles the lowering of the reduce intrinsic with DIM argument and non scalar result. >From fd911977863888c7c005f00ae05049b32fe9d4d6 Mon Sep 17 00:00:00 2001 From:

[llvm-branch-commits] [libcxx] [libc++] Implement std::move_only_function (P0288R9) (PR #94670)

2024-06-07 Thread via llvm-branch-commits
@@ -0,0 +1,233 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2126,14 +2219,16 @@ static ExprResult PointerAuthSignGenericData(Sema , CallExpr *Call) { } static ExprResult PointerAuthSignOrAuth(Sema , CallExpr *Call, -PointerAuthOpKind OpKind) { +

[llvm-branch-commits] [libcxx] [libc++] Implement std::move_only_function (P0288R9) (PR #94670)

2024-06-07 Thread Nikolas Klauser via llvm-branch-commits
philnik777 wrote: @EricWF When switching to `__libcpp_operator_{new,delete}` everything gets compiled exactly the same on my system. Could you disclose which test you used for this code? You also claim that the `__pointer_int_pair` causes the optimizer to lose track of the function pointer

[llvm-branch-commits] [libcxx] [libc++] Implement std::move_only_function (P0288R9) (PR #94670)

2024-06-07 Thread via llvm-branch-commits
EricWF wrote: Oh, I just noticed there are no tests for exception safety. Could you please add some throwing types? (Or perhaps I just missed those tests?). Currently this code terminates: ``` #include #include struct ThrowsOnConstruct { explicit ThrowsOnConstruct(int x) : value(x) { if

[llvm-branch-commits] [libcxx] [libc++] Implement std::move_only_function (P0288R9) (PR #94670)

2024-06-07 Thread via llvm-branch-commits
https://github.com/EricWF requested changes to this pull request. Please see the previous comment for the requested changes. https://github.com/llvm/llvm-project/pull/94670 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org

[llvm-branch-commits] [libcxx] [libc++] Implement std::move_only_function (P0288R9) (PR #94670)

2024-06-07 Thread Nikolas Klauser via llvm-branch-commits
@@ -0,0 +1,46 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[llvm-branch-commits] [libcxx] [libc++] Implement std::move_only_function (P0288R9) (PR #94670)

2024-06-07 Thread via llvm-branch-commits
EricWF wrote: After implementing a version myself, I think there's a bunch of unneeded complexity in this type. I compared the two implementations on a personal compiler-explorer which is set up to compare libc++ patches (I'm working to provide to other developers). The use of

[llvm-branch-commits] [llvm] [Frontend] Introduce `getDirectiveCategory` for ACC/OMP directives (PR #94689)

2024-06-07 Thread Krzysztof Parzyszek via llvm-branch-commits
https://github.com/kparzysz updated https://github.com/llvm/llvm-project/pull/94689 >From 64fcf25e2158de44bccf725a0f91d8228b7cb7a5 Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Thu, 6 Jun 2024 15:10:13 -0500 Subject: [PATCH 1/3] [Frontend] Introduce `getDirectiveCategory` for

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-07 Thread Daniil Kovalev via llvm-branch-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/93904 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [libcxx] [libc++] Implement std::move_only_function (P0288R9) (PR #94670)

2024-06-07 Thread via llvm-branch-commits
@@ -0,0 +1,233 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[llvm-branch-commits] [libcxx] [libc++] Implement std::move_only_function (P0288R9) (PR #94670)

2024-06-07 Thread via llvm-branch-commits
@@ -0,0 +1,46 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-07 Thread Daniil Kovalev via llvm-branch-commits
@@ -2061,6 +2071,58 @@ ConstantLValueEmitter::VisitCallExpr(const CallExpr *E) { } } +ConstantLValue +ConstantLValueEmitter::emitPointerAuthSignConstant(const CallExpr *E) { + llvm::Constant *UnsignedPointer = emitPointerAuthPointer(E->getArg(0)); + unsigned Key =

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-07 Thread Daniil Kovalev via llvm-branch-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/93904 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-07 Thread Daniil Kovalev via llvm-branch-commits
@@ -1856,6 +1856,12 @@ class ConstantLValueEmitter : public ConstStmtVisitor kovdan01 wrote: >From the function prototype, it's unclear that the first element of the pair >stands for `StorageAddress` and the second one - for `OtherDiscriminator`. >Consider

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-07 Thread Daniil Kovalev via llvm-branch-commits
@@ -0,0 +1,63 @@ +//===--- CGPointerAuth.cpp - IR generation for pointer authentication -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-07 Thread Daniil Kovalev via llvm-branch-commits
https://github.com/kovdan01 requested changes to this pull request. https://github.com/llvm/llvm-project/pull/93904 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org

[llvm-branch-commits] [mlir] [MLIR][OpenMP] Clause-based OpenMP operation definition (PR #92523)

2024-06-07 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/92523 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [mlir] [MLIR][OpenMP] Clause-based OpenMP operation definition (PR #92523)

2024-06-07 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah approved this pull request. LGTM, but please wait for another reviewer https://github.com/llvm/llvm-project/pull/92523 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org

[llvm-branch-commits] [mlir] [MLIR][OpenMP] Clause-based OpenMP operation definition (PR #92523)

2024-06-07 Thread Tom Eccles via llvm-branch-commits
tblah wrote: > @tblah thanks for giving this a look. Basically the issue here with the > reduction clause is that its description is currently different for each > operation that accepts it. > It would be great to agree on a generic description for that clause that > would work for all ops,

  1   2   3   4   5   6   7   8   9   10   >