[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-07-17 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/131995 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix potential constant expression checking with constexpr-unknown. (PR #149227)

2025-07-17 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: /cherry-pick 6a60f18997d62b0e2842a921fcb6beb3e52ed823 https://github.com/llvm/llvm-project/pull/149227 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix potential constant expression checking with constexpr-unknown. (PR #149227)

2025-07-17 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic closed https://github.com/llvm/llvm-project/pull/149227 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix potential constant expression checking with constexpr-unknown. (PR #149227)

2025-07-17 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/149227 >From 9ce04c82fdeb47e337ba47655fd8f626b57313c2 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Wed, 16 Jul 2025 16:58:03 -0700 Subject: [PATCH 1/2] [clang] Fix potential constant expression checking with

[clang] Ensure proper NULL macro definition for system include files. (PR #149176)

2025-07-17 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > are you saying that you have a strong preference to not handle locale.h (for > example) for non-AIX environments? Yes. You know exactly which AIX headers define NULL, and because IBM also ships the AIX headers, you can ensure no future version of the headers changes th

[clang] Ensure proper NULL macro definition for system include files. (PR #149176)

2025-07-17 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,15 @@ +// There are at least 2 valid C null-pointer constants as defined +// by the C language standard. +// Test that the macro NULL is defined consistently for all platforms by +// those headers that the C standard mandates a macro definition for NULL. + +// RUN: %cla

[clang] [Clang][CodeGen][X86] don't coerce int128 into `{i64,i64}` for SysV-like ABIs (PR #135230)

2025-07-17 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic closed https://github.com/llvm/llvm-project/pull/135230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Ensure proper NULL macro definition for system include files. (PR #149176)

2025-07-17 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: I guess... if you think this is what's best for AIX, I'm not going to argue very hard about it, but I don't really want to entangle every other operating system in this. The current situation is mostly stable. What logic did you use to decide which

[clang] Ensure proper NULL macro definition for system include files. (PR #149176)

2025-07-17 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,15 @@ +// There are at least 2 valid C null-pointer constants as defined +// by the C language standard. +// Test that the macro NULL is defined consistently for all platforms by +// those headers that the C standard mandates a macro definition for NULL. + +// RUN: %cla

[clang] Ensure proper NULL macro definition for system include files. (PR #149176)

2025-07-17 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/149176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Fix Windows EH IP2State tables (remove +1 bias) (PR #144745)

2025-07-16 Thread Eli Friedman via cfe-commits
@@ -37,9 +37,11 @@ cond.end: ; preds = %entry, %cond.true ; CHECK: testq ; CHECK: je ; CHECK: callq alloc +; CHECK-NEXT: nop efriedma-quic wrote: > No IP2State table mean no need to insert NOPs at all, even for SEH, rig

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-07-16 Thread Eli Friedman via cfe-commits
@@ -847,6 +848,14 @@ of different sizes and signs is forbidden in binary and ternary builtins. semantics, see `LangRef

[clang] [NFC] Remove getDefaultCallingConvention IsBuiltin (PR #145904)

2025-07-15 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/145904 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang] Fix version for symbol clang_visitCXXMethods (PR #148958)

2025-07-15 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic milestoned https://github.com/llvm/llvm-project/pull/148958 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang] Fix version for symbol clang_visitCXXMethods (PR #148958)

2025-07-15 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic created https://github.com/llvm/llvm-project/pull/148958 Happened to spot this while looking at libclang.map for other reasons. clang_visitCXXMethods was added in LLVM 21, not LLVM 20. >From 3f9e2f11f547201946213e06fe3ec1ea0df45bc3 Mon Sep 17 00:00:00 2001 From

[clang] [flang] [llvm] [Clang] Remove ARCMigrate (PR #119269)

2025-07-15 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Return NULL, I guess; that's how the error handling for those methods used to work. https://github.com/llvm/llvm-project/pull/119269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [flang] [llvm] [Clang] Remove ARCMigrate (PR #119269)

2025-07-15 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I don't know that we've had to deal with the underling functionality for anything in libclang getting removed before; we're usually pretty conservative with what we add in the first place. Maybe we should stub out the methods so they always fail? https://github.com/llvm/l

[clang] [clang] Fix pointer comparisons between pointers to constexpr-unknown (PR #147663)

2025-07-15 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: /cherry-pick 20c8e3c2a4744524396cc473a370cfb7855850b6 https://github.com/llvm/llvm-project/pull/147663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix pointer comparisons between pointers to constexpr-unknown (PR #147663)

2025-07-15 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic milestoned https://github.com/llvm/llvm-project/pull/147663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix pointer comparisons between pointers to constexpr-unknown (PR #147663)

2025-07-15 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic closed https://github.com/llvm/llvm-project/pull/147663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix pointer comparisons between pointers to constexpr-unknown (PR #147663)

2025-07-15 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/147663 >From 1e51f7bd82fe91d6d13bee6f634d7401a3ddbc8a Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Tue, 8 Jul 2025 23:35:26 -0700 Subject: [PATCH 1/2] [clang] Fix pointer comparisons between pointers to con

[clang] [Clang] fix crash in codegen caused by deferred asm diagnostics under -fopenmp (PR #147163)

2025-07-14 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: There's one other possibility... you could make "deferred" diagnostics not defer diagnosing quite so much. If the function is defined in a way that it inherently must be emitted, or it's already been odr-used, there's no point to actually deferring the diagnostic: we know

[clang] [clang] Fix isConstantInitializer handling of transparent init lists. (PR #148030)

2025-07-13 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic closed https://github.com/llvm/llvm-project/pull/148030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix isConstantInitializer handling of transparent init lists. (PR #148030)

2025-07-13 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/148030 >From 5c279209bff277e008866e5d5e5192cf99cdcf8d Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Thu, 10 Jul 2025 11:37:50 -0700 Subject: [PATCH 1/2] [clang] Fix isConstantInitializer handling of transpare

[clang] [clang] Fix pointer comparisons between pointers to constexpr-unknown (PR #147663)

2025-07-11 Thread Eli Friedman via cfe-commits
@@ -14544,6 +14538,23 @@ EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, (LHSValue.Base && isZeroSized(RHSValue))) return DiagComparison( diag::note_constexpr_pointer_comparison_zero_sized); + // A constexpr-unknown

[clang] [clang] Fix pointer comparisons between pointers to constexpr-unknown (PR #147663)

2025-07-11 Thread Eli Friedman via cfe-commits
@@ -14544,6 +14538,23 @@ EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, (LHSValue.Base && isZeroSized(RHSValue))) return DiagComparison( diag::note_constexpr_pointer_comparison_zero_sized); + // A constexpr-unknown

[clang] [llvm] Fix Windows EH IP2State tables (remove +1 bias) (PR #144745)

2025-07-11 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Actually, thinking about it, maybe we should just do the nop insertion for UEFI targets. The UEFI environment is very similar to Windows. CC @Prabhuk . https://github.com/llvm/llvm-project/pull/144745 ___ cfe-commits mailing lis

[clang] [llvm] Fix Windows EH IP2State tables (remove +1 bias) (PR #144745)

2025-07-11 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: You might need to edit the FileCheck commands for the UEFI tests so there's a non-overlapping prefix it can use. (When two outputs in the same test file are different, FileCheck usually splits the emitted checks on a per-function basis.) https://github.com/llvm/llvm-proje

[clang] [Clang] fix crash in codegen caused by deferred asm diagnostics under -fopenmp (PR #147163)

2025-07-11 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I don't think we want to use the "isInvalidDecl" bit here. The declaration is still valid in the sense that code referring to the declaration should treat it normally. (For example, we want overload resolution to work the same way it usually does.) One way to think of t

[clang] [llvm] Fix Windows EH IP2State tables (remove +1 bias) (PR #144745)

2025-07-11 Thread Eli Friedman via cfe-commits
@@ -37,9 +37,11 @@ cond.end: ; preds = %entry, %cond.true ; CHECK: testq ; CHECK: je ; CHECK: callq alloc +; CHECK-NEXT: nop efriedma-quic wrote: There is no handler? This function doesn't contain any exception-handlin

[clang] [llvm] Fix Windows EH IP2State tables (remove +1 bias) (PR #144745)

2025-07-11 Thread Eli Friedman via cfe-commits
@@ -84,12 +84,12 @@ define void @pr66984(ptr %arg) personality ptr @__CxxFrameHandler3 { ; X86_64-NEXT:movq %rcx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill ; X86_64-NEXT: .Ltmp0: ; X86_64-NEXT:callq throw +; X86_64-NEXT:nop efriedma-quic wrote: I t

[clang] [clang] Fix pointer comparisons between pointers to constexpr-unknown (PR #147663)

2025-07-11 Thread Eli Friedman via cfe-commits
@@ -14544,6 +14538,23 @@ EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, (LHSValue.Base && isZeroSized(RHSValue))) return DiagComparison( diag::note_constexpr_pointer_comparison_zero_sized); + // A constexpr-unknown

[clang] [clang] Fix a crash when dynamic_cast-ing to a `final` class (PR #148088)

2025-07-11 Thread Eli Friedman via cfe-commits
@@ -2341,8 +2341,15 @@ llvm::Value *CodeGenFunction::EmitDynamicCast(Address ThisAddr, } else if (IsExact) { // If the destination type is effectively final, this pointer points to the // right type if and only if its vptr has the right value. -Value = CGM.getCXX

[clang] [llvm] Fix Windows EH IP2State tables (remove +1 bias) (PR #144745)

2025-07-11 Thread Eli Friedman via cfe-commits
@@ -84,12 +84,12 @@ define void @pr66984(ptr %arg) personality ptr @__CxxFrameHandler3 { ; X86_64-NEXT:movq %rcx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill ; X86_64-NEXT: .Ltmp0: ; X86_64-NEXT:callq throw +; X86_64-NEXT:nop efriedma-quic wrote: Sho

[clang] [llvm] Fix Windows EH IP2State tables (remove +1 bias) (PR #144745)

2025-07-11 Thread Eli Friedman via cfe-commits
@@ -37,9 +37,11 @@ cond.end: ; preds = %entry, %cond.true ; CHECK: testq ; CHECK: je ; CHECK: callq alloc +; CHECK-NEXT: nop efriedma-quic wrote: Do we actually need a nop here? As far as I can tell, msvc doesn't inser

[clang] [llvm] Fix Windows EH IP2State tables (remove +1 bias) (PR #144745)

2025-07-11 Thread Eli Friedman via cfe-commits
@@ -101,7 +101,8 @@ define void @f5() "frame-pointer"="all" { ; CHECK-NEXT:.seh_endprologue ; CHECK-NEXT:leaq -92(%rbp), %rcx ; CHECK-NEXT:callq external -; CHECK-NEXT:nop +; UEFI does not have SEH, so does not require NOP +; WIN64-NEXT:nop

[clang] [clang][RISCV] Fix crash on VLS calling convention (PR #145489)

2025-07-10 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: I'm not really happy with the way the code is organized for "coerced" load/store involving scalable types. At the point where we're analyzing the calling convention; we have a bunch of information: exactly what kind of coercion we're doing, whether t

[clang] [clang] Fix isConstantInitializer handling of transparent init lists. (PR #148030)

2025-07-10 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic created https://github.com/llvm/llvm-project/pull/148030 Transparent InitListExprs have different semantics, so special-case them in Expr::isConstantInitializer. We probably should move away from isConstantInitializer, in favor of relying more directly on cons

[clang] [Clang] fix crash in codegen caused by deferred asm diagnostics under -fopenmp (PR #147163)

2025-07-10 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > Deferred errors only, though, right? Deferred unrecoverable errors, yes. > Do we know if there are any cases where we defer the diagnostic because we > may later decide it's not an error and thus codegen would be fine? As far as I can tell, targetDiag() works on a per-

[clang] [Clang] fix crash in codegen caused by deferred asm diagnostics under -fopenmp (PR #147163)

2025-07-09 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I think calling targetDiag() should stop codegen. And if that works correctly, this patch is unnecessary. https://github.com/llvm/llvm-project/pull/147163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [clang] Fix pointer comparisons between pointers to constexpr-unknown (PR #147663)

2025-07-08 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic created https://github.com/llvm/llvm-project/pull/147663 A constexpr-unknown reference can be equal to an arbitrary value, except values allocated during constant evaluation. Fix the handling. The standard is unclear exactly which pointer comparisons count as "

[clang] [llvm] Fix Windows EH IP2State tables (remove +1 bias) (PR #144745)

2025-07-08 Thread Eli Friedman via cfe-commits
@@ -9,7 +9,6 @@ define i32 @foobar() gc "statepoint-example" personality ptr @__gxx_personality_ ; CHECK-NEXT:.seh_endprologue ; CHECK-NEXT:callq bar ; CHECK-NEXT: .Ltmp0: -; CHECK-NEXT:nop efriedma-quic wrote: Looking a bit more, if you drop the

[clang] [llvm] Fix Windows EH IP2State tables (remove +1 bias) (PR #144745)

2025-07-08 Thread Eli Friedman via cfe-commits
@@ -9,7 +9,6 @@ define i32 @foobar() gc "statepoint-example" personality ptr @__gxx_personality_ ; CHECK-NEXT:.seh_endprologue ; CHECK-NEXT:callq bar ; CHECK-NEXT: .Ltmp0: -; CHECK-NEXT:nop efriedma-quic wrote: So the conclusion here is this part

[clang] [llvm] Fix Windows EH IP2State tables (remove +1 bias) (PR #144745)

2025-07-08 Thread Eli Friedman via cfe-commits
@@ -2537,26 +2538,6 @@ void X86AsmPrinter::emitInstruction(const MachineInstr *MI) { case X86::SEH_BeginEpilogue: { assert(MF->hasWinCFI() && "SEH_ instruction in function without WinCFI?"); -// Windows unwinder will not invoke function's exception handler if IP is

[clang] [llvm] Fix Windows EH IP2State tables (remove +1 bias) (PR #144745)

2025-07-08 Thread Eli Friedman via cfe-commits
@@ -2660,6 +2644,133 @@ void X86AsmPrinter::emitCallInstruction(const llvm::MCInst &MCI) { OutStreamer->emitInstruction(MCI, getSubtargetInfo()); } +// Checks whether a NOP is required after a CALL and inserts the NOP, if +// necessary. +void X86AsmPrinter::emitNopAfterCall

[clang] [clang] Consistently handle consteval constructors for variables. (PR #144970)

2025-07-08 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic closed https://github.com/llvm/llvm-project/pull/144970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Consistently handle consteval constructors for variables. (PR #144970)

2025-07-08 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/144970 >From b1f7402423af22b0ea8cdf0b3d3734bcce68a636 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Thu, 19 Jun 2025 18:29:49 -0700 Subject: [PATCH 1/2] [clang] Consistently handle consteval constructors for

[clang] [Clang] fix crash in codegen caused by deferred asm diagnostics under -fopenmp (PR #147163)

2025-07-08 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: My understanding is that "recoverable" in this context means we can actually generate sensible IR for the construct. So no errors, except for warnings promoted to errors (or certain errors which don't impact IRGen/CFG analysis). And if that isn't what isUnrecoverable() i

[clang] [clang] Improve constexpr-unknown diagnostics. (PR #146288)

2025-07-07 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic closed https://github.com/llvm/llvm-project/pull/146288 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Consistently handle consteval constructors for variables. (PR #144970)

2025-07-07 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/144970 >From b1f7402423af22b0ea8cdf0b3d3734bcce68a636 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Thu, 19 Jun 2025 18:29:49 -0700 Subject: [PATCH 1/2] [clang] Consistently handle consteval constructors for

[clang] [llvm] __declspec(noshrinkwrap) support (PR #147397)

2025-07-07 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: As a practical matter, I don't think LLVM supports shrink-wrapping on Windows at the moment. I mean, I guess it's something someone could theoretically look into at some point, but the interaction with unwind info is complicated. Can we define what it means to "shrink-wra

[clang] [Clang] fix crash in codegen caused by deferred asm diagnostics under -fopenmp (PR #147163)

2025-07-07 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: We shouldn't have invalid decls unless we've emitted an error. If we're making some decision like "this function is an error if it's used as a host function", we should probably be marking the FunctionDecl explicitly with that decision, and CodeGen shouldn't try to emit su

[clang] [Clang] fix crash in codegen caused by deferred asm diagnostics under -fopenmp (PR #147163)

2025-07-07 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I haven't really thought about what the right strategy is for diagnostics here, specifically, but it looks like the OpenMP diagnostic suppression isn't working correctly. If there's an error in a function, that should stop CodeGen from seeing the function at all. If it's

[clang] [DebugInfo] Init DwarfVersion of MCOptions like the other. (PR #146666)

2025-07-03 Thread Eli Friedman via cfe-commits
@@ -51,6 +51,16 @@ // RUN: not %clang -target powerpc64-ibm-aix-xcoff -gdwarf-5 -S -emit-llvm -o - %s 2>&1| \ // RUN: FileCheck %s --check-prefix=UNSUPPORTED-VER5 +// Check what version of dwarf is used to emit debug info when compiling ir with clang. +// RUN: %clang -targ

[clang] [Clang] Correctly handle allocations in the condition of a `if constexpr` (PR #146890)

2025-07-03 Thread Eli Friedman via cfe-commits
@@ -1931,15 +1931,13 @@ Parser::ParseCXXCondition(StmtResult *InitStmt, SourceLocation Loc, return ParseCXXCondition(nullptr, Loc, CK, MissingOK); } -ExprResult Expr = [&] { - EnterExpressionEvaluationContext Eval( - Actions, Sema::ExpressionEvalua

[clang] [AArch64] Add option -msve-streaming-vector-bits= . (PR #144611)

2025-07-03 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic closed https://github.com/llvm/llvm-project/pull/144611 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64] Add option -msve-streaming-vector-bits= . (PR #144611)

2025-07-03 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/144611 >From c28804a471a9fe6be24479ffbfd7d4aa6c774125 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Tue, 17 Jun 2025 11:48:47 -0700 Subject: [PATCH 1/9] [AArch64] Add option -msve-streaming-vector-bits= . Th

[clang] [AArch64] Add option -msve-streaming-vector-bits= . (PR #144611)

2025-07-03 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/144611 >From c28804a471a9fe6be24479ffbfd7d4aa6c774125 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Tue, 17 Jun 2025 11:48:47 -0700 Subject: [PATCH 1/8] [AArch64] Add option -msve-streaming-vector-bits= . Th

[clang] [AArch64] Add option -msve-streaming-vector-bits= . (PR #144611)

2025-07-03 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/144611 >From c28804a471a9fe6be24479ffbfd7d4aa6c774125 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Tue, 17 Jun 2025 11:48:47 -0700 Subject: [PATCH 1/7] [AArch64] Add option -msve-streaming-vector-bits= . Th

[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

2025-07-02 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/137163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

2025-07-02 Thread Eli Friedman via cfe-commits
@@ -9125,9 +9126,25 @@ bool LValueExprEvaluator::VisitCompoundLiteralExpr(const CompoundLiteralExpr *E) { assert((!Info.getLangOpts().CPlusPlus || E->isFileScope()) && "lvalue compound literal in c++?"); - // Defer visiting the literal until the lvalue-to-rvalue con

[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

2025-07-02 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/137163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-07-02 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > we only know the concrete target when we are finalising, which happens at a > completely different time-point, on possibly a different machine; This is precisely why we want the frontend diagnostic: if we diagnose the bad cases in the frontend, later stages are guarantee

[clang] [clang] Consistently handle consteval constructors for variables. (PR #144970)

2025-07-02 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/144970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Handle consteval constructors with default initialization. (PR #144970)

2025-07-02 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/144970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Handle consteval constructors with default initialization. (PR #144970)

2025-07-02 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/144970 >From b1f7402423af22b0ea8cdf0b3d3734bcce68a636 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Thu, 19 Jun 2025 18:29:49 -0700 Subject: [PATCH 1/2] [clang] Consistently handle consteval constructors for

[clang] __sys builtin support for AArch64 (PR #146456)

2025-07-02 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/146456 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Handle consteval constructors with default initialization. (PR #144970)

2025-07-01 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Came up with a different approach: I moved the check to PopExpressionEvaluationContext(). This required annotating the ExpressionEvaluationContextRecord to indicate we're handling a variable initializer. https://github.com/llvm/llvm-project/pull/144970 __

[clang] [clang] Handle consteval constructors with default initialization. (PR #144970)

2025-07-01 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/144970 >From b4235454f111a8d97b2d1d32ed63cf92a5151ca0 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Thu, 19 Jun 2025 18:29:49 -0700 Subject: [PATCH] [clang] Consistently handle consteval constructors for var

[clang] [clang] Handle consteval constructors with default initialization. (PR #144970)

2025-07-01 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/144970 >From 75ae08046945b6e8e6bcc5af0e1618393f2cd95d Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Thu, 19 Jun 2025 18:29:49 -0700 Subject: [PATCH] [clang] Consistently handle consteval constructors for var

[clang] [win][aarch64] Always reserve frame pointers for Arm64 Windows (PR #146582)

2025-07-01 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: >From an ABI perspective, this seems fine: if you want fp to always be valid, >sure, lets enforce that. Do we generate appropriate diagnostics for inline asm? Does the AArch64 backend actually support this flag? I briefly tried, and it looks like t

[clang] __sys builtin support for AArch64 (PR #146456)

2025-07-01 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: (For future reference, there's no way to permanently mess up a PR; you can force-push to overwrite whatever is on the branch.) https://github.com/llvm/llvm-project/pull/146456 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [AArch64] Add option -msve-streaming-vector-bits= . (PR #144611)

2025-07-01 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Ping https://github.com/llvm/llvm-project/pull/144611 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Improve constexpr-unknown diagnostics. (PR #146288)

2025-06-30 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/146288 >From c678e8f0978480fadf3f7d2ffc30cd1d8229a9fa Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Sun, 29 Jun 2025 12:30:28 -0700 Subject: [PATCH 1/5] [clang] Improve constexpr-unknown diagnostics. APValue

[clang] __sys builtin support (PR #145079)

2025-06-30 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/145079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] __sys builtin support (PR #145079)

2025-06-30 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/145079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] __sys builtin support (PR #145079)

2025-06-30 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,68 @@ +// REQUIRES: aarch64-registered-target + +// RUN: %clang_cc1 -triple arm64-windows -fms-compatibility -S \ +// RUN: -o - %s | FileCheck %s -check-prefix CHECK-ASM + +// RUN: %clang_cc1 -triple arm64-darwin -fms-compatibility -S \ +// RUN: -o - %s | FileCheck %s -

[clang] [clang] Handle consteval constructors with default initialization. (PR #144970)

2025-06-30 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: ActOnCXXExitDeclInitializer does three things: - Some scope handling which isn't relevant in this context. - Does some special handling for variables, to compute whether the variable's initializer is manifestly constant-evaluated. - Calls PopExpressionEvaluationContext The

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-06-30 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > Whilst I am thankful for the feedback I think it is somewhat unfortunate that > we could not have a shared discussion about this, since I think that there > are some core misunderstandings that seem to recur, which makes forward > progress one way or the other difficult.

[clang] [CodeGen] Remove an unnecessary cast (NFC) (PR #146380)

2025-06-30 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/146380 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Improve constexpr-unknown diagnostics. (PR #146288)

2025-06-29 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/146288 >From c678e8f0978480fadf3f7d2ffc30cd1d8229a9fa Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Sun, 29 Jun 2025 12:30:28 -0700 Subject: [PATCH 1/4] [clang] Improve constexpr-unknown diagnostics. APValue

[clang] [clang] Improve constexpr-unknown diagnostics. (PR #146288)

2025-06-29 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/146288 >From c678e8f0978480fadf3f7d2ffc30cd1d8229a9fa Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Sun, 29 Jun 2025 12:30:28 -0700 Subject: [PATCH 1/3] [clang] Improve constexpr-unknown diagnostics. APValue

[clang] [clang] Improve constexpr-unknown diagnostics. (PR #146288)

2025-06-29 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/146288 >From c678e8f0978480fadf3f7d2ffc30cd1d8229a9fa Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Sun, 29 Jun 2025 12:30:28 -0700 Subject: [PATCH 1/2] [clang] Improve constexpr-unknown diagnostics. APValue

[clang] [clang] Improve constexpr-unknown diagnostics. (PR #146288)

2025-06-29 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic created https://github.com/llvm/llvm-project/pull/146288 APValue::ConstexprUnknown() constructs a broken LValue that doesn't have an lvalue path, which confuses later error handling. It turns out we don't actually use the result of createConstexprUnknownAPValu

[clang] [clang] Handle consteval constructors with default initialization. (PR #144970)

2025-06-29 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/144970 >From ef713152a6fb5d2321330d8fbaa77970e8666b13 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Thu, 19 Jun 2025 18:29:49 -0700 Subject: [PATCH 1/2] [clang] Handle consteval constructors with default ini

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-06-27 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I mean, I'm not particularly attached to the syntax of the "if". I guess we could designate `if (__builtin_amdgcn_processor_is("gfx900")) {}` as a "processor-feature-if". The point is that we need to know at the AST level which processor features are available for each st

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-06-27 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: We briefly discussed this in the clang area team meeting, and we weren't really happy with the design as-is. The underlying idea behind the feature makes sense, but semantics of the actual builtin is ugly: there's a loose connection between the condition check, and the re

[clang] [Clang] Verify data layout consistency (PR #144720)

2025-06-27 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM I see you opened a PR for m68k and aix; did you open a PR or issue report for wasm? https://github.com/llvm/llvm-project/pull/144720 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang] [Clang][AArch64] _interlockedbittestand{set,reset}64_{acq,rel,nf} support for AArch64 (PR #145980)

2025-06-26 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/145980 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Revise relnote for int->enum conversion. (PR #145755)

2025-06-26 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic closed https://github.com/llvm/llvm-project/pull/145755 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Revise relnote for int->enum conversion. (PR #145755)

2025-06-25 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Backporting fixes to Boost seems like something most people won't want to mess with. We have a reference to the pull request if anyone wants to dig into the gory details. https://github.com/llvm/llvm-project/pull/145755 ___ cfe-

[clang] [clang] Revise relnote for int->enum conversion. (PR #145755)

2025-06-25 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic created https://github.com/llvm/llvm-project/pull/145755 Include more specifics from recent discussion on #143034. >From 60891ee7c1ee9a368fb097d39a983ffaa72fbfe0 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Wed, 25 Jun 2025 11:04:51 -0700 Subject: [PATCH]

[clang] [clang] Check constexpr int->enum conversions consistently. (PR #143034)

2025-06-25 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Pushed #145755 to revise the release note with information about numeric_conversion specifically. If the underlying issue with boost::mpl::integral_c isn't actually impacting anyone, I won't worry about it. https://github.com/llvm/llvm-project/pull/143034

[clang] [Clang] Allow vanilla C function symbol name to be used in __attribute__((alias)) when -funique-internal-linkage-names is specified (PR #145652)

2025-06-25 Thread Eli Friedman via cfe-commits
@@ -4046,6 +4065,12 @@ void CodeGenModule::EmitGlobal(GlobalDecl GD) { // The value must be emitted, but cannot be emitted eagerly. assert(!MayBeEmittedEagerly(Global)); addDeferredDeclToEmit(GD); + } else if (!getLangOpts().CPlusPlus && ND && + GetGlob

[clang] [Clang] Allow vanilla C function symbol name to be used in __attribute__((alias)) when -funique-internal-linkage-names is specified (PR #145652)

2025-06-25 Thread Eli Friedman via cfe-commits
@@ -598,6 +599,23 @@ static bool checkAliasedGlobal( return false; } + // Only resolve unique internal linkage symbols for C code + if (!CGM->getLangOpts().CPlusPlus) { efriedma-quic wrote: Is this C-only? Consider something like: ``` long bar(const

[clang] [AArch64] Add option -msve-streaming-vector-bits= . (PR #144611)

2025-06-25 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/144611 >From c28804a471a9fe6be24479ffbfd7d4aa6c774125 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Tue, 17 Jun 2025 11:48:47 -0700 Subject: [PATCH 1/6] [AArch64] Add option -msve-streaming-vector-bits= . Th

[clang] [AArch64] Add option -msve-streaming-vector-bits= . (PR #144611)

2025-06-25 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/144611 >From c28804a471a9fe6be24479ffbfd7d4aa6c774125 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Tue, 17 Jun 2025 11:48:47 -0700 Subject: [PATCH 1/5] [AArch64] Add option -msve-streaming-vector-bits= . Th

[clang] [AArch64] Add option -msve-streaming-vector-bits= . (PR #144611)

2025-06-25 Thread Eli Friedman via cfe-commits
@@ -2261,6 +2261,21 @@ void Sema::checkTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) { } } } + +if (auto *VT = Ty->getAs(); +VT && FD && +(VT->getVectorKind() == VectorKind::SveFixedLengthData || + VT->getVectorKind()

[clang] [AArch64] Add option -msve-streaming-vector-bits= . (PR #144611)

2025-06-24 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/144611 >From c28804a471a9fe6be24479ffbfd7d4aa6c774125 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Tue, 17 Jun 2025 11:48:47 -0700 Subject: [PATCH 1/4] [AArch64] Add option -msve-streaming-vector-bits= . Th

[clang] [NFC] Move areCompatibleSveTypes etc. from ASTContext to SemaARM. (PR #145429)

2025-06-24 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic closed https://github.com/llvm/llvm-project/pull/145429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   6   7   8   9   10   >