[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-02-20 Thread Aaron Ballman via cfe-commits
@@ -5708,6 +5732,27 @@ CGCallee CodeGenFunction::EmitCallee(const Expr *E) { return EmitCallee(ICE->getSubExpr()); } +// Try to remember the original __ptrauth qualifier for loads of +// function pointers. +if (ICE->getCastKind() == CK_LValueToRValue) { +

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-02-20 Thread Aaron Ballman via cfe-commits
@@ -980,6 +980,25 @@ def err_ptrauth_indirect_goto_addrlabel_arithmetic : Error< "%select{subtraction|addition}0 of address-of-label expressions is not " "supported with ptrauth indirect gotos">; +// __ptrauth qualifier +def err_ptrauth_qualifier_invalid : Error< + "%sele

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-02-20 Thread Aaron Ballman via cfe-commits
@@ -6112,7 +6136,7 @@ def note_deleted_special_member_class_subobject : Note< "%select{default|corresponding|default|default|default}4 constructor}0|" "destructor}5" "%select{||s||}4" - "|is an ObjC pointer}6">; + "|is an ObjC pointer|has an address-discriminated ptraut

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-02-20 Thread Aaron Ballman via cfe-commits
@@ -803,17 +809,18 @@ class Qualifiers { static_assert(sizeof(PointerAuthQualifier) == sizeof(uint32_t), "PointerAuthQualifier must be 32 bits"); + static constexpr uint64_t PtrAuthShift = 32; + static constexpr uint64_t PtrAuthMask = uint64_t(0x) <

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-02-20 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for this! Please be sure to add a release note to `clang/docs/ReleaseNotes.rst` as we get closer to finalizing on the PR so users know about the feature. I started a pass over the PR but ran out of time before I could get to Parse and Sema,

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-02-20 Thread Aaron Ballman via cfe-commits
@@ -166,6 +193,88 @@ CGPointerAuthInfo CodeGenModule::getPointerAuthInfoForType(QualType T) { return ::getPointerAuthInfoForType(*this, T); } +static std::pair +emitLoadOfOrigPointerRValue(CodeGenFunction &CGF, const LValue &LV, +SourceLocation L

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-02-20 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/100830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-02-20 Thread Aaron Ballman via cfe-commits
@@ -2850,6 +2850,26 @@ void CXXNameMangler::mangleQualifiers(Qualifiers Quals, const DependentAddressSp if (Quals.hasUnaligned()) mangleVendorQualifier("__unaligned"); + // __ptrauth. Note that this is parameterized. + if (PointerAuthQualifier PtrAuth = Quals.getPoin

[clang] [llvm] Reapply [CaptureTracking][FunctionAttrs] Add support for CaptureInfo (#125880) (PR #128020)

2025-02-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/128020 Relative to the previous attempt, this adjusts callCapturesBefore() to not skip captures(ret: address, provenance) arguments, as these will not count as a capture at the call-site. -- This extends CaptureTrac

[clang] [flang] [flang][OpenMP] Upstream `do concurrent` loop-nest detection. (PR #127595)

2025-02-20 Thread Valentin Clement バレンタイン クレメン via cfe-commits
clementval wrote: > @clementval @jeanPerier can you please take a look at the PR and > @kiranchandramohan's comment above? 🙏 Yes, I think we should add a proper operations to represent the do concurrent. It would also allow use to carry the locality mapping into the IR representation and appl

[clang] [Clang] add -Wshift-bool warning to handle shifting of bool (PR #127336)

2025-02-20 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/127336 >From 272385df25b791b50472b92e12157477d021a26f Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 15 Feb 2025 18:19:44 +0200 Subject: [PATCH 1/4] [Clang] add -Wshift-bool warning to handle shifting of boo

[clang] clang/HIP: Remove some unused ocml function declarations (PR #128022)

2025-02-20 Thread Matt Arsenault via cfe-commits
arsenm wrote: * **#128022** https://app.graphite.dev/github/pr/llvm/llvm-project/128022?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/12802

[clang] clang/HIP: Remove some unused ocml function declarations (PR #128022)

2025-02-20 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/128022 These should probably be dropped from the library. >From c6c75b5d7a9a1869bfcdc413a98b00fe4b9f07d1 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Tue, 22 Nov 2022 12:05:12 -0500 Subject: [PATCH] clang/HIP: R

[clang] [Clang] add -Wshift-bool warning to handle shifting of bool (PR #127336)

2025-02-20 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/127336 >From 272385df25b791b50472b92e12157477d021a26f Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 15 Feb 2025 18:19:44 +0200 Subject: [PATCH 1/5] [Clang] add -Wshift-bool warning to handle shifting of boo

[clang] [profile] runtime counter relocation is needed on windows-msvc targets (PR #127858)

2025-02-20 Thread Anh Tuyen Tran via cfe-commits
@@ -795,7 +795,8 @@ static void addPGOAndCoverageFlags(const ToolChain &TC, Compilation &C, else { CmdArgs.push_back("-fprofile-continuous"); // Platforms that require a bias variable: - if (T.isOSBinFormatELF() || T.isOSAIX()) { + if (T.isOSBinFormat

[clang] clang/HIP: Remove some unused ocml function declarations (PR #128022)

2025-02-20 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm ready_for_review https://github.com/llvm/llvm-project/pull/128022 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][WIP] Trivial relocation (PR #127636)

2025-02-20 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/127636 >From 9d2fd12df5ad75bd4bc0e5c46821b820fb55cdbb Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Tue, 18 Feb 2025 14:37:32 +0100 Subject: [PATCH 1/4] [Clang][WIP] Trivial relocation --- .../clang/AST/CXXRec

[clang] clang/HIP: Remove some unused ocml function declarations (PR #128022)

2025-02-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Matt Arsenault (arsenm) Changes These should probably be dropped from the library. --- Full diff: https://github.com/llvm/llvm-project/pull/128022.diff 2 Files Affected: - (modified) clang/lib/Headers/__clang_hip_libdevice_declare

[clang] [HLSL] Constant buffers codegen (PR #124886)

2025-02-20 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/124886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-02-20 Thread Aaron Ballman via cfe-commits
@@ -980,6 +980,25 @@ def err_ptrauth_indirect_goto_addrlabel_arithmetic : Error< "%select{subtraction|addition}0 of address-of-label expressions is not " "supported with ptrauth indirect gotos">; +// __ptrauth qualifier +def err_ptrauth_qualifier_invalid : Error< + "%sele

[clang] [profile] runtime counter relocation is needed on windows-msvc targets (PR #127858)

2025-02-20 Thread Anh Tuyen Tran via cfe-commits
https://github.com/anhtuyenibm edited https://github.com/llvm/llvm-project/pull/127858 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-02-20 Thread Anton Korobeynikov via cfe-commits
@@ -803,17 +809,18 @@ class Qualifiers { static_assert(sizeof(PointerAuthQualifier) == sizeof(uint32_t), "PointerAuthQualifier must be 32 bits"); + static constexpr uint64_t PtrAuthShift = 32; + static constexpr uint64_t PtrAuthMask = uint64_t(0x) <

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-02-20 Thread Aaron Ballman via cfe-commits
@@ -9358,6 +9398,8 @@ def ext_typecheck_cond_pointer_integer_mismatch : ExtWarn< "pointer/integer type mismatch in conditional expression" "%diff{ ($ and $)|}0,1">, InGroup>; +def err_typecheck_cond_incompatible_ptrauth : Error< + "__ptrauth qualification mismatch%diff{

[clang] [flang] [flang][OpenMP] Upstream `do concurrent` loop-nest detection. (PR #127595)

2025-02-20 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/127595 >From 2e89efa197e7a5d3c27e33795781b1c25a123a8c Mon Sep 17 00:00:00 2001 From: ergawy Date: Wed, 5 Feb 2025 23:31:15 -0600 Subject: [PATCH 1/2] [flang][OpenMP] Upstream first part of `do concurrent` mapping This

[clang] clang/HIP: Remove some unused ocml function declarations (PR #128022)

2025-02-20 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 1c4e9863fa1cba6d28be92026e0912808b01780d c6c75b5d7a9a1869bfcdc413a98b00fe4b9f07d1 --e

[clang] [flang] [flang] Align `-x f95[-cpp-input]` language modes with `gfortran` (PR #127986)

2025-02-20 Thread Tarun Prabhu via cfe-commits
=?utf-8?q?I=C3=B1aki?= Amatria Barral Message-ID: In-Reply-To: tarunprabhu wrote: This looks ok to me, but please wait for others to approve. https://github.com/llvm/llvm-project/pull/127986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-02-20 Thread Mariya Podchishchaeva via cfe-commits
@@ -7919,3 +7919,38 @@ void CodeGenModule::moveLazyEmissionStates(CodeGenModule *NewBuilder) { NewBuilder->ABI->MangleCtx = std::move(ABI->MangleCtx); } + +bool CodeGenModule::classNeedsVectorDestructor(const CXXRecordDecl *RD) { + CXXDestructorDecl *Dtor = RD->getDestruct

[clang] [Clang] add -Wshift-bool warning to handle shifting of bool (PR #127336)

2025-02-20 Thread Oleksandr T. via cfe-commits
@@ -11246,6 +11246,12 @@ static void DiagnoseBadShiftValues(Sema& S, ExprResult &LHS, ExprResult &RHS, if (S.getLangOpts().OpenCL) return; + if (LHS.get()->IgnoreParenImpCasts()->getType()->isBooleanType()) { +S.Diag(Loc, diag::warn_shift_bool) +<< (Opc ==

[clang] [llvm] [CaptureTracking][FunctionAttrs] Add support for CaptureInfo (PR #125880)

2025-02-20 Thread Nikita Popov via cfe-commits
nikic wrote: I'm not sure whether this is related to the Windows issue or not, but I've found one miscompile in the interaction with callCapturesBefore: ``` ; RUN: opt -S -passes=memcpyopt < %s declare void @foo(ptr) define void @test(ptr noalias writable dereferenceable(4) %p) { %a = alloca

[clang] [Clang] add -Wshift-bool warning to handle shifting of bool (PR #127336)

2025-02-20 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk edited https://github.com/llvm/llvm-project/pull/127336 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-02-20 Thread Aaron Ballman via cfe-commits
@@ -2150,6 +2153,15 @@ llvm::Constant *ConstantLValueEmitter::tryEmit() { value = applyOffset(value); } + // Apply pointer-auth signing from the destination type. + if (PointerAuthQualifier PointerAuth = DestType.getPointerAuth()) { +if (!result.HasDestPointerAuth)

[clang] [CMake] Fix variable name (PR #127967)

2025-02-20 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek closed https://github.com/llvm/llvm-project/pull/127967 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-02-20 Thread Mariya Podchishchaeva via cfe-commits
@@ -1592,8 +1666,12 @@ namespace { bool ReturnAfterDelete) { llvm::BasicBlock *callDeleteBB = CGF.createBasicBlock("dtor.call_delete"); llvm::BasicBlock *continueBB = CGF.createBasicBlock("dtor.continue"); -llvm::Value *ShouldCal

[clang] 81ed485 - [CMake] Fix variable name (#127967)

2025-02-20 Thread via cfe-commits
Author: Petr Hosek Date: 2025-02-20T08:22:14-08:00 New Revision: 81ed48531d51754fe4aac7a149ee4534a9ffda1b URL: https://github.com/llvm/llvm-project/commit/81ed48531d51754fe4aac7a149ee4534a9ffda1b DIFF: https://github.com/llvm/llvm-project/commit/81ed48531d51754fe4aac7a149ee4534a9ffda1b.diff LO

[clang] [llvm] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-20 Thread Hans Wennborg via cfe-commits
zmodem wrote: I pushed a sketch of what using an intrinsic instead would look like. What do you think? https://github.com/llvm/llvm-project/pull/127653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [analyzer] Do list initialization for CXXNewExpr with initializer list arg (PR #127702)

2025-02-20 Thread Michael Flanders via cfe-commits
@@ -254,6 +254,200 @@ void foo() { } } // namespace CXX17_aggregate_construction +namespace newexpr_init_list_initialization { +struct S { + int foo; + int bar; +}; +void none_designated() { + S *s = new S{13,1}; + clang_analyzer_eval(13 == s->foo); // expected-warning{{TR

[clang] [profile] runtime counter relocation is needed on windows-msvc targets (PR #127858)

2025-02-20 Thread Anh Tuyen Tran via cfe-commits
@@ -6,6 +6,7 @@ // RUN: %clang --target=powerpc64-ibm-aix -fprofile-generate -fprofile-continuous -### -c %s 2>&1 | FileCheck %s --check-prefix=RELOC // RUN: %clang --target=x86_64-unknown-fuchsia -fprofile-generate -fprofile-continuous -### -c %s 2>&1 | FileCheck %s --check

[libclc] [libclc] Move logb/ilogb to CLC library; optimize (PR #128028)

2025-02-20 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/128028 This commit moves the logb and ilogb builtins to the CLC library. It simultaneously optimizes them both for vector types and for half types. Vector types were being scalarized in some cases. Half types were

[libclc] [libclc] Move logb/ilogb to CLC library; optimize (PR #128028)

2025-02-20 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,73 @@ +#if __CLC_FPSIZE == 32 + +_CLC_OVERLOAD _CLC_DEF __CLC_INTN __clc_ilogb(__CLC_GENTYPE x) { + __CLC_UINTN ux = __CLC_AS_UINTN(x); arsenm wrote: This should be implemented in terms of frexp and avoid relying on the exponent bits. Something like

[clang] [CMake] Fix variable name (PR #127967)

2025-02-20 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-arm-ubuntu` running on `linaro-lldb-arm-ubuntu` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/18/builds/11773 Here is the relevant piece of the build lo

[libclc] [libclc] Move logb/ilogb to CLC library; optimize (PR #128028)

2025-02-20 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,73 @@ +#if __CLC_FPSIZE == 32 + +_CLC_OVERLOAD _CLC_DEF __CLC_INTN __clc_ilogb(__CLC_GENTYPE x) { + __CLC_UINTN ux = __CLC_AS_UINTN(x); arsenm wrote: although I guess this better if you have a dedicated frexp_exp instruction. Could factor out the fre

[clang] [flang] [flang][OpenMP] Upstream `do concurrent` loop-nest detection. (PR #127595)

2025-02-20 Thread Pranav Bhandarkar via cfe-commits
https://github.com/bhandarkar-pranav approved this pull request. Microminor nit. Ignore, if no other reviewers have requested changes. https://github.com/llvm/llvm-project/pull/127595 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [flang] [flang][OpenMP] Upstream `do concurrent` loop-nest detection. (PR #127595)

2025-02-20 Thread Pranav Bhandarkar via cfe-commits
@@ -0,0 +1,234 @@ +//===- DoConcurrentConversion.cpp -- map `DO CONCURRENT` to OpenMP loops --===// +// +// 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: Ap

[clang] [flang] [flang][OpenMP] Upstream `do concurrent` loop-nest detection. (PR #127595)

2025-02-20 Thread Pranav Bhandarkar via cfe-commits
https://github.com/bhandarkar-pranav edited https://github.com/llvm/llvm-project/pull/127595 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Bail out on constexpr unknown values in ConstantEmitter (PR #127525)

2025-02-20 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/127525 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 02e8fd7 - [ARM,AArch64] Fix ABI bugs with over-sized bitfields (#126774)

2025-02-20 Thread via cfe-commits
Author: Oliver Stannard Date: 2025-02-20T17:07:16Z New Revision: 02e8fd7a30903d65c85b3cfb56e8039b71c31972 URL: https://github.com/llvm/llvm-project/commit/02e8fd7a30903d65c85b3cfb56e8039b71c31972 DIFF: https://github.com/llvm/llvm-project/commit/02e8fd7a30903d65c85b3cfb56e8039b71c31972.diff LO

[clang] [ARM, AArch64] Fix ABI bugs with over-sized bitfields (PR #126774)

2025-02-20 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard closed https://github.com/llvm/llvm-project/pull/126774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Added warn-assignment-bool-context (PR #115234)

2025-02-20 Thread Erich Keane via cfe-commits
@@ -8477,6 +8477,9 @@ def err_incomplete_object_call : Error< def warn_condition_is_assignment : Warning<"using the result of an " "assignment as a condition without parentheses">, InGroup; +def warn_assignment_bool_context : Warning<"suggest parentheses around assignment

[clang] [Clang][CodeGen] Bail out on constexpr unknown values in ConstantEmitter (PR #127525)

2025-02-20 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM modulo nit. No changelog needed, this sould be backported to clang 20, it's a fairly severe regression. I wonder if there are other places where we let constexpr-unknown references escapes and if there are cases where they should not

[clang] [clang] Implement instantiation context note for checking template parameters (PR #126088)

2025-02-20 Thread Matheus Izvekov via cfe-commits
@@ -5294,10 +5294,14 @@ def err_template_missing_args : Error< "%select{class template|function template|variable template|alias template|" "template template parameter|concept|template}0 %1 requires template " "arguments">; -def err_template_arg_list_different_arity : Er

[clang] [clang] Implement instantiation context note for checking template parameters (PR #126088)

2025-02-20 Thread Matheus Izvekov via cfe-commits
@@ -11802,9 +11817,10 @@ class Sema final : public SemaBase { bool PartialOrdering, bool *StrictPackMatch); + SmallString<128> toTerseString(const NamedDecl &D) const; mizvekov wrote:

[clang] [Clang][WIP] Trivial relocation (PR #127636)

2025-02-20 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/127636 >From 9d2fd12df5ad75bd4bc0e5c46821b820fb55cdbb Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Tue, 18 Feb 2025 14:37:32 +0100 Subject: [PATCH 1/5] [Clang][WIP] Trivial relocation --- .../clang/AST/CXXRec

[clang] f7a10f0 - [Index] Un-XFAIL test with msan

2025-02-20 Thread Vitaly Buka via cfe-commits
Author: Vitaly Buka Date: 2025-02-20T09:41:00-08:00 New Revision: f7a10f0e8d46085cfebfbd53c3ab19a5ab37774f URL: https://github.com/llvm/llvm-project/commit/f7a10f0e8d46085cfebfbd53c3ab19a5ab37774f DIFF: https://github.com/llvm/llvm-project/commit/f7a10f0e8d46085cfebfbd53c3ab19a5ab37774f.diff L

[clang] [Clang][WIP] Trivial relocation (PR #127636)

2025-02-20 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/127636 >From 9d2fd12df5ad75bd4bc0e5c46821b820fb55cdbb Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Tue, 18 Feb 2025 14:37:32 +0100 Subject: [PATCH 1/5] [Clang][WIP] Trivial relocation --- .../clang/AST/CXXRec

[clang] [Clang] Add __has_target_builtin macro (PR #126324)

2025-02-20 Thread Joseph Huber via cfe-commits
jhuber6 wrote: I'd vote for fixing the CUDA on Arm case that failed in the meantime, then make a decision as to whether or not we should go back to `__has_builtin` only returning the current compilation target once that's gone. https://github.com/llvm/llvm-project/pull/126324 _

[clang] [Clang][WIP] Trivial relocation (PR #127636)

2025-02-20 Thread via cfe-commits
cor3ntin wrote: - [ ] extension warnings for the keywords - [ ] changelog - [ ] cxx_status page https://github.com/llvm/llvm-project/pull/127636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [Clang] Implement the core language parts of P2786 - Trivial relocation (PR #127636)

2025-02-20 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/127636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement the core language parts of P2786 - Trivial relocation (PR #127636)

2025-02-20 Thread via cfe-commits
https://github.com/cor3ntin ready_for_review https://github.com/llvm/llvm-project/pull/127636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __has_target_builtin macro (PR #126324)

2025-02-20 Thread Nick Sarnie via cfe-commits
sarnex wrote: @AaronBallman What do you recommend for next steps here? Should we wait until GCC makes a decision in [this issue](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118882)? https://github.com/llvm/llvm-project/pull/126324 ___ cfe-commits ma

[clang] [Clang] Implement the core language parts of P2786 - Trivial relocation (PR #127636)

2025-02-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes This adds - The parsing of `trivially_relocatable_if_eligible`, `replaceable_if_eligible` keywords - `__builtin_trivially_relocate`, implemented in terms of memmove. In the f

[clang] [Clang] Implement the core language parts of P2786 - Trivial relocation (PR #127636)

2025-02-20 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/127636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Bail out on constexpr unknown values in ConstantEmitter (PR #127525)

2025-02-20 Thread via cfe-commits
@@ -1883,8 +1883,10 @@ llvm::Constant *ConstantEmitter::tryEmitPrivateForVarInit(const VarDecl &D) { // Try to emit the initializer. Note that this can allow some things that // are not allowed by tryEmitPrivateForMemory alone. - if (APValue *value = D.evaluateValue())

[clang] [clang][NFC] Update isAuxBuiltinID comment (PR #128038)

2025-02-20 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex created https://github.com/llvm/llvm-project/pull/128038 None >From e866ecff509662fd1f9942fb415291d43e20ee31 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Thu, 20 Feb 2025 09:52:35 -0800 Subject: [PATCH] [clang][NFC] Update isAuxBuiltinID comment Signed-off-by:

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcilia (Large Immediate Arithmetic) extension (PR #124706)

2025-02-20 Thread Craig Topper via cfe-commits
@@ -326,6 +326,7 @@ enum OperandType : unsigned { OPERAND_SIMM12, OPERAND_SIMM12_LSB0, OPERAND_SIMM26, + OPERAND_IMM32, topperc wrote: Since allowing 32-bit immediates for RV32 is common and the MCInst will always store int<32>, should this be `OPE

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcilia (Large Immediate Arithmetic) extension (PR #124706)

2025-02-20 Thread Craig Topper via cfe-commits
@@ -34,6 +34,21 @@ def uimm11 : RISCVUImmLeafOp<11>; def simm26 : RISCVSImmLeafOp<26>; +// 32-bit Immediate, used by RV32 Instructions in 32-bit operations, so no +// sign-/zero-extension. This is represented internally as a signed 32-bit value. +def imm32 : RISCVOp { + let

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcilia (Large Immediate Arithmetic) extension (PR #124706)

2025-02-20 Thread Craig Topper via cfe-commits
@@ -0,0 +1,117 @@ +# Xqcilia - Qualcomm uC Large Immediate Arithmetic extension +# RUN: not llvm-mc -triple riscv32 -mattr=+experimental-xqcilia < %s 2>&1 \ +# RUN: | FileCheck -check-prefixes=CHECK,CHECK-PLUS,CHECK-IMM %s +# RUN: not llvm-mc -triple riscv32 -mattr=-experiment

[clang] [clang][NFC] Update isAuxBuiltinID comment (PR #128038)

2025-02-20 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex ready_for_review https://github.com/llvm/llvm-project/pull/128038 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __has_target_builtin macro (PR #126324)

2025-02-20 Thread Nick Sarnie via cfe-commits
@@ -1819,8 +1822,12 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { // usual allocation and deallocation functions. Required by libc++ return 201802; default: + // __has_target_builtin should return false for aux buil

[clang] [clang][NFC] Update isAuxBuiltinID comment (PR #128038)

2025-02-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nick Sarnie (sarnex) Changes Clarify behavior of the function when the builtin is also supported on the main target. Based on feedback from https://github.com/llvm/llvm-project/pull/126324 --- Full diff: https://github.com/llvm/llvm-proje

[clang] [Clang][CodeGen] Bail out on constexpr unknown values in ConstantEmitter (PR #127525)

2025-02-20 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: Does it even make sense for evaluateValue to return a constexpr-unknown value? If I'm following correctly, we can't actually do anything useful with such a result: we don't actually know what the value is. It would make things simpler if we kept su

[clang] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)

2025-02-20 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/119387 >From 8781ff2355750ae61d140620b1f6862537de07e3 Mon Sep 17 00:00:00 2001 From: gbMattN Date: Tue, 10 Dec 2024 15:01:37 + Subject: [PATCH 01/11] [ASan] Add metadata to renamed instructions so ASan doesn't

[clang] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)

2025-02-20 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/119387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Assembler support for XRivosVizip (PR #127694)

2025-02-20 Thread Craig Topper via cfe-commits
@@ -0,0 +1,27 @@ +//===-- RISCVInstrInfoXRivos.td --*- tablegen -*-===// topperc wrote: Pad this with more dashes to 80 characters https://github.com/llvm/llvm-project/pull/127694 ___ cfe-commit

[clang] [clang][NFC] Update isAuxBuiltinID comment (PR #128038)

2025-02-20 Thread Erich Keane via cfe-commits
@@ -408,7 +408,9 @@ class Context { unsigned getRequiredVectorWidth(unsigned ID) const; - /// Return true if builtin ID belongs to AuxTarget. + /// Return true if builtin ID belongs to only the AuxTarget. erichkeane wrote: Perhaps, "Return true if the bu

[clang] [llvm] [RISCV] Assembler support for XRivosVizip (PR #127694)

2025-02-20 Thread Craig Topper via cfe-commits
@@ -0,0 +1,27 @@ +//===-- RISCVInstrInfoXRivos.td --*- tablegen -*-===// +// +// 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: Apache

[clang] [Clang] Implement the core language parts of P2786 - Trivial relocation (PR #127636)

2025-02-20 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/127636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Update isAuxBuiltinID comment (PR #128038)

2025-02-20 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/128038 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-02-20 Thread Mariya Podchishchaeva via cfe-commits
@@ -448,7 +453,8 @@ class ItaniumCXXABI : public CodeGen::CGCXXABI { if (!IsInlined) continue; - StringRef Name = CGM.getMangledName(VtableComponent.getGlobalDecl()); + StringRef Name = + CGM.getMangledName(VtableComponent.getGlobalDecl(fa

[clang] [Clang] Add __has_target_builtin macro (PR #126324)

2025-02-20 Thread Nick Sarnie via cfe-commits
@@ -1819,8 +1822,12 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { // usual allocation and deallocation functions. Required by libc++ return 201802; default: + // __has_target_builtin should return false for aux buil

[clang] [clang][NFC] Update isAuxBuiltinID comment (PR #128038)

2025-02-20 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/128038 >From e866ecff509662fd1f9942fb415291d43e20ee31 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Thu, 20 Feb 2025 09:52:35 -0800 Subject: [PATCH 1/2] [clang][NFC] Update isAuxBuiltinID comment Signed-off-by: S

[clang] [llvm] [AArch64][SVE] Lower unpredicated loads/stores as LDR/STR. (PR #127837)

2025-02-20 Thread Paul Walker via cfe-commits
paulwalker-arm wrote: I see what you mean. I was concerned because the SVE variant makes special mention of it but when looking as the pseudo code for the NEON variants I agree they look consistent. Sorry for the confusion. https://github.com/llvm/llvm-project/pull/127837 ___

[clang] [clang][NFC] Update isAuxBuiltinID comment (PR #128038)

2025-02-20 Thread Nick Sarnie via cfe-commits
@@ -408,7 +408,9 @@ class Context { unsigned getRequiredVectorWidth(unsigned ID) const; - /// Return true if builtin ID belongs to AuxTarget. + /// Return true if builtin ID belongs to only the AuxTarget. sarnex wrote: sure, applied this in latest commit

[clang] [Clang] Add __has_target_builtin macro (PR #126324)

2025-02-20 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/126324 >From 46cce74568bca5a3e80e50def4348bc734448362 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Fri, 7 Feb 2025 14:57:12 -0800 Subject: [PATCH 01/10] [Clang] Add __has_target_builtin macro Signed-off-by: Sarn

[clang] [Clang] Add __has_target_builtin macro (PR #126324)

2025-02-20 Thread Erich Keane via cfe-commits
@@ -1819,8 +1822,12 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { // usual allocation and deallocation functions. Required by libc++ return 201802; default: + // __has_target_builtin should return false for aux buil

[clang] [HLSL] Implement the 'and' HLSL function (PR #127098)

2025-02-20 Thread Deric Cheung via cfe-commits
@@ -0,0 +1,23 @@ +// RUN: %clang_cc1 -finclude-default-header -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s \ +// RUN: -emit-llvm -O1 -verify Icohedron wrote: Yes, I will make a PR to fix this https://github.com/llvm/llvm-project/pull/127098 _

[clang] [HLSL] Constant buffers codegen (PR #124886)

2025-02-20 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,201 @@ +//===- HLSLTargetInto.cpp--===// +// +// 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: Ap

[clang] [NFC] Add release notes for -Wunsafe-buffer-usage-in-libc-call (PR #126975)

2025-02-20 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 closed https://github.com/llvm/llvm-project/pull/126975 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __has_target_builtin macro (PR #126324)

2025-02-20 Thread Nick Sarnie via cfe-commits
@@ -1819,8 +1822,12 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { // usual allocation and deallocation functions. Required by libc++ return 201802; default: + // __has_target_builtin should return false for aux buil

[clang] [clang][NFC] Update isAuxBuiltinID comment (PR #128038)

2025-02-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/128038 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2a7d3f0 - [NFC] Add release notes for -Wunsafe-buffer-usage-in-libc-call (#126975)

2025-02-20 Thread via cfe-commits
Author: Ziqing Luo Date: 2025-02-20T10:27:07-08:00 New Revision: 2a7d3f055d4ea86354e314c5cd1f682a4ad5853f URL: https://github.com/llvm/llvm-project/commit/2a7d3f055d4ea86354e314c5cd1f682a4ad5853f DIFF: https://github.com/llvm/llvm-project/commit/2a7d3f055d4ea86354e314c5cd1f682a4ad5853f.diff LO

[clang] 19af858 - [HLSL] Constant Buffers CodeGen (#124886)

2025-02-20 Thread via cfe-commits
Author: Helena Kotas Date: 2025-02-20T10:32:14-08:00 New Revision: 19af8581d51b8144f6d041ae1d948443084d8d0b URL: https://github.com/llvm/llvm-project/commit/19af8581d51b8144f6d041ae1d948443084d8d0b DIFF: https://github.com/llvm/llvm-project/commit/19af8581d51b8144f6d041ae1d948443084d8d0b.diff

[clang] [clang][WebAssembly] Always have `-pthread` imply `--shared-memory` linker flag (PR #127939)

2025-02-20 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 updated https://github.com/llvm/llvm-project/pull/127939 >From 19e0415bfefa7724b8149e95a86adf960d786673 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Wed, 19 Feb 2025 17:26:41 -0800 Subject: [PATCH] [clang][WebAssembly] Always have `-pthread` imply `--shared-memory`

[clang] [clang][WebAssembly] Always have `-pthread` imply `--shared-memory` linker flag (PR #127939)

2025-02-20 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 updated https://github.com/llvm/llvm-project/pull/127939 >From e788e756cac0c7b6f78479adbaea1a86f8005fb6 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Wed, 19 Feb 2025 17:26:41 -0800 Subject: [PATCH] [clang][WebAssembly] Always have `-pthread` imply `--shared-memory`

[clang] [test] Remove `-emit-llvm` from the `and-errors.hlsl` test to avoid writing to a potentially write-protected directory (PR #128047)

2025-02-20 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron created https://github.com/llvm/llvm-project/pull/128047 @mikaelholmen [mentioned](https://github.com/llvm/llvm-project/pull/127098#discussion_r1962897888) that the `-emit-llvm` argument isn't necessary for the `and-errors.hlsl` test and may cause issues due to wr

[clang] [test] Remove `-emit-llvm` from the `and-errors.hlsl` test to avoid writing to a potentially write-protected directory (PR #128047)

2025-02-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Deric Cheung (Icohedron) Changes @mikaelholmen [mentioned](https://github.com/llvm/llvm-project/pull/127098#discussion_r1962897888) that the `-emit-llvm` argument isn't necessary for the `and-errors.hlsl` test and may cause issues due to

[clang] [HLSL] Constant buffers codegen (PR #124886)

2025-02-20 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/124886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [profile] runtime counter relocation is needed on windows-msvc targets (PR #127858)

2025-02-20 Thread Wael Yehia via cfe-commits
@@ -6,6 +6,7 @@ // RUN: %clang --target=powerpc64-ibm-aix -fprofile-generate -fprofile-continuous -### -c %s 2>&1 | FileCheck %s --check-prefix=RELOC // RUN: %clang --target=x86_64-unknown-fuchsia -fprofile-generate -fprofile-continuous -### -c %s 2>&1 | FileCheck %s --check

[clang] [clang-tools-extra] [compiler-rt] [Clang] [NFC] Fix more `-Wreturn-type` warnings in tests everywhere (PR #123470)

2025-02-20 Thread via cfe-commits
Sirraide wrote: > (it means we don't have to question whether the return type mattered > elsewhere in the tests). Yeah, that’s the main reason I opted for adding a `return` statement in a lot of cases. https://github.com/llvm/llvm-project/pull/123470 __

[clang] clang/HIP: Remove some unused ocml function declarations (PR #128022)

2025-02-20 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: what if some HIP apps use them? Should we add deprecated attribute to them then remove them in the next release? https://github.com/llvm/llvm-project/pull/128022 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-02-20 Thread Mariya Podchishchaeva via cfe-commits
@@ -1407,6 +1413,8 @@ llvm::GlobalValue::LinkageTypes MicrosoftCXXABI::getCXXDestructorLinkage( // and are emitted everywhere they are used. They are internal if the class // is internal. return llvm::GlobalValue::LinkOnceODRLinkage; + case Dtor_VectorDeleting: +

<    1   2   3   4   5   >