[llvm-branch-commits] [llvm] [AArch64][PAC] Lower authenticated calls with ptrauth bundles. (PR #85736)

2024-05-24 Thread Daniil Kovalev via llvm-branch-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/85736 ___ 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] [llvm] [AArch64][PAC] Lower authenticated calls with ptrauth bundles. (PR #85736)

2024-05-24 Thread Daniil Kovalev via llvm-branch-commits
https://github.com/kovdan01 requested changes to this pull request. @ahmedbougacha In terms of functionality, LGTM (but I'll prefer other guys also looking through the changes). I've left several minor style-related comments. One more overall style comment which might probably require an additi

[llvm-branch-commits] [llvm] [AArch64][PAC] Lower authenticated calls with ptrauth bundles. (PR #85736)

2024-05-24 Thread Daniil Kovalev via llvm-branch-commits
@@ -1769,6 +1775,41 @@ void AArch64AsmPrinter::emitPtrauthAuthResign(const MachineInstr *MI) { OutStreamer->emitLabel(EndSym); } +void AArch64AsmPrinter::emitPtrauthBranch(const MachineInstr *MI) { + unsigned InstsEmitted = 0; + kovdan01 wrote: This bla

[llvm-branch-commits] [llvm] [AArch64][PAC] Lower authenticated calls with ptrauth bundles. (PR #85736)

2024-05-24 Thread Daniil Kovalev via llvm-branch-commits
@@ -817,10 +817,44 @@ bool AArch64ExpandPseudo::expandCALL_RVMARKER( MachineInstr &MI = *MBBI; MachineOperand &RVTarget = MI.getOperand(0); assert(RVTarget.isGlobal() && "invalid operand for attached call"); - MachineInstr *OriginalCall = - createCall(MBB, MBBI, TII

[llvm-branch-commits] [llvm] [AArch64][PAC] Lower authenticated calls with ptrauth bundles. (PR #85736)

2024-05-24 Thread Daniil Kovalev via llvm-branch-commits
@@ -9206,6 +9222,31 @@ void SelectionDAGBuilder::visitCall(const CallInst &I) { LowerCallTo(I, Callee, I.isTailCall(), I.isMustTailCall()); } +void SelectionDAGBuilder::LowerCallSiteWithPtrAuthBundle( +const CallBase &CB, const BasicBlock *EHPadBB) { + auto PAB = CB.g

[llvm-branch-commits] [llvm] [AArch64][PAC] Lower authenticated calls with ptrauth bundles. (PR #85736)

2024-05-24 Thread Daniil Kovalev via llvm-branch-commits
@@ -2642,6 +2642,20 @@ bool IRTranslator::translateCallBase(const CallBase &CB, } } + std::optional PAI; + if (CB.countOperandBundlesOfType(LLVMContext::OB_ptrauth)) { +// Functions should never be ptrauth-called directly. +assert(!CB.getCalledFunction() && "in

[llvm-branch-commits] [llvm] [AArch64][PAC] Lower authenticated calls with ptrauth bundles. (PR #85736)

2024-05-24 Thread Daniil Kovalev via llvm-branch-commits
@@ -2642,6 +2642,20 @@ bool IRTranslator::translateCallBase(const CallBase &CB, } } + std::optional PAI; + if (CB.countOperandBundlesOfType(LLVMContext::OB_ptrauth)) { +// Functions should never be ptrauth-called directly. +assert(!CB.getCalledFunction() && "in

[llvm-branch-commits] [llvm] [AArch64][PAC] Lower authenticated calls with ptrauth bundles. (PR #85736)

2024-05-24 Thread Daniil Kovalev via llvm-branch-commits
@@ -817,10 +817,44 @@ bool AArch64ExpandPseudo::expandCALL_RVMARKER( MachineInstr &MI = *MBBI; MachineOperand &RVTarget = MI.getOperand(0); assert(RVTarget.isGlobal() && "invalid operand for attached call"); - MachineInstr *OriginalCall = - createCall(MBB, MBBI, TII

[llvm-branch-commits] [llvm] [AArch64][PAC] Lower authenticated calls with ptrauth bundles. (PR #85736)

2024-05-24 Thread Daniil Kovalev via llvm-branch-commits
@@ -817,10 +817,44 @@ bool AArch64ExpandPseudo::expandCALL_RVMARKER( MachineInstr &MI = *MBBI; MachineOperand &RVTarget = MI.getOperand(0); assert(RVTarget.isGlobal() && "invalid operand for attached call"); - MachineInstr *OriginalCall = - createCall(MBB, MBBI, TII

[llvm-branch-commits] [llvm] [AArch64][PAC] Lower authenticated calls with ptrauth bundles. (PR #85736)

2024-05-24 Thread Daniil Kovalev via llvm-branch-commits
@@ -9206,6 +9222,31 @@ void SelectionDAGBuilder::visitCall(const CallInst &I) { LowerCallTo(I, Callee, I.isTailCall(), I.isMustTailCall()); } +void SelectionDAGBuilder::LowerCallSiteWithPtrAuthBundle( +const CallBase &CB, const BasicBlock *EHPadBB) { + auto PAB = CB.g

[llvm-branch-commits] [llvm] [AArch64][PAC] Lower authenticated calls with ptrauth bundles. (PR #85736)

2024-05-24 Thread Daniil Kovalev via llvm-branch-commits
@@ -9206,6 +9222,31 @@ void SelectionDAGBuilder::visitCall(const CallInst &I) { LowerCallTo(I, Callee, I.isTailCall(), I.isMustTailCall()); } +void SelectionDAGBuilder::LowerCallSiteWithPtrAuthBundle( +const CallBase &CB, const BasicBlock *EHPadBB) { + auto PAB = CB.g

[llvm-branch-commits] [llvm] [AArch64][PAC] Lower authenticated calls with ptrauth bundles. (PR #85736)

2024-05-24 Thread Daniil Kovalev via llvm-branch-commits
@@ -8640,6 +8642,15 @@ void SelectionDAGBuilder::LowerCallTo(const CallBase &CB, SDValue Callee, CB.countOperandBundlesOfType(LLVMContext::OB_preallocated) != 0) .setCFIType(CFIType) .setConvergenceControlToken(ConvControlToken); + + // Set the pointer a

[llvm-branch-commits] [llvm] [AArch64][PAC] Lower authenticated calls with ptrauth bundles. (PR #85736)

2024-05-24 Thread Daniil Kovalev via llvm-branch-commits
@@ -1694,6 +1718,35 @@ let Predicates = [HasPAuth] in { def BLRABZ : AuthOneOperand<0b001, 1, "blrabz">; } + // BLRA pseudo, generalized version of BLRAA/BLRAB/Z. + // This directly manipulates x16/x17, which are the only registers the OS + // guarantees are safe to

[llvm-branch-commits] [llvm] [AArch64][PAC] Lower authenticated calls with ptrauth bundles. (PR #85736)

2024-05-24 Thread Daniil Kovalev via llvm-branch-commits
@@ -817,10 +817,44 @@ bool AArch64ExpandPseudo::expandCALL_RVMARKER( MachineInstr &MI = *MBBI; MachineOperand &RVTarget = MI.getOperand(0); assert(RVTarget.isGlobal() && "invalid operand for attached call"); - MachineInstr *OriginalCall = - createCall(MBB, MBBI, TII

[llvm-branch-commits] [mlir] 2790b4d - Revert "[mlir] Fix race condition introduced in ThreadLocalCache (#93280)"

2024-05-24 Thread via llvm-branch-commits
Author: Kiran Chandramohan Date: 2024-05-24T11:18:55+01:00 New Revision: 2790b4d9e63c13d1e692cc301bbd373b10f28070 URL: https://github.com/llvm/llvm-project/commit/2790b4d9e63c13d1e692cc301bbd373b10f28070 DIFF: https://github.com/llvm/llvm-project/commit/2790b4d9e63c13d1e692cc301bbd373b10f28070.

[llvm-branch-commits] [clang] [Serialization] No transitive identifier change (PR #92085)

2024-05-24 Thread Jan Svoboda via llvm-branch-commits
@@ -124,7 +124,7 @@ struct HeaderFileInfo { /// This ID number will be non-zero when there is a controlling /// macro whose IdentifierInfo may not yet have been loaded from /// external storage. - unsigned ControllingMacroID = 0; + uint64_t ControllingMacroID = 0; -

[llvm-branch-commits] [clang] [Serialization] No transitive identifier change (PR #92085)

2024-05-24 Thread Jan Svoboda via llvm-branch-commits
@@ -918,7 +918,7 @@ ASTSelectorLookupTrait::ReadKey(const unsigned char* d, unsigned) { SelectorTable &SelTable = Reader.getContext().Selectors; unsigned N = endian::readNext(d); const IdentifierInfo *FirstII = Reader.getLocalIdentifier( - F, endian::readNext(d)); +

[llvm-branch-commits] [clang] [Serialization] No transitive identifier change (PR #92085)

2024-05-24 Thread Jan Svoboda via llvm-branch-commits
@@ -3896,7 +3903,7 @@ void ASTWriter::WriteIdentifierTable(Preprocessor &PP, // Write out identifiers if either the ID is local or the identifier has // changed since it was loaded. - if (ID >= FirstIdentID || !Chain || !II->isFromAST() || + if (isLocalId

[llvm-branch-commits] [clang] [clang] add fallback to expr in the template differ when comparing ValueDecl (PR #93266)

2024-05-24 Thread Erich Keane via llvm-branch-commits
@@ -784,6 +784,7 @@ Miscellaneous Bug Fixes - Fixed an infinite recursion in ASTImporter, on return type declared inside body of C++11 lambda without trailing return (#GH68775). - Fixed declaration name source location of instantiated function definitions (GH71161). +- Missi

[llvm-branch-commits] [clang] [clang] add fallback to expr in the template differ when comparing ValueDecl (PR #93266)

2024-05-24 Thread Erich Keane via llvm-branch-commits
https://github.com/erichkeane approved this pull request. Fine other than the release note not being clear enough https://github.com/llvm/llvm-project/pull/93266 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm

[llvm-branch-commits] [clang] [clang] add fallback to expr in the template differ when comparing ValueDecl (PR #93266)

2024-05-24 Thread Matheus Izvekov via llvm-branch-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/93266 >From e74a7e69381731465efb8332890e0ebdc061fbb1 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Thu, 23 May 2024 23:57:01 -0300 Subject: [PATCH 1/2] [clang] add fallback to expr in the template differ when

[llvm-branch-commits] [mlir] 50cb216 - Revert "[mlir] Optimize ThreadLocalCache by removing atomic bottleneck (#93270)"

2024-05-24 Thread via llvm-branch-commits
Author: Jacques Pienaar Date: 2024-05-24T07:45:37-07:00 New Revision: 50cb2160464ef916146c199ab8c9fe3ea9f054d6 URL: https://github.com/llvm/llvm-project/commit/50cb2160464ef916146c199ab8c9fe3ea9f054d6 DIFF: https://github.com/llvm/llvm-project/commit/50cb2160464ef916146c199ab8c9fe3ea9f054d6.dif

[llvm-branch-commits] [lld] [llvm] release/18.x: [lld] Fix -ObjC load behavior with LTO (#92162) (PR #92478)

2024-05-24 Thread via llvm-branch-commits
https://github.com/AtariDreams closed https://github.com/llvm/llvm-project/pull/92478 ___ 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] [llvm] release/18.x: [DAGCombiner] In mergeTruncStore, make sure we aren't storing shifted in bits. (#90939) (PR #91038)

2024-05-24 Thread via llvm-branch-commits
https://github.com/AtariDreams closed https://github.com/llvm/llvm-project/pull/91038 ___ 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] [llvm] [Inline]Update value profile for non-call instructions (PR #83769)

2024-05-24 Thread Mingming Liu via llvm-branch-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/83769 ___ 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] [llvm] [Inline]Update value profile for non-call instructions (PR #83769)

2024-05-24 Thread Mingming Liu via llvm-branch-commits
minglotus-6 wrote: Close this. Going to update in https://github.com/llvm/llvm-project/pull/81442 https://github.com/llvm/llvm-project/pull/83769 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[llvm-branch-commits] [llvm] [Inline]Update value profile for non-call instructions (PR #83769)

2024-05-24 Thread Mingming Liu via llvm-branch-commits
https://github.com/minglotus-6 closed https://github.com/llvm/llvm-project/pull/83769 ___ 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] [BOLT][NFCI] Use heuristic for matching split global functions (PR #90429)

2024-05-24 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/90429 ___ 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] [flang] [llvm] [Clang][OpenMP] Add permutation clause (PR #92030)

2024-05-24 Thread Michael Kruse via llvm-branch-commits
@@ -9861,13 +9842,19 @@ buildPreInits(ASTContext &Context, /// Build pre-init statement for the given statements. static Stmt *buildPreInits(ASTContext &Context, ArrayRef PreInits) { - if (PreInits.empty()) -return nullptr; - - SmallVector Stmts; - for (Stmt *S : PreIni