[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-23 Thread David Olsen via cfe-commits
@@ -16,4 +16,50 @@ include "clang/CIR/Dialect/IR/CIRDialect.td" +include "mlir/Interfaces/ControlFlowInterfaces.td" +include "mlir/Interfaces/FunctionInterfaces.td" +include "mlir/Interfaces/InferTypeOpInterface.td" +include "mlir/Interfaces/LoopLikeInterface.td" +include "ml

[clang] [llvm] [HLSL][SPIRV] Added clamp intrinsic (PR #113394)

2024-10-23 Thread Farzon Lotfi via cfe-commits
@@ -18661,14 +18661,30 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, Value *OpMax = EmitScalarExpr(E->getArg(2)); QualType Ty = E->getArg(0)->getType(); -bool IsUnsigned = false; if (auto *VecTy = Ty->getAs()) Ty = VecTy->getElemen

[clang] [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-10-23 Thread Timm Baeder via cfe-commits
@@ -2259,6 +2259,17 @@ QualType Sema::BuildArrayType(QualType T, ArraySizeModifier ASM, isSFINAEContext() ? diag::err_typecheck_zero_array_size : diag::ext_typecheck_zero_array_size) << 0 << ArraySize->getSourceRange(); +

[clang] [clang-tools-extra] RFC: [clang-tidy] [analyzer] Move nondeterministic pointer usage check to tidy (PR #110471)

2024-10-23 Thread via cfe-commits
https://github.com/vabridgers updated https://github.com/llvm/llvm-project/pull/110471 >From 95cd675d3c8f418ccd1151380991952d53df7479 Mon Sep 17 00:00:00 2001 From: Vince Bridgers Date: Thu, 26 Sep 2024 16:24:59 +0200 Subject: [PATCH] [clang-tidy] [analyzer] Move nondeterministic pointer usage

[clang] [clang] constexpr built-in fma function. (PR #113020)

2024-10-23 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping @cor3ntin since he mentioned on Discord that he's available for reviews this week :) https://github.com/llvm/llvm-project/pull/113020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [HLSL] Add RWStructuredBuffer definition to HLSLExternalSemaSource (PR #113477)

2024-10-23 Thread Damyan Pepper via cfe-commits
@@ -4,21 +4,30 @@ // NOTE: SPIRV codegen for resource types is not yet implemented StructuredBuffer Buf : register(t10); +RWStructuredBuffer Buf2 : register(u5, space1); // CHECK: %"class.hlsl::StructuredBuffer" = type { target("dx.RawBuffer", float, 0, 0), float } +// CHE

[clang] [clang codegen] Add CreateRuntimeFunction overload that takes a clang type. (PR #113506)

2024-10-23 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic created https://github.com/llvm/llvm-project/pull/113506 Correctly computing the LLVM types/attributes is complicated in general, so add a variant which does that for you. >From 852334cad31df42463a831f9c53cc4ac4535b93c Mon Sep 17 00:00:00 2001 From: Eli Friedma

[clang] [HLSL] Add RWStructuredBuffer definition to HLSLExternalSemaSource (PR #113477)

2024-10-23 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/113477 >From 106ea44e1f8833f26364c54cc3fbf2fb57665be6 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 23 Oct 2024 10:29:44 -0700 Subject: [PATCH 1/4] [HLSL] Add RWStructuredBuffer definition to HLSLExternalSemaS

[clang] [HLSL] Add RWStructuredBuffer definition to HLSLExternalSemaSource (PR #113477)

2024-10-23 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/113477 >From 106ea44e1f8833f26364c54cc3fbf2fb57665be6 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 23 Oct 2024 10:29:44 -0700 Subject: [PATCH 1/3] [HLSL] Add RWStructuredBuffer definition to HLSLExternalSemaS

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-10-23 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/109331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Add UNSIGNED (PR #113504)

2024-10-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-driver Author: Peter Klausler (klausler) Changes Implement the UNSIGNED extension type and operations under control of a language feature flag (-funsigned). This is nearly identical to the UNSIGNED feature that has been available in Sun Fortran

[clang] [llvm] [Clang] Fix argument extensions in CGBlocks.cpp (PR #111740)

2024-10-23 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I looked to see how hard it would be to lower the clang type... seems like it's not hard. Pushed #113506. Let me know what you think. If there's some complication I'm not seeing, I think your suggested API in the current version of this patch makes sense... but using cla

[clang] [clang-tools-extra] RFC: [clang-tidy] [analyzer] Move nondeterministic pointer usage check to tidy (PR #110471)

2024-10-23 Thread via cfe-commits
https://github.com/vabridgers updated https://github.com/llvm/llvm-project/pull/110471 >From ec6c1f8e4929d605056460f876a8004fe8554225 Mon Sep 17 00:00:00 2001 From: Vince Bridgers Date: Thu, 26 Sep 2024 16:24:59 +0200 Subject: [PATCH] [clang-tidy] [analyzer] Move nondeterministic pointer usage

[clang] [clang codegen] Add CreateRuntimeFunction overload that takes a clang type. (PR #113506)

2024-10-23 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/113506 >From bb58bdd524ea751d598fe8d4954be91f88279b21 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Wed, 23 Oct 2024 16:12:27 -0700 Subject: [PATCH] [clang codegen] Add CreateRuntimeFunction overload that tak

[clang] [flang] [flang] Add UNSIGNED (PR #113504)

2024-10-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-semantics Author: Peter Klausler (klausler) Changes Implement the UNSIGNED extension type and operations under control of a language feature flag (-funsigned). This is nearly identical to the UNSIGNED feature that has been available in Sun Fortr

[clang] [Clang] [Draft] Implement P0588R1 capture rules (PR #105953)

2024-10-23 Thread Yupei Liu via cfe-commits
LYP951018 wrote: Thanks for the review comments. Sorry for the delayed response, I'm a little busy recently. I'm still fixing a clang-tidy unit test broken by this change. I'll take a deep dive into your suggestions a bit later ;) https://github.com/llvm/llvm-project/pull/105953 __

[clang-tools-extra] d8ef7b6 - [clang-tidy] Stop linking against clangSema (#113373)

2024-10-23 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2024-10-23T20:37:38+04:00 New Revision: d8ef7b67e84145275682185905fcdfd938fe08ce URL: https://github.com/llvm/llvm-project/commit/d8ef7b67e84145275682185905fcdfd938fe08ce DIFF: https://github.com/llvm/llvm-project/commit/d8ef7b67e84145275682185905fcdfd938fe08ce.

[clang] [HLSL] Change StructuredBuffer resource class to SRV (PR #113397)

2024-10-23 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/113397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][SPIRV] Added clamp intrinsic (PR #113394)

2024-10-23 Thread Farzon Lotfi via cfe-commits
@@ -18661,14 +18661,30 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, Value *OpMax = EmitScalarExpr(E->getArg(2)); QualType Ty = E->getArg(0)->getType(); -bool IsUnsigned = false; if (auto *VecTy = Ty->getAs()) Ty = VecTy->getElemen

[clang] [llvm] [HLSL][SPIRV] Added clamp intrinsic (PR #113394)

2024-10-23 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl deleted https://github.com/llvm/llvm-project/pull/113394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][SPIRV] Added clamp intrinsic (PR #113394)

2024-10-23 Thread Farzon Lotfi via cfe-commits
@@ -2559,6 +2559,12 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register ResVReg, } break; case Intrinsic::spv_saturate: return selectSaturate(ResVReg, ResType, I); + case Intrinsic::spv_fclamp: +return selectExtInst(ResVReg, ResType, I, CL::fclamp, GL::FCla

[clang] [clang-format] Add TemplateNames option to help parse C++ angles (PR #109916)

2024-10-23 Thread Björn Schäpers via cfe-commits
@@ -5230,6 +5239,7 @@ struct FormatStyle { TableGenBreakingDAGArgOperators == R.TableGenBreakingDAGArgOperators && TableGenBreakInsideDAGArg == R.TableGenBreakInsideDAGArg && + TabWidth == R.TabWidth && TemplateNames == R.TemplateN

[clang] [clang-repl] Simplify the value printing logic to enable out-of-process. (PR #107737)

2024-10-23 Thread Vassil Vassilev via cfe-commits
@@ -13,246 +13,40 @@ #include "IncrementalParser.h" #include "clang/AST/DeclContextInternals.h" -#include "clang/CodeGen/BackendUtil.h" -#include "clang/CodeGen/CodeGenAction.h" -#include "clang/CodeGen/ModuleBuilder.h" #include "clang/Frontend/CompilerInstance.h" -#include "

[clang] [HLSL] Add RWStructuredBuffer definition to HLSLExternalSemaSource (PR #113477)

2024-10-23 Thread Tex Riddell via cfe-commits
@@ -17,7 +17,7 @@ // EMPTY-NEXT: FinalAttr 0x{{[0-9A-Fa-f]+}} <> Implicit final // There should be no more occurrances of StructuredBuffer -// EMPTY-NOT: StructuredBuffer +// EMPTY-NOT: {{^\W}}StructuredBuffer tex3d wrote: This still doesn't look right. Did

[clang] [HLSL] Add RWStructuredBuffer definition to HLSLExternalSemaSource (PR #113477)

2024-10-23 Thread Tex Riddell via cfe-commits
@@ -17,7 +17,7 @@ // EMPTY-NEXT: FinalAttr 0x{{[0-9A-Fa-f]+}} <> Implicit final // There should be no more occurrances of StructuredBuffer -// EMPTY-NOT: StructuredBuffer +// EMPTY-NOT: {{^\W}}StructuredBuffer tex3d wrote: By the way, my suggestion of `{{[^W]

[clang] [C++20][Modules] Quote header unit name in preprocessor output (-E) (PR #112883)

2024-10-23 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin edited https://github.com/llvm/llvm-project/pull/112883 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][driver] Make -stdlib= option visible to flang and silently ignored by it (PR #110598)

2024-10-23 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm closed https://github.com/llvm/llvm-project/pull/110598 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-10-23 Thread Farzon Lotfi via cfe-commits
@@ -95,6 +99,144 @@ static void initializeAlloca(CodeGenFunction &CGF, AllocaInst *AI, Value *Size, I->addAnnotationMetadata("auto-init"); } +static Value *handleHlslSplitdouble(const CallExpr *E, CodeGenFunction *CGF) { + Value *Op0 = CGF->EmitScalarExpr(E->getArg(0)); +

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-10-23 Thread Tex Riddell via cfe-commits
@@ -95,6 +99,144 @@ static void initializeAlloca(CodeGenFunction &CGF, AllocaInst *AI, Value *Size, I->addAnnotationMetadata("auto-init"); } +static Value *handleHlslSplitdouble(const CallExpr *E, CodeGenFunction *CGF) { + Value *Op0 = CGF->EmitScalarExpr(E->getArg(0)); +

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-10-23 Thread Tex Riddell via cfe-commits
@@ -95,6 +99,144 @@ static void initializeAlloca(CodeGenFunction &CGF, AllocaInst *AI, Value *Size, I->addAnnotationMetadata("auto-init"); } +static Value *handleHlslSplitdouble(const CallExpr *E, CodeGenFunction *CGF) { + Value *Op0 = CGF->EmitScalarExpr(E->getArg(0)); +

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-23 Thread Schrodinger ZHU Yifan via cfe-commits
@@ -16,4 +16,50 @@ include "clang/CIR/Dialect/IR/CIRDialect.td" +include "mlir/Interfaces/ControlFlowInterfaces.td" +include "mlir/Interfaces/FunctionInterfaces.td" +include "mlir/Interfaces/InferTypeOpInterface.td" +include "mlir/Interfaces/LoopLikeInterface.td" +include "ml

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-10-23 Thread Tex Riddell via cfe-commits
@@ -95,6 +99,144 @@ static void initializeAlloca(CodeGenFunction &CGF, AllocaInst *AI, Value *Size, I->addAnnotationMetadata("auto-init"); } +static Value *handleHlslSplitdouble(const CallExpr *E, CodeGenFunction *CGF) { + Value *Op0 = CGF->EmitScalarExpr(E->getArg(0)); +

[clang] [HLSL] Add RWStructuredBuffer definition to HLSLExternalSemaSource (PR #113477)

2024-10-23 Thread Helena Kotas via cfe-commits
@@ -17,7 +17,7 @@ // EMPTY-NEXT: FinalAttr 0x{{[0-9A-Fa-f]+}} <> Implicit final // There should be no more occurrances of StructuredBuffer -// EMPTY-NOT: StructuredBuffer +// EMPTY-NOT: {{^\W}}StructuredBuffer hekota wrote: Thanks Tex! I forgot `^` has differ

[clang] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2024-10-23 Thread Trevor Gross via cfe-commits
tgross35 wrote: > From what I can see in the libgcc sources, `__gnu_h2f_ieee`/`__gnu_f2h_ieee` > is indeed always `i32`<->`i16`, but it is only present on 32-bit ARM, no > other platforms. On AArch64, GCC will always use inline instructions to > perform the conversion. On 32-bit and 64-bit Int

[clang] [llvm] [Clang] Match MSVC handling of duplicate header search paths in Microsoft compatibility modes. (PR #105738)

2024-10-23 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann updated https://github.com/llvm/llvm-project/pull/105738 >From b775b7288035d83281434e27341b98a76623802f Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Thu, 22 Aug 2024 09:44:56 -0700 Subject: [PATCH 1/5] [Clang] Match MSVC handling of duplicate header search

[clang] [clang-format] Add KeepFormFeed option (PR #113268)

2024-10-23 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/113268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-10-23 Thread Jon Chesterfield via cfe-commits
https://github.com/JonChesterfield approved this pull request. Error looks good. Might want to add a case for "dynamic __shared__" to the test file as the syntax is very close to the case being diagnosed - iirc it's things like ```cuda extern __shared__ float array[]; ``` Some existing handli

[clang] [clang-format] Fix working -assume-filename with .clang-format-ignore (PR #113100)

2024-10-23 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/113100 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly] Implement the wide-arithmetic proposal (PR #111598)

2024-10-23 Thread Dan Gohman via cfe-commits
https://github.com/sunfishcode closed https://github.com/llvm/llvm-project/pull/111598 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Change StructuredBuffer resource class to SRV (PR #113397)

2024-10-23 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 approved this pull request. https://github.com/llvm/llvm-project/pull/113397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v4 (PR #108636)

2024-10-23 Thread Peilin Ye via cfe-commits
peilin-ye wrote: Hi @arsenm, I'm trying to match `atomic_load_zext_{8,16}` in BPF backend but it doesn't work: ``` fatal error: error in backend: Cannot select: t8: i32,ch = AtomicLoad<(load acquire (s8) from %ir.ptr), zext from i8> t0, t2, demo.bpf.c:3:12 t2: i64,ch = CopyFromReg t0, Registe

[clang] [llvm] [HLSL] implement elementwise firstbithigh hlsl builtin (PR #111082)

2024-10-23 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/111082 >From 6239941c302f616f87ed652151e828a8eae1054c Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Mon, 23 Sep 2024 22:10:59 + Subject: [PATCH 1/7] implement firstbithigh hlsl builtin --- clang/include/clang/Ba

[clang] [HLSL] Add RWStructuredBuffer definition to HLSLExternalSemaSource (PR #113477)

2024-10-23 Thread Joshua Batista via cfe-commits
@@ -0,0 +1,70 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.2-compute -finclude-default-header -fnative-half-type -emit-llvm -o - %s | FileCheck %s + +// NOTE: The number in type name and whether the struct is packed or not will mostly +// likely change once subscript oper

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-10-23 Thread via cfe-commits
@@ -0,0 +1,54 @@ +; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o - -filetype=obj | spirv-val %} + +; Make sure lowering is correctly generating spirv code. + +; CH

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-10-23 Thread Tex Riddell via cfe-commits
@@ -95,6 +99,144 @@ static void initializeAlloca(CodeGenFunction &CGF, AllocaInst *AI, Value *Size, I->addAnnotationMetadata("auto-init"); } +static Value *handleHlslSplitdouble(const CallExpr *E, CodeGenFunction *CGF) { + Value *Op0 = CGF->EmitScalarExpr(E->getArg(0)); +

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-10-23 Thread Tex Riddell via cfe-commits
@@ -95,6 +99,133 @@ static void initializeAlloca(CodeGenFunction &CGF, AllocaInst *AI, Value *Size, I->addAnnotationMetadata("auto-init"); } +static Value *handleHlslSplitdouble(const CallExpr *E, CodeGenFunction *CGF) { + Value *Op0 = CGF->EmitScalarExpr(E->getArg(0)); +

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-10-23 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,98 @@ +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm -O1 -o - | FileCheck %s +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple spirv-vulkan-library %s -fnative-half-type -emit-ll

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-23 Thread via cfe-commits
https://github.com/WenleiHe edited https://github.com/llvm/llvm-project/pull/109837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-23 Thread via cfe-commits
https://github.com/WenleiHe approved this pull request. Looks good enough to me with the FIXME :) Thanks! https://github.com/llvm/llvm-project/pull/109837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-23 Thread via cfe-commits
@@ -53,6 +53,8 @@ class PGOInstrumentationGenCreateVar bool ProfileSampling; }; +enum class InstrColdFuncCovMode { Conservative = 0, Optimistic }; WenleiHe wrote: remove this? https://github.com/llvm/llvm-project/pull/109837 __

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-10-23 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/109331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-10-23 Thread via cfe-commits
@@ -95,6 +99,144 @@ static void initializeAlloca(CodeGenFunction &CGF, AllocaInst *AI, Value *Size, I->addAnnotationMetadata("auto-init"); } +static Value *handleHlslSplitdouble(const CallExpr *E, CodeGenFunction *CGF) { + Value *Op0 = CGF->EmitScalarExpr(E->getArg(0)); +

[clang] [clang][Driver][HIP] Add support for mixing AMDGCNSPIRV & concrete `offload-arch`s. (PR #113509)

2024-10-23 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx created https://github.com/llvm/llvm-project/pull/113509 This removes the temporary ban on mixing AMDGCN flavoured SPIR-V and concrete targets (e.g. `gfx900`) in the same HIPAMD compilation. This is done primarily by tweaking the effective / observable triple when th

[clang] [llvm] [HLSL] implement elementwise firstbithigh hlsl builtin (PR #111082)

2024-10-23 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. https://github.com/llvm/llvm-project/pull/111082 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Driver][HIP] Add support for mixing AMDGCNSPIRV & concrete `offload-arch`s. (PR #113509)

2024-10-23 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 33363521ca24f912cc25530f6cecbca53acce8a3 4a18bbc256051f30805620f65a4db037ea2fe96c --e

[clang] [llvm] [ARM] Save floating point registers and status registers with save_fp function attribute (PR #89654)

2024-10-23 Thread Eli Friedman via cfe-commits
@@ -5584,6 +5584,20 @@ static void handleAbiTagAttr(Sema &S, Decl *D, const ParsedAttr &AL) { AbiTagAttr(S.Context, AL, Tags.data(), Tags.size())); } +static void handleARMInterruptSaveFPAttr(Sema &S, Decl *D, + const P

[clang] [llvm] [ARM] Save floating point registers and status registers with save_fp function attribute (PR #89654)

2024-10-23 Thread Eli Friedman via cfe-commits
@@ -80,13 +80,47 @@ ARMBaseRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const { ? CSR_ATPCS_SplitPush_SwiftTail_SaveList : CSR_AAPCS_SwiftTail_SaveList); } else if (F.hasFnAttribute(

[clang] [HLSL] Add RWStructuredBuffer definition to HLSLExternalSemaSource (PR #113477)

2024-10-23 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,70 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.2-compute -finclude-default-header -fnative-half-type -emit-llvm -o - %s | FileCheck %s + +// NOTE: The number in type name and whether the struct is packed or not will mostly +// likely change once subscript oper

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-10-23 Thread Tex Riddell via cfe-commits
@@ -0,0 +1,98 @@ +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm -O1 -o - | FileCheck %s +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple spirv-vulkan-library %s -fnative-half-type -emit-ll

[clang] Clang tooling generated visibility macros for Clang (PR #109702)

2024-10-23 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I'd like some answer about how we plan to ensure the macros remain correct. Short-term, "someone periodically runs the tool manually" might be good enough if we don't expect much churn, I guess. Also, can the tool itself be added to llvm-project? (The actual changes seem

[clang] [llvm] [llvm] Support llvm::Any across shared libraries on windows (PR #108051)

2024-10-23 Thread Yitzhak Mandelbaum via cfe-commits
ymand wrote: > idk if this was kinda the explanation you were after or not > https://discourse.llvm.org/t/supporting-llvm-build-llvm-dylib-on-windows/58891 Indeed, thank you! https://github.com/llvm/llvm-project/pull/108051 ___ cfe-commits mailing li

[clang] [llvm] [llvm] Deprecate Type::getPointerTo() (PR #113331)

2024-10-23 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/113331 >From 01755acec5beb6884d7c3dbcc7e250952feaac15 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Fri, 18 Oct 2024 10:40:23 -0500 Subject: [PATCH 1/2] [llvm] Deprecate Type::getPointerTo() Replace remaining uses

[clang] [llvm] [llvm] Support llvm::Any across shared libraries on windows (PR #108051)

2024-10-23 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. Thanks for the discussion/explanation and the comments! https://github.com/llvm/llvm-project/pull/108051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [clang-format] clang-format-ignore: Add support for double asterisk patterns (PR #110560)

2024-10-23 Thread Ameer J via cfe-commits
ameerj wrote: @HazardyKnusperkeks Can I get your eyes on this PR please? https://github.com/llvm/llvm-project/pull/110560 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm] Support llvm::Any across shared libraries on windows (PR #108051)

2024-10-23 Thread Thomas Fransham via cfe-commits
https://github.com/fsfod updated https://github.com/llvm/llvm-project/pull/108051 >From 7761ab1ad8eee08fa86aba04e89f7aab5064cb4f Mon Sep 17 00:00:00 2001 From: Thomas Fransham Date: Sat, 7 Sep 2024 15:53:09 +0100 Subject: [PATCH 1/8] [llvm] Support llvm::Any across shared libraries on windows

[libcxx] [libcxxabi] [libunwind] [llvm] [libc++] Unify the benchmarks with the test suite (PR #101399)

2024-10-23 Thread Louis Dionne via cfe-commits
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/101399 >From 0faad749460f8858b87064f97de62e5029090ac9 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Wed, 31 Jul 2024 13:00:25 -0400 Subject: [PATCH 1/2] [libc++] Make benchmarks forward-compatible with the test su

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-23 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-10-23 Thread Farzon Lotfi via cfe-commits
@@ -95,6 +99,144 @@ static void initializeAlloca(CodeGenFunction &CGF, AllocaInst *AI, Value *Size, I->addAnnotationMetadata("auto-init"); } +static Value *handleHlslSplitdouble(const CallExpr *E, CodeGenFunction *CGF) { + Value *Op0 = CGF->EmitScalarExpr(E->getArg(0)); +

[clang] [HLSL] Add RWStructuredBuffer definition to HLSLExternalSemaSource (PR #113477)

2024-10-23 Thread Helena Kotas via cfe-commits
@@ -17,7 +17,7 @@ // EMPTY-NEXT: FinalAttr 0x{{[0-9A-Fa-f]+}} <> Implicit final // There should be no more occurrances of StructuredBuffer -// EMPTY-NOT: StructuredBuffer +// EMPTY-NOT: {{/s}}StructuredBuffer hekota wrote: I've update it to use `{^\W}}`. htt

[clang] [llvm] [HLSL] implement elementwise firstbithigh hlsl builtin (PR #111082)

2024-10-23 Thread Sarah Spall via cfe-commits
@@ -424,7 +424,7 @@ Register SPIRVGlobalRegistry::getOrCreateCompositeOrNull( LLT LLTy = LLT::scalar(64); Register SpvVecConst = CurMF->getRegInfo().createGenericVirtualRegister(LLTy); -CurMF->getRegInfo().setRegClass(SpvVecConst, &SPIRV::iIDRegClass); +

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-23 Thread Schrodinger ZHU Yifan via cfe-commits
@@ -16,4 +16,50 @@ include "clang/CIR/Dialect/IR/CIRDialect.td" +include "mlir/Interfaces/ControlFlowInterfaces.td" +include "mlir/Interfaces/FunctionInterfaces.td" +include "mlir/Interfaces/InferTypeOpInterface.td" +include "mlir/Interfaces/LoopLikeInterface.td" +include "ml

[clang] [llvm] Ci report script testing! (PR #113447)

2024-10-23 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett updated https://github.com/llvm/llvm-project/pull/113447 >From ba99bed96bd69db7c86d43a2119255569872f41f Mon Sep 17 00:00:00 2001 From: David Spickett Date: Mon, 21 Oct 2024 12:34:17 + Subject: [PATCH 1/4] [ci] Write test results to unique file names In this

[clang] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2024-10-23 Thread Ulrich Weigand via cfe-commits
uweigand wrote: > My understanding is that in GCC's `__gnu_h2f_ieee`/`__gnu_f2h_ieee` is always > `i32`<->`i16` (integer ABI), then `__extendhfsf2`/`__truncsfhf2` uses either > `int16_t` or `_Float16` on a per-target basis as controlled by > `__LIBGCC_HAS_HF_MODE__` (I don't know where this g

[clang] [llvm] [WebAssembly] Implement the wide-arithmetic proposal (PR #111598)

2024-10-23 Thread Alex Crichton via cfe-commits
alexcrichton wrote: @tlively or @sunfishcode would y'all be ok merging this for me? (I'm unable to do so myself) https://github.com/llvm/llvm-project/pull/111598 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang-tools-extra] 3605d9a - [clang-tidy][readability-container-contains] Fix matching of non-binaryOperator cases (#110386)

2024-10-23 Thread via cfe-commits
Author: Nicolas van Kempen Date: 2024-10-23T14:57:09-04:00 New Revision: 3605d9a456185f4af78c01a2684b822b57bca9b0 URL: https://github.com/llvm/llvm-project/commit/3605d9a456185f4af78c01a2684b822b57bca9b0 DIFF: https://github.com/llvm/llvm-project/commit/3605d9a456185f4af78c01a2684b822b57bca9b0.

[clang-tools-extra] [clang-tidy][readability-container-contains] Fix matching of non-binaryOperator cases (PR #110386)

2024-10-23 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank closed https://github.com/llvm/llvm-project/pull/110386 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] support string::contains (PR #110351)

2024-10-23 Thread Nicolas van Kempen via cfe-commits
nicovank wrote: FYI I'm going to merge #110386 now which will cause conflicts (`binaryOperator` -> `binaryOperation`). https://github.com/llvm/llvm-project/pull/110351 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [llvm] [HLSL] implement elementwise firstbithigh hlsl builtin (PR #111082)

2024-10-23 Thread Sarah Spall via cfe-commits
@@ -2626,6 +2671,148 @@ Register SPIRVInstructionSelector::buildPointerToResource( MIRBuilder); } +bool SPIRVInstructionSelector::selectFirstBitHigh16(Register ResVReg, +const

[clang] [llvm] Implement operand bundles for floating-point operations (PR #109798)

2024-10-23 Thread Kevin P. Neal via cfe-commits
kpneal wrote: > > This sounds like a rejection of safe-by-default. > > What do you mean by "safe-by-default"? Implementation must be correct, and > produce the code that executes in accordance to standards and documentation. > Any deviation from them is an error and should be fixed. Does it me

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-10-23 Thread Farzon Lotfi via cfe-commits
@@ -4197,7 +4198,7 @@ static void emitWriteback(CodeGenFunction &CGF, // Release the old value. CGF.EmitARCRelease(oldValue, srcLV.isARCPreciseLifetime()); - // Otherwise, we can just do a normal lvalue store. +// Otherwise, we can just do a normal lvalue store. -

[clang] [Clang][AArch64] Fix Pure Scalables Types argument passing and return (PR #112747)

2024-10-23 Thread Eli Friedman via cfe-commits
@@ -303,6 +368,20 @@ AArch64ABIInfo::classifyArgumentType(QualType Ty, bool IsVariadic, if (EIT->getNumBits() > 128) return getNaturalAlignIndirect(Ty, false); +if (const BuiltinType *BT = Ty->getAs()) { + if (BT->isSVEBool() || BT->isSVECount()) +

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-10-23 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/109331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add RWStructuredBuffer definition to HLSLExternalSemaSource (PR #113477)

2024-10-23 Thread Tex Riddell via cfe-commits
https://github.com/tex3d approved this pull request. Looks good. https://github.com/llvm/llvm-project/pull/113477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-10-23 Thread Farzon Lotfi via cfe-commits
@@ -1698,18 +1698,27 @@ static bool CheckVectorElementCallArgs(Sema *S, CallExpr *TheCall) { return true; } -static bool CheckArgsTypesAreCorrect( +bool CheckArgTypeIsCorrect( +Sema *S, Expr *Arg, QualType ExpectedType, +llvm::function_ref Check) { + QualType Passe

[clang] [HLSL] Add RWStructuredBuffer definition to HLSLExternalSemaSource (PR #113477)

2024-10-23 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,70 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.2-compute -finclude-default-header -fnative-half-type -emit-llvm -o - %s | FileCheck %s + +// NOTE: The number in type name and whether the struct is packed or not will mostly +// likely change once subscript oper

[clang] c2293b3 - [WebAssembly] Implement the wide-arithmetic proposal (#111598)

2024-10-23 Thread via cfe-commits
Author: Alex Crichton Date: 2024-10-23T11:39:58-07:00 New Revision: c2293b33ddc6c722178087d85b2b4312ea830d12 URL: https://github.com/llvm/llvm-project/commit/c2293b33ddc6c722178087d85b2b4312ea830d12 DIFF: https://github.com/llvm/llvm-project/commit/c2293b33ddc6c722178087d85b2b4312ea830d12.diff

[clang] [llvm] [HLSL] implement elementwise firstbithigh hlsl builtin (PR #111082)

2024-10-23 Thread Sarah Spall via cfe-commits
https://github.com/spall edited https://github.com/llvm/llvm-project/pull/111082 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add RWStructuredBuffer definition to HLSLExternalSemaSource (PR #113477)

2024-10-23 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 approved this pull request. https://github.com/llvm/llvm-project/pull/113477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Fix false negatives of missing 2-param span ctors in constructor initializers (PR #113226)

2024-10-23 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: > This overlaps with #91991 which should probably be landed in its entirety. > (It looks like it's about attributes but in fact it isn't. It's about finding > _all_ gadgets in all those new places.) I think that patch was almost ready > and it was a matter of considering my

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-23 Thread David Olsen via cfe-commits
@@ -16,4 +16,50 @@ include "clang/CIR/Dialect/IR/CIRDialect.td" +include "mlir/Interfaces/ControlFlowInterfaces.td" +include "mlir/Interfaces/FunctionInterfaces.td" +include "mlir/Interfaces/InferTypeOpInterface.td" +include "mlir/Interfaces/LoopLikeInterface.td" +include "ml

[clang] [llvm] [HLSL] Re-implement countbits with the correct return type (PR #113189)

2024-10-23 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/113189 >From 12cac48dcc10ef9c5fccba2c22911f420298b98b Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Wed, 16 Oct 2024 19:00:08 + Subject: [PATCH 1/3] implement countbits correctly --- clang/lib/Headers/hlsl/hlsl_

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-10-23 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/109331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Quote header unit name in preprocessor output (-E) (PR #112883)

2024-10-23 Thread Dmitry Polukhin via cfe-commits
@@ -952,13 +952,15 @@ static void PrintPreprocessedTokens(Preprocessor &PP, Token &Tok, continue; } else if (Tok.is(tok::annot_header_unit)) { // This is a header-name that has been (effectively) converted into a - // module-name. + // module-name, pr

[clang] [llvm] [AArch64] Add support for Armv9.6-A FEAT_PoPS architecture extension (PR #113496)

2024-10-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mc Author: Jonathan Thackray (jthackray) Changes Add support for the following Armv9.6-A architecture extensions: * FEAT_PoPS - Point of Physical Storage as documented here: https://developer.arm.com/documentation/109697/2024_09/Feature-descri

[clang] [llvm] [AArch64] Add support for Armv9.6-A FEAT_PoPS architecture extension (PR #113496)

2024-10-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Jonathan Thackray (jthackray) Changes Add support for the following Armv9.6-A architecture extensions: * FEAT_PoPS - Point of Physical Storage as documented here: https://developer.arm.com/documentation/109697/2024_09/Feat

[clang] [llvm] [AArch64] Add support for Armv9.6-A FEAT_PoPS architecture extension (PR #113496)

2024-10-23 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray created https://github.com/llvm/llvm-project/pull/113496 Add support for the following Armv9.6-A architecture extensions: * FEAT_PoPS - Point of Physical Storage as documented here: https://developer.arm.com/documentation/109697/2024_09/Feature-description

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-10-23 Thread Tex Riddell via cfe-commits
@@ -0,0 +1,54 @@ +; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o - -filetype=obj | spirv-val %} + +; Make sure lowering is correctly generating spirv code. + +; CH

[clang] [llvm] [AArch64] Add support for Armv9.6-A FEAT_PoPS architecture extension (PR #113496)

2024-10-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-aarch64 Author: Jonathan Thackray (jthackray) Changes Add support for the following Armv9.6-A architecture extensions: * FEAT_PoPS - Point of Physical Storage as documented here: https://developer.arm.com/doc

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-10-23 Thread via cfe-commits
@@ -18952,6 +18955,142 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: { CGM.getHLSLRuntime().getRadiansIntrinsic(), ArrayRef{Op0}, nullptr, "hlsl.radians"); } + case Builtin::BI__builtin_hlsl_splitdouble: { + +assert((E->getArg(0)->getType()->hasFlo

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-10-23 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/109331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   >