[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-04 Thread Artem Belevich via cfe-commits
@@ -0,0 +1,44 @@ +// RUN: %clang -x cuda %s -Xarch_nvptx64 -O3 -S -nogpulib -nogpuinc -### 2>&1 | FileCheck -check-prefix=O3ONCE %s +// RUN: %clang -x cuda %s -Xarch_device -O3 -S -nogpulib -nogpuinc -### 2>&1 | FileCheck -check-prefix=O3ONCE %s +// RUN: %clang -x hip %s -Xarch_

[clang] [clang] Improve diagnostics for vector builtins (PR #125673)

2025-02-04 Thread Farzon Lotfi via cfe-commits
@@ -2393,8 +2395,10 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { if (CheckVectorElementCallArgs(&SemaRef, TheCall)) return true; if (SemaRef.BuiltinElementwiseTernaryMath( -TheCall, /*CheckForFloatArgs*/ -

[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-04 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,44 @@ +// RUN: %clang -x cuda %s -Xarch_nvptx64 -O3 -S -nogpulib -nogpuinc -### 2>&1 | FileCheck -check-prefix=O3ONCE %s +// RUN: %clang -x cuda %s -Xarch_device -O3 -S -nogpulib -nogpuinc -### 2>&1 | FileCheck -check-prefix=O3ONCE %s +// RUN: %clang -x hip %s -Xarch_

[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-04 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,44 @@ +// RUN: %clang -x cuda %s -Xarch_nvptx64 -O3 -S -nogpulib -nogpuinc -### 2>&1 | FileCheck -check-prefix=O3ONCE %s +// RUN: %clang -x cuda %s -Xarch_device -O3 -S -nogpulib -nogpuinc -### 2>&1 | FileCheck -check-prefix=O3ONCE %s +// RUN: %clang -x hip %s -Xarch_

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-02-04 Thread Farzon Lotfi via cfe-commits
@@ -10623,7 +10623,7 @@ def err_second_argument_to_cwsc_not_pointer : Error< "second argument to __builtin_call_with_static_chain must be of pointer type">; def err_vector_incorrect_num_elements : Error< - "%select{too many|too few}0 elements in vector %select{initializat

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-02-04 Thread Deric Cheung via cfe-commits
@@ -10623,7 +10623,7 @@ def err_second_argument_to_cwsc_not_pointer : Error< "second argument to __builtin_call_with_static_chain must be of pointer type">; def err_vector_incorrect_num_elements : Error< - "%select{too many|too few}0 elements in vector %select{initializat

[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-04 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/125421 >From 3ed4040c18b4a980218a86a37ed8aabd0e395b20 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Sun, 2 Feb 2025 10:39:01 -0600 Subject: [PATCH] [Clang] Make `-Xarch_` handling generic for all toolchains Summar

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2025-02-04 Thread Campbell Barton via cfe-commits
https://github.com/ideasman42 approved this pull request. https://github.com/llvm/llvm-project/pull/112792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-02-04 Thread Farzon Lotfi via cfe-commits
@@ -19105,6 +19105,51 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, return nullptr; switch (BuiltinID) { + case Builtin::BI__builtin_hlsl_adduint64: { farzonl wrote: So while HLSL does not support pointers we do have a concept of

[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-04 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,44 @@ +// RUN: %clang -x cuda %s -Xarch_nvptx64 -O3 -S -nogpulib -nogpuinc -### 2>&1 | FileCheck -check-prefix=O3ONCE %s +// RUN: %clang -x cuda %s -Xarch_device -O3 -S -nogpulib -nogpuinc -### 2>&1 | FileCheck -check-prefix=O3ONCE %s +// RUN: %clang -x hip %s -Xarch_

[clang] [DependencyScanning] Add ability to scan TU with a buffer input (PR #125111)

2025-02-04 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/125111 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clangd] Add support for the c2000 architecture (PR #125663)

2025-02-04 Thread James Nagurne via cfe-commits
@@ -0,0 +1,356 @@ +#include "C2000.h" +#include "Targets.h" +#include "clang/Basic/Builtins.h" +#include "clang/Basic/Diagnostic.h" +#include "clang/Basic/MacroBuilder.h" +#include "clang/Basic/TargetBuiltins.h" + +using namespace clang; +using namespace clang::targets; + +const c

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-02-04 Thread Deric Cheung via cfe-commits
@@ -2023,6 +2024,18 @@ static bool CheckAllArgsHaveFloatRepresentation(Sema *S, CallExpr *TheCall) { checkAllFloatTypes); } +static bool CheckUnsignedIntegerRepresentation(Sema *S, CallExpr *TheCall) { + auto checkUnsignedInteger = [](clan

[clang] [llvm] [clangd] Add support for the c2000 architecture (PR #125663)

2025-02-04 Thread James Nagurne via cfe-commits
@@ -0,0 +1,356 @@ +#include "C2000.h" +#include "Targets.h" +#include "clang/Basic/Builtins.h" +#include "clang/Basic/Diagnostic.h" +#include "clang/Basic/MacroBuilder.h" +#include "clang/Basic/TargetBuiltins.h" + +using namespace clang; +using namespace clang::targets; + +const c

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-02-04 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron edited https://github.com/llvm/llvm-project/pull/125319 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Return larger CXX records in memory (PR #120670)

2025-02-04 Thread via cfe-commits
dyung wrote: @pranavk the test you added seems to fail in a release build without asserts enabled. Can you take a look? https://lab.llvm.org/staging/#/builders/202/builds/857/steps/6/logs/FAIL__Clang__avx-cxx-record_cpp https://github.com/llvm/llvm-project/pull/120670 _

[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-04 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,44 @@ +// RUN: %clang -x cuda %s -Xarch_nvptx64 -O3 -S -nogpulib -nogpuinc -### 2>&1 | FileCheck -check-prefix=O3ONCE %s +// RUN: %clang -x cuda %s -Xarch_device -O3 -S -nogpulib -nogpuinc -### 2>&1 | FileCheck -check-prefix=O3ONCE %s +// RUN: %clang -x hip %s -Xarch_

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-02-04 Thread Deric Cheung via cfe-commits
@@ -10623,7 +10623,7 @@ def err_second_argument_to_cwsc_not_pointer : Error< "second argument to __builtin_call_with_static_chain must be of pointer type">; def err_vector_incorrect_num_elements : Error< - "%select{too many|too few}0 elements in vector %select{initializat

[clang] [llvm] [clangd] Add support for the c2000 architecture (PR #125663)

2025-02-04 Thread James Nagurne via cfe-commits
@@ -929,7 +936,7 @@ def ObjCXX : Flag<["-"], "ObjC++">, Flags<[NoXarchOption]>, def ObjC : Flag<["-"], "ObjC">, Flags<[NoXarchOption]>, HelpText<"Treat source input files as Objective-C inputs">; def O : Joined<["-"], "O">, Group, - Visibility<[ClangOption, CC1Option, FC1Opt

[clang] [llvm] [clangd] Add support for the c2000 architecture (PR #125663)

2025-02-04 Thread James Nagurne via cfe-commits
@@ -0,0 +1,356 @@ +#include "C2000.h" +#include "Targets.h" +#include "clang/Basic/Builtins.h" +#include "clang/Basic/Diagnostic.h" +#include "clang/Basic/MacroBuilder.h" +#include "clang/Basic/TargetBuiltins.h" + +using namespace clang; +using namespace clang::targets; + +const c

[clang] [llvm] [clangd] Add support for the c2000 architecture (PR #125663)

2025-02-04 Thread James Nagurne via cfe-commits
@@ -1571,6 +1572,13 @@ Compilation *Driver::BuildCompilation(ArrayRef ArgList) { } else { Diag(diag::err_drv_dxc_missing_target_profile); } + } else if (IsC2000Mode()) { +llvm::Triple T(TargetTriple); +T.setArch(llvm::Triple::c2000); Drag

[clang] [llvm] [clangd] Add support for the c2000 architecture (PR #125663)

2025-02-04 Thread James Nagurne via cfe-commits
@@ -0,0 +1,356 @@ +#include "C2000.h" +#include "Targets.h" +#include "clang/Basic/Builtins.h" +#include "clang/Basic/Diagnostic.h" +#include "clang/Basic/MacroBuilder.h" +#include "clang/Basic/TargetBuiltins.h" + +using namespace clang; +using namespace clang::targets; + +const c

[clang] [llvm] [clangd] Add support for the c2000 architecture (PR #125663)

2025-02-04 Thread James Nagurne via cfe-commits
@@ -0,0 +1,356 @@ +#include "C2000.h" +#include "Targets.h" +#include "clang/Basic/Builtins.h" +#include "clang/Basic/Diagnostic.h" +#include "clang/Basic/MacroBuilder.h" +#include "clang/Basic/TargetBuiltins.h" + +using namespace clang; +using namespace clang::targets; + +const c

[clang] [llvm] [clangd] Add support for the c2000 architecture (PR #125663)

2025-02-04 Thread James Nagurne via cfe-commits
@@ -0,0 +1,356 @@ +#include "C2000.h" +#include "Targets.h" +#include "clang/Basic/Builtins.h" +#include "clang/Basic/Diagnostic.h" +#include "clang/Basic/MacroBuilder.h" +#include "clang/Basic/TargetBuiltins.h" + +using namespace clang; +using namespace clang::targets; + +const c

[clang] [llvm] [clangd] Add support for the c2000 architecture (PR #125663)

2025-02-04 Thread James Nagurne via cfe-commits
@@ -0,0 +1,22 @@ +#include "clang/Driver/Driver.h" +#include "clang/Driver/DriverDiagnostic.h" +#include "clang/Driver/InputInfo.h" +#include "clang/Driver/Tool.h" +#include "clang/Driver/ToolChain.h" +#include "llvm/ADT/StringRef.h" +#include "llvm/Option/Option.h" + +#include +

[clang] [llvm] [clangd] Add support for the c2000 architecture (PR #125663)

2025-02-04 Thread James Nagurne via cfe-commits
@@ -9111,3 +9118,50 @@ def wasm_opt : Flag<["--"], "wasm-opt">, Group, HelpText<"Enable the wasm-opt optimizer (default)">, MarshallingInfoNegativeFlag>; + + + +//===--===// +// cl2000 Options +//===-

[clang] [llvm] [clangd] Add support for the c2000 architecture (PR #125663)

2025-02-04 Thread James Nagurne via cfe-commits
@@ -0,0 +1,100 @@ +#ifndef LLVM_CLANG_LIB_BASIC_TARGETS_C2000_H +#define LLVM_CLANG_LIB_BASIC_TARGETS_C2000_H + +#include "clang/Basic/LLVM.h" +#include "clang/Basic/TargetInfo.h" +#include "llvm/Support/Compiler.h" +#include "llvm/TargetParser/Triple.h" + +namespace clang { +name

[clang] [llvm] [clangd] Add support for the c2000 architecture (PR #125663)

2025-02-04 Thread James Nagurne via cfe-commits
@@ -0,0 +1,356 @@ +#include "C2000.h" +#include "Targets.h" +#include "clang/Basic/Builtins.h" +#include "clang/Basic/Diagnostic.h" +#include "clang/Basic/MacroBuilder.h" +#include "clang/Basic/TargetBuiltins.h" + +using namespace clang; +using namespace clang::targets; + +const c

[clang] [llvm] [clangd] Add support for the c2000 architecture (PR #125663)

2025-02-04 Thread James Nagurne via cfe-commits
@@ -0,0 +1,100 @@ +#ifndef LLVM_CLANG_LIB_BASIC_TARGETS_C2000_H +#define LLVM_CLANG_LIB_BASIC_TARGETS_C2000_H + +#include "clang/Basic/LLVM.h" +#include "clang/Basic/TargetInfo.h" +#include "llvm/Support/Compiler.h" +#include "llvm/TargetParser/Triple.h" + +namespace clang { +name

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-02-04 Thread Farzon Lotfi via cfe-commits
@@ -10623,7 +10623,7 @@ def err_second_argument_to_cwsc_not_pointer : Error< "second argument to __builtin_call_with_static_chain must be of pointer type">; def err_vector_incorrect_num_elements : Error< - "%select{too many|too few}0 elements in vector %select{initializat

[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-04 Thread Artem Belevich via cfe-commits
@@ -0,0 +1,44 @@ +// RUN: %clang -x cuda %s -Xarch_nvptx64 -O3 -S -nogpulib -nogpuinc -### 2>&1 | FileCheck -check-prefix=O3ONCE %s +// RUN: %clang -x cuda %s -Xarch_device -O3 -S -nogpulib -nogpuinc -### 2>&1 | FileCheck -check-prefix=O3ONCE %s +// RUN: %clang -x hip %s -Xarch_

[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-04 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B edited https://github.com/llvm/llvm-project/pull/125421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP][SIMD][FIX] Use conservative "omp simd ordered" lowering (PR #123867)

2025-02-04 Thread via cfe-commits
MattPD wrote: Thank you! Feel free to merge as I can't :-) https://github.com/llvm/llvm-project/pull/123867 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clangd] Add support for the c2000 architecture (PR #125663)

2025-02-04 Thread James Nagurne via cfe-commits
@@ -0,0 +1,356 @@ +#include "C2000.h" +#include "Targets.h" +#include "clang/Basic/Builtins.h" +#include "clang/Basic/Diagnostic.h" +#include "clang/Basic/MacroBuilder.h" +#include "clang/Basic/TargetBuiltins.h" + +using namespace clang; +using namespace clang::targets; + +const c

[clang] Patch series to reapply #118734 and substantially improve it (PR #120534)

2025-02-04 Thread via cfe-commits
h-vetinari wrote: If you want to backport this, you need to add the PR to the milestone and comment `/cherry-pick...` Then the bot should open a PR (or it'll tell you if it failed to cherry-pick, and how to proceed from there). https://github.com/llvm/llvm-project/pull/120534 __

[clang] [clang] Return larger CXX records in memory (PR #120670)

2025-02-04 Thread Pranav Kant via cfe-commits
pranavk wrote: Checking ... https://github.com/llvm/llvm-project/pull/120670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-04 Thread Arthur Eubanks via cfe-commits
@@ -2949,15 +2950,32 @@ static void handleSectionAttr(Sema &S, Decl *D, const ParsedAttr &AL) { } } +static bool isValidCodeModelAttr(Sema &S, StringRef Str) { + if (S.Context.getTargetInfo().getTriple().isLoongArch()) { +return Str == "normal" || Str == "medium" || St

[clang] [webkit.UncountedLambdaCapturesChecker] Fix a bug that the checker didn't take the object pointer into account. (PR #125662)

2025-02-04 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: Thanks for the review! https://github.com/llvm/llvm-project/pull/125662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-04 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,44 @@ +// RUN: %clang -x cuda %s -Xarch_nvptx64 -O3 -S -nogpulib -nogpuinc -### 2>&1 | FileCheck -check-prefix=O3ONCE %s +// RUN: %clang -x cuda %s -Xarch_device -O3 -S -nogpulib -nogpuinc -### 2>&1 | FileCheck -check-prefix=O3ONCE %s +// RUN: %clang -x hip %s -Xarch_

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-02-04 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron updated https://github.com/llvm/llvm-project/pull/125319 >From 1e194fdf6dc731276cd867501708b348e3bbc97c Mon Sep 17 00:00:00 2001 From: Icohedron Date: Mon, 27 Jan 2025 11:18:09 -0800 Subject: [PATCH 1/4] Implement AddUint64 HLSL codegen and sema --- clang/include/

[clang] Patch series to reapply #118734 and substantially improve it (PR #120534)

2025-02-04 Thread via cfe-commits
llvmbot wrote: >If you want to backport this, you need to add the PR to the milestone and >comment > >`/cherry-pick...` > >Then the bot should open a PR (or it'll tell you if it failed to cherry-pick, >and how to proceed from there). Error: Command failed due to missing milestone. https

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-04 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks updated https://github.com/llvm/llvm-project/pull/124834 >From 7c40169ec7430ec64aaeb053e423eca1ceff7f0d Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Tue, 28 Jan 2025 20:36:58 + Subject: [PATCH 1/6] [clang][X86] Support __attribute__((model("small"/"large"

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-02-04 Thread Deric Cheung via cfe-commits
@@ -0,0 +1,17 @@ +; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s + +; DXIL operation UAddc only supports i32. Other integer types are unsupported. +; CHECK: in function uaddc_i16 Icohedron wrote: LLVM ERROR is not

[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-04 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/125421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 32be90d - [emacs][clang-format] Add elisp API for clang-format on git diffs (#112792)

2025-02-04 Thread via cfe-commits
Author: goldsteinn Date: 2025-02-04T17:17:43-06:00 New Revision: 32be90db269a6dbb876b99f6ef3df6563f66315a URL: https://github.com/llvm/llvm-project/commit/32be90db269a6dbb876b99f6ef3df6563f66315a DIFF: https://github.com/llvm/llvm-project/commit/32be90db269a6dbb876b99f6ef3df6563f66315a.diff LO

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-02-04 Thread Deric Cheung via cfe-commits
@@ -0,0 +1,46 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify + +uint2 test_too_few_arg() { + return __builtin_hlsl_adduint64(); + // expected-error@-1 {{too few arguments

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-02-04 Thread Deric Cheung via cfe-commits
@@ -21,6 +21,7 @@ #include "clang/AST/Type.h" #include "clang/AST/TypeLoc.h" #include "clang/Basic/Builtins.h" +#include "clang/Basic/DiagnosticParse.h" Icohedron wrote: Removed with commit [28b7eb8](https://github.com/llvm/llvm-project/pull/125319/commits/28

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-02-04 Thread Deric Cheung via cfe-commits
@@ -0,0 +1,46 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify + +uint2 test_too_few_arg() { + return __builtin_hlsl_adduint64(); + // expected-error@-1 {{too few arguments

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-02-04 Thread Deric Cheung via cfe-commits
@@ -2214,6 +2227,42 @@ static bool CheckResourceHandle( // returning an ExprError bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { switch (BuiltinID) { + case Builtin::BI__builtin_hlsl_adduint64: { +if (SemaRef.checkArgCount(TheCall, 2))

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2025-02-04 Thread via cfe-commits
https://github.com/goldsteinn closed https://github.com/llvm/llvm-project/pull/112792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-04 Thread Artem Belevich via cfe-commits
@@ -0,0 +1,44 @@ +// RUN: %clang -x cuda %s -Xarch_nvptx64 -O3 -S -nogpulib -nogpuinc -### 2>&1 | FileCheck -check-prefix=O3ONCE %s +// RUN: %clang -x cuda %s -Xarch_device -O3 -S -nogpulib -nogpuinc -### 2>&1 | FileCheck -check-prefix=O3ONCE %s +// RUN: %clang -x hip %s -Xarch_

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-02-04 Thread Deric Cheung via cfe-commits
@@ -10623,7 +10623,7 @@ def err_second_argument_to_cwsc_not_pointer : Error< "second argument to __builtin_call_with_static_chain must be of pointer type">; def err_vector_incorrect_num_elements : Error< - "%select{too many|too few}0 elements in vector %select{initializat

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-04 Thread Artem Belevich via cfe-commits
@@ -2949,15 +2950,32 @@ static void handleSectionAttr(Sema &S, Decl *D, const ParsedAttr &AL) { } } +static bool isValidCodeModelAttr(Sema &S, StringRef Str) { + if (S.Context.getTargetInfo().getTriple().isLoongArch()) { +return Str == "normal" || Str == "medium" || St

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-02-04 Thread Deric Cheung via cfe-commits
@@ -359,18 +359,21 @@ class OpLowerer { return lowerToBindAndAnnotateHandle(F); } - Error replaceSplitDoubleCallUsages(CallInst *Intrin, CallInst *Op) { + Error replaceExtractElementTypeOfCallUsages(CallInst *Intrin, CallInst *Op) { for (Use &U : make_early_inc_ra

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2025-02-04 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` running on `doug-worker-4` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/14086 Here is th

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-02-04 Thread Deric Cheung via cfe-commits
@@ -359,18 +359,21 @@ class OpLowerer { return lowerToBindAndAnnotateHandle(F); } - Error replaceSplitDoubleCallUsages(CallInst *Intrin, CallInst *Op) { + Error replaceExtractElementTypeOfCallUsages(CallInst *Intrin, CallInst *Op) { for (Use &U : make_early_inc_ra

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-02-04 Thread Deric Cheung via cfe-commits
@@ -359,18 +359,21 @@ class OpLowerer { return lowerToBindAndAnnotateHandle(F); } - Error replaceSplitDoubleCallUsages(CallInst *Intrin, CallInst *Op) { + Error replaceExtractElementTypeOfCallUsages(CallInst *Intrin, CallInst *Op) { for (Use &U : make_early_inc_ra

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-02-04 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron edited https://github.com/llvm/llvm-project/pull/125319 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ARM] Adding diagnostics for mcmodel=tiny when used in invalid targets (PR #125643)

2025-02-04 Thread via cfe-commits
https://github.com/hstk30-hw edited https://github.com/llvm/llvm-project/pull/125643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] default clause replaced by otherwise clause for metadirective in OpenMP 5.2 (PR #125648)

2025-02-04 Thread Urvi Rav via cfe-commits
https://github.com/ravurvi20 updated https://github.com/llvm/llvm-project/pull/125648 >From 189dd3cc2230ea5752969f02f119b6ee30e3df69 Mon Sep 17 00:00:00 2001 From: Urvi Rav Date: Tue, 4 Feb 2025 01:35:41 -0600 Subject: [PATCH 1/2] default clause replaced by otherwise clause for metadirective

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-02-04 Thread Owen Pan via cfe-commits
@@ -11224,6 +11224,328 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateCloser) { + FormatStyle Style = getLLVMStyle(); + // Begin with tests covering the case where there is no constraint on the + // col

[clang] [clang-format] add BinPackLongBracedLists style option (PR #112482)

2025-02-04 Thread Owen Pan via cfe-commits
owenca wrote: What about changing it to an option (e.g. `BinPackBracedListThreshold`) with a default value of about 20? If the number of elements in the list is more than the threshold, they will be bin packed even if `BinPackArguments` is set to false. https://github.com/llvm/llvm-project/pu

[clang] [llvm] Introduce -defer-thinlto-prelink-coro-split that skips Coro passes in ThinLTO pre-link pipeline (PR #107153)

2025-02-04 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: #104525 is still crashing, what we can do about that? https://github.com/llvm/llvm-project/pull/107153 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-02-04 Thread Owen Pan via cfe-commits
@@ -11224,6 +11224,328 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateCloser) { + FormatStyle Style = getLLVMStyle(); + // Begin with tests covering the case where there is no constraint on the + // col

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-02-04 Thread via cfe-commits
@@ -11224,6 +11224,328 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateCloser) { + FormatStyle Style = getLLVMStyle(); + // Begin with tests covering the case where there is no constraint on the + // col

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-02-04 Thread via cfe-commits
leijurv wrote: GitHub is having issues it appears - the commit https://github.com/leijurv/llvm-project/commit/e1eaba9b05b00adf44628e2ceb1b3374fec902cb is certainly pushed, and I even tried pushing an empty commit on top to kick github into working, https://github.com/leijurv/llvm-project/comm

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-02-04 Thread via cfe-commits
@@ -11224,6 +11224,328 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateCloser) { + FormatStyle Style = getLLVMStyle(); + // Begin with tests covering the case where there is no constraint on the + // col

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-02-04 Thread via cfe-commits
@@ -11224,6 +11224,328 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateCloser) { + FormatStyle Style = getLLVMStyle(); + // Begin with tests covering the case where there is no constraint on the + // col

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-02-04 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From 1caf823165b16f6701993d586df51d5cdbf0885e Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH 01/19] [clang-format] Add BreakBeforeTemplateClose option --- clang/d

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-02-04 Thread via cfe-commits
leijurv wrote: Ah, it resolved itself as of https://github.com/leijurv/llvm-project/commit/b6219e250b80114c9b93a7762db7c3e0cbd84260 https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

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

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-02-04 Thread Owen Pan via cfe-commits
@@ -11224,6 +11224,328 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateCloser) { + FormatStyle Style = getLLVMStyle(); + // Begin with tests covering the case where there is no constraint on the + // col

[clang] 54acda2 - [clang module] Current Working Directory Pruning (#124786)

2025-02-04 Thread via cfe-commits
Author: Qiongsi Wu Date: 2025-02-04T20:04:39-08:00 New Revision: 54acda2e0ebdf240deeef4d51fc3240c5548dbb7 URL: https://github.com/llvm/llvm-project/commit/54acda2e0ebdf240deeef4d51fc3240c5548dbb7 DIFF: https://github.com/llvm/llvm-project/commit/54acda2e0ebdf240deeef4d51fc3240c5548dbb7.diff LO

[clang] [clang module] Current Working Directory Pruning (PR #124786)

2025-02-04 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu closed https://github.com/llvm/llvm-project/pull/124786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] Silence -Wunused-parameter warnings in Unwind-wasm.c (PR #125412)

2025-02-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay requested changes to this pull request. What's your build option? llvm-project considers this warning low value and llvm/cmake/modules/HandleLLVMOptions.cmake specifies -Wno-unused-parameter. https://github.com/llvm/llvm-project/pull/125412 __

[clang] [clang-format] add BinPackLongBracedLists style option (PR #112482)

2025-02-04 Thread Gedare Bloom via cfe-commits
gedare wrote: > What about changing it to an option (e.g. `BinPackBracedListThreshold`) with > a default value of about 20? If the number of elements in the list is more > than the threshold, they will be bin packed even if `BinPackArguments` is set > to false. That was my original approach,

[clang] [Driver] Teach Barmetal toolchain about GCC installation(1/3) (PR #121829)

2025-02-04 Thread Fangrui Song via cfe-commits
@@ -110,20 +111,93 @@ static std::string computeBaseSysRoot(const Driver &D, bool IncludeTriple) { return std::string(SysRootDir); } +// GCC sysroot here means form sysroot from either --gcc-install-dir, or from +// --gcc-toolchain or if the toolchain is installed alongside

[clang] [Driver] Teach Barmetal toolchain about GCC installation(1/3) (PR #121829)

2025-02-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/121829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Destroy local variables in reverse order (PR #125727)

2025-02-04 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/125727 See the attached test case. >From c4eb23f06871536c4df8842b5065fa6f470aa2ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 4 Feb 2025 18:08:00 +0100 Subject: [PATCH] [clang][bytecode] D

[clang] Pass -offload-lto instead of -lto for cuda/hip kernels (PR #125243)

2025-02-04 Thread Omar Ahmed via cfe-commits
@@ -498,12 +498,16 @@ Expected clang(ArrayRef InputFiles, const ArgList &Args) { }; // Forward all of the `--offload-opt` and similar options to the device. - CmdArgs.push_back("-flto"); for (auto &Arg : Args.filtered(OPT_offload_opt_eq_minus, OPT_mllvm)) CmdArgs

[clang] [clang][bytecode][NFC] Print desriptor PrimType in dump() (PR #125726)

2025-02-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/125726.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/Disasm.cpp (+1-1) ``diff diff --git a/clang/lib/AST/ByteCode/Disasm.cp

[clang] [Clang] disallow attributes on void parameters (PR #124920)

2025-02-04 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/124920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Offload] Unify offloading entries into a single section (PR #125731)

2025-02-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Joseph Huber (jhuber6) Changes Summary: This patch unifies the existing offloading entires into a single section called `llvm_offload_entires`. This lets us use a more unified offloading infrastructure so that all targets share the s

[clang] [CIR] Lowering to LLVM for global pointers (PR #125619)

2025-02-04 Thread Andy Kaylor via cfe-commits
@@ -84,6 +138,19 @@ mlir::LogicalResult CIRToLLVMGlobalOpLowering::matchAndRewrite( SmallVector attributes; if (init.has_value()) { +auto setupRegionInitializedLLVMGlobalOp = [&]() { andykaylor wrote: It's not quite as bad there because everything is

[clang] [llvm] [Offload] Unify offloading entries into a single section (PR #125731)

2025-02-04 Thread Joseph Huber via cfe-commits
@@ -437,22 +441,6 @@ static int loadImagesOntoDevice(DeviceTy &Device) { __tgt_target_table *TargetTable = TransTable->TargetsTable[DeviceId] = &TransTable->DeviceTables[DeviceId]; - // 4) Verify whether the two table sizes match. - size_t Hsize = -

[clang] Patch series to reapply #118734 and substantially improve it (PR #120534)

2025-02-04 Thread Chandler Carruth via cfe-commits
chandlerc wrote: > > But one specific question: would you prefer me to land as a series of > > commits or a single squashed commit for the entire PR? I'm happy either > > way. My mild preference is to prefer the series of commits, but open to > > suggestions here. > > I would land it as the s

[clang] [clang][bytecode][NFC] Print desriptor PrimType in dump() (PR #125726)

2025-02-04 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/125726 None >From 2b1e24f4e13511a5f436b6598575f39efed89ac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 4 Feb 2025 18:10:32 +0100 Subject: [PATCH] [clang][bytecode][NFC] Print desriptor Pri

[clang] [llvm] [Offload] Unify offloading entries into a single section (PR #125731)

2025-02-04 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/125731 Summary: This patch unifies the existing offloading entires into a single section called `llvm_offload_entires`. This lets us use a more unified offloading infrastructure so that all targets share the same handli

[clang] [CIR] Lowering to LLVM for global pointers (PR #125619)

2025-02-04 Thread Erich Keane via cfe-commits
@@ -84,6 +138,19 @@ mlir::LogicalResult CIRToLLVMGlobalOpLowering::matchAndRewrite( SmallVector attributes; if (init.has_value()) { +auto setupRegionInitializedLLVMGlobalOp = [&]() { erichkeane wrote: Ah, hrmph. That is unfortunately a much nicer ve

[clang] Thread Safety Analysis: Support warning on obtaining address of guarded variables (PR #123063)

2025-02-04 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: > > Doesn't `counted_by` have the same requirements? If not, why does > > guarded_by? > > It does, AFAIK. But counted_by _isn't_ using `-fexperimental-late-parse-attributes` IIUC. Do they have the same problem then of needing to reorder member declarations? cc @kees @i

[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-04 Thread Joseph Huber via cfe-commits
jhuber6 wrote: Good > > Right now it works as I'd expect, it passes --offload-arch=sm_52 to the > > sm_52 compilation, but no other architecture. > > What happens with that `--offload-arch=sm_52` when cc1 sees it? Ideally there > should be either an unused argument warning, or an error is th

[clang] [clang] Return larger CXX records in memory (PR #120670)

2025-02-04 Thread Pranav Kant via cfe-commits
pranavk wrote: Thank you https://github.com/llvm/llvm-project/pull/120670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][counted-by] Bail out of visitor for LValueToRValue cast (PR #125571)

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

[clang] Thread Safety Analysis: Support warning on obtaining address of guarded variables (PR #123063)

2025-02-04 Thread Marco Elver via cfe-commits
melver wrote: > Doesn't `counted_by` have the same requirements? If not, why does guarded_by? It does, AFAIK. > Sure, I can imagine where there might be pushback, but perhaps its worthwhile > to see how far you can get with either marking structs that don't need > `-fexperimental-late-parse-a

[clang] [HLSL] Constant buffer layout struct update (PR #124840)

2025-02-04 Thread Helena Kotas via cfe-commits
hekota wrote: All of these changes except one are related to layout structs. I will update the PR description to make it clearer and move that one unrelated change about synthetizing initializers to the constant buffer codegen PR. https://github.com/llvm/llvm-project/pull/124840 __

[clang] [HLSL] Constant buffer layout struct update (PR #124840)

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

[clang] [clang module] Current Working Directory Pruning (PR #124786)

2025-02-04 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan approved this pull request. LGTM with some small style comments. https://github.com/llvm/llvm-project/pull/124786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [clang module] Current Working Directory Pruning (PR #124786)

2025-02-04 Thread Steven Wu via cfe-commits
@@ -397,9 +397,91 @@ void ModuleDepCollector::applyDiscoveredDependencies(CompilerInvocation &CI) { } } +static bool isSafeToIgnoreCWD(const CowCompilerInvocation &CI) { + // Check if the command line input uses relative paths. + // It is not safe to ignore the current wo

[clang] [clang module] Current Working Directory Pruning (PR #124786)

2025-02-04 Thread Steven Wu via cfe-commits
@@ -63,7 +63,10 @@ enum class ScanningOptimizations { /// Canonicalize -D and -U options. Macros = 8, - DSS_LAST_BITMASK_ENUM(Macros), + /// Ignore the compiler's working directory if it is safe. + IgnoreCWD = 0x10, cachemeifyoucan wrote: Nit: maybe up

[clang] [clang module] Current Working Directory Pruning (PR #124786)

2025-02-04 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan edited https://github.com/llvm/llvm-project/pull/124786 ___ 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   >