[clang] [Clang] Automatically enable `-fconvergent-functions` on GPU targets (PR #111076)

2024-10-03 Thread Matt Arsenault via cfe-commits
@@ -4106,9 +4106,10 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, Opts.Blocks = Args.hasArg(OPT_fblocks) || (Opts.OpenCL && Opts.OpenCLVersion == 200); - Opts.ConvergentFunctions = Args.hasArg(OPT_fconvergent_functions) || -

[clang] [Clang] Automatically enable `-fconvergent-functions` on GPU targets (PR #111076)

2024-10-03 Thread Matt Arsenault via cfe-commits
arsenm wrote: > -fno-convergent-functions to opt-out if you want to test broken behavior. You may legitimately know there are no convergent functions in the TU. We also have the noconvergent source attribute now for this https://github.com/llvm/llvm-project/pull/111076 __

[clang] [clang][docs] Add documentation for APValue constructors (PR #109994)

2024-10-03 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/109994 >From 5a0832c88169e12e43deb498ead994e04966bb59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 25 Sep 2024 16:42:55 +0200 Subject: [PATCH] [clang][docs] Add documentation for APValue con

[clang] [clang] Implement constexpr __builtin_bit_cast for complex types (PR #109981)

2024-10-03 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/109981 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Create bugprone-bitwise-pointer-cast check (PR #108083)

2024-10-03 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/108083 >From 1b1d54e0ce0d0bc4250ff045840b0a0a7bac59a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Tue, 10 Sep 2024 13:46:51 + Su

[clang-tools-extra] [clang-tidy] Create bugprone-bitwise-pointer-cast check (PR #108083)

2024-10-03 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/108083 >From 1b1d54e0ce0d0bc4250ff045840b0a0a7bac59a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Tue, 10 Sep 2024 13:46:51 + Su

[clang] [Clang][Driver] Support relative paths for CLANG_CONFIG_FILE_SYSTEM_DIR (PR #110962)

2024-10-03 Thread via cfe-commits
github-actions[bot] wrote: @carlocab Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a build

[clang] [Clang][Driver] Support relative paths for CLANG_CONFIG_FILE_SYSTEM_DIR (PR #110962)

2024-10-03 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/110962 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1682c99 - [Clang][Driver] Support relative paths for CLANG_CONFIG_FILE_SYSTEM_DIR (#110962)

2024-10-03 Thread via cfe-commits
Author: Carlo Cabrera Date: 2024-10-03T23:10:03-07:00 New Revision: 1682c99a8877364f1d847395cef501e813804caa URL: https://github.com/llvm/llvm-project/commit/1682c99a8877364f1d847395cef501e813804caa DIFF: https://github.com/llvm/llvm-project/commit/1682c99a8877364f1d847395cef501e813804caa.diff

[clang] [Clang][Driver] Support relative paths for CLANG_CONFIG_FILE_SYSTEM_DIR (PR #110962)

2024-10-03 Thread Carlo Cabrera via cfe-commits
carlocab wrote: That's annoying. Thanks GitHub. I've updating my settings now. https://github.com/llvm/llvm-project/pull/110962 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle template closer followed by braces (PR #110971)

2024-10-03 Thread Carlos Galvez via cfe-commits
@@ -3538,6 +3538,11 @@ TEST_F(TokenAnnotatorTest, TemplateInstantiation) { ASSERT_EQ(Tokens.size(), 11u) << Tokens; EXPECT_TOKEN(Tokens[2], tok::less, TT_TemplateOpener); EXPECT_TOKEN(Tokens[6], tok::greater, TT_TemplateCloser); + + Tokens = annotate("return std::conditi

[clang] [Clang][Driver] Support relative paths for CLANG_CONFIG_FILE_SYSTEM_DIR (PR #110962)

2024-10-03 Thread Fangrui Song via cfe-commits
MaskRay wrote: > This commit will be authored by 30379873+carlo...@users.noreply.github.com "Squash and merge" uses the PR author's github's setting. The commit email is completely ignored (unless there is another contributor, which would lead to a Co-authored-by:) https://github.com/llvm/llv

[clang] [llvm] [IR] Allow fast math flags on calls with homogeneous FP struct types (PR #110506)

2024-10-03 Thread Mikael Holmén via cfe-commits
mikaelholmen wrote: Hi, I bisected a crash to this patch. I can't share the C reproducer but it's instcombine that crashes and a reduced reproducer for that is ```opt -passes=instcombine bbi-99792.ll -o /dev/null``` [bbi-99792.ll.gz](https://github.com/user-attachments/files/17253640/bbi-99792

[clang] [Clang][Driver] Support relative paths for CLANG_CONFIG_FILE_SYSTEM_DIR (PR #110962)

2024-10-03 Thread Carlo Cabrera via cfe-commits
carlocab wrote: I authored my commit using a working email address. See the [header](https://github.com/llvm/llvm-project/commit/e31545f666eb4ca32030956a38dbc4078a64068c.patch) of the patch: ``` >From e31545f666eb4ca32030956a38dbc4078a64068c Mon Sep 17 00:00:00 2001 From: Carlo Cabrera Date: T

[clang] [libc] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-10-03 Thread Thorsten Schütt via cfe-commits
tschuett wrote: IIRC, you discussed once to have GPU-agnostic intrinsics in LLVM-IR. The backends then have to handle the details. https://github.com/llvm/llvm-project/pull/110179 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [Clang][Driver] Support relative paths for CLANG_CONFIG_FILE_SYSTEM_DIR (PR #110962)

2024-10-03 Thread Fangrui Song via cfe-commits
MaskRay wrote: Note: you are using github's private email address feature, but llvm-project prefers to show the real email address. Actually, there is a bot detecting the issue and making a message, though it has some issues and does not trigger on this PR. https://github.com/llvm/llvm-projec

[clang] [llvm] [PGO]Add `-fdiagnostics-show-profile-count` option to show real loop count from instr-profile (PR #75021)

2024-10-03 Thread Elvis Wang via cfe-commits
https://github.com/ElvisWang123 closed https://github.com/llvm/llvm-project/pull/75021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Driver] Support relative paths for CLANG_CONFIG_FILE_SYSTEM_DIR (PR #110962)

2024-10-03 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/110962 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV][FMV] Support target_version (PR #99040)

2024-10-03 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-bootstrap-asan` running on `sanitizer-buildbot2` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/52/builds/2670 Here is the relevan

[clang] [RISCV][FMV] Support target_version (PR #99040)

2024-10-03 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-bootstrap-ubsan` running on `sanitizer-buildbot4` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/25/builds/3046 Here is the releva

[clang] Revert "[RISCV][FMV] Support target_version" (PR #111096)

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

[clang] [clang-format] Make some binary operations imply requires clause (PR #110942)

2024-10-03 Thread Owen Pan via cfe-commits
@@ -3528,6 +3528,17 @@ bool UnwrappedLineParser::parseRequires() { return false; } break; +case tok::equalequal: +case tok::greaterequal: +case tok::lessequal: +case tok::r_paren: +case tok::pipepipe: + if (OpenAngles == 0) { +

[clang-tools-extra] [clang-tidy] Create bugprone-incorrect-enable-shared-from-this check (PR #102299)

2024-10-03 Thread via cfe-commits
@@ -98,6 +98,13 @@ Improvements to clang-tidy New checks ^^ +- New :doc:`bugprone-incorrect-enable-shared-from-this + ` check. + + Check if class/structs publicly inherits from ``std::enable_shared_from_this``, MichelleCDjunaidi wrote: Noted, will

[clang-tools-extra] [clang-tidy] Create bugprone-incorrect-enable-shared-from-this check (PR #102299)

2024-10-03 Thread via cfe-commits
@@ -0,0 +1,34 @@ +.. title:: clang-tidy - bugprone-incorrect-enable-shared-from-this + +bugprone-incorrect-enable-shared-from-this +== + +Checks if a class or struct publicly inherits from +``std::enable_shared_from_this``, because unintend

[clang] [clang-format] Handle template closer followed by braces (PR #110971)

2024-10-03 Thread Owen Pan via cfe-commits
@@ -3538,6 +3538,11 @@ TEST_F(TokenAnnotatorTest, TemplateInstantiation) { ASSERT_EQ(Tokens.size(), 11u) << Tokens; EXPECT_TOKEN(Tokens[2], tok::less, TT_TemplateOpener); EXPECT_TOKEN(Tokens[6], tok::greater, TT_TemplateCloser); + + Tokens = annotate("return std::conditi

[clang-tools-extra] [clang-tidy] Create bugprone-incorrect-enable-shared-from-this check (PR #102299)

2024-10-03 Thread via cfe-commits
@@ -0,0 +1,34 @@ +.. title:: clang-tidy - bugprone-incorrect-enable-shared-from-this + +bugprone-incorrect-enable-shared-from-this +== + +Checks if a class or struct publicly inherits from +``std::enable_shared_from_this``, because unintend

[clang-tools-extra] [clang-tidy] Create bugprone-incorrect-enable-shared-from-this check (PR #102299)

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

[clang-tools-extra] [clang-tidy] Create bugprone-incorrect-enable-shared-from-this check (PR #102299)

2024-10-03 Thread via cfe-commits
@@ -98,6 +98,13 @@ Improvements to clang-tidy New checks ^^ +- New :doc:`bugprone-incorrect-enable-shared-from-this + ` check. + + Check if class/structs publicly inherits from ``std::enable_shared_from_this``, EugeneZelenko wrote: ```suggestion

[clang] Revert "[RISCV][FMV] Support target_version" (PR #111096)

2024-10-03 Thread Piyou Chen via cfe-commits
https://github.com/BeMg closed https://github.com/llvm/llvm-project/pull/111096 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1e5e153 - Revert "[RISCV][FMV] Support target_version" (#111096)

2024-10-03 Thread via cfe-commits
Author: Piyou Chen Date: 2024-10-04T12:02:39+08:00 New Revision: 1e5e153485b817422c311f9326e80781a83ea7bc URL: https://github.com/llvm/llvm-project/commit/1e5e153485b817422c311f9326e80781a83ea7bc DIFF: https://github.com/llvm/llvm-project/commit/1e5e153485b817422c311f9326e80781a83ea7bc.diff LO

[clang-tools-extra] [clang-tidy] Create bugprone-incorrect-enable-shared-from-this check (PR #102299)

2024-10-03 Thread via cfe-commits
MichelleCDjunaidi wrote: @EugeneZelenko @5chmidti Any updates on the feedback? Is this ready to merge? https://github.com/llvm/llvm-project/pull/102299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] Revert "[RISCV][FMV] Support target_version" (PR #111096)

2024-10-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Piyou Chen (BeMg) Changes Reverts llvm/llvm-project#99040 to fix https://lab.llvm.org/buildbot/#/builders/190/builds/7052 --- Patch is 57.55 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/1110

[clang] Revert "[RISCV][FMV] Support target_version" (PR #111096)

2024-10-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Piyou Chen (BeMg) Changes Reverts llvm/llvm-project#99040 to fix https://lab.llvm.org/buildbot/#/builders/190/builds/7052 --- Patch is 57.55 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/p

[clang] Revert "[RISCV][FMV] Support target_version" (PR #111096)

2024-10-03 Thread Piyou Chen via cfe-commits
https://github.com/BeMg created https://github.com/llvm/llvm-project/pull/111096 Reverts llvm/llvm-project#99040 to fix https://lab.llvm.org/buildbot/#/builders/190/builds/7052 >From 32174720649068de7c4ef97a484d777dba72e65c Mon Sep 17 00:00:00 2001 From: Piyou Chen Date: Fri, 4 Oct 2024 11:55:

[clang] [RISCV][FMV] Support target_version (PR #99040)

2024-10-03 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-fast` running on `sanitizer-buildbot3` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/169/builds/3933 Here is the relevant piece o

[clang] [RISCV][FMV] Support target_version (PR #99040)

2024-10-03 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-hexagon-elf` running on `hexagon-build-02` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/40/builds/2132 Here is the relevant piece of the buil

[clang] [RISCV][FMV] Support target_version (PR #99040)

2024-10-03 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-5` 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/7052 Here is the

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

2024-10-03 Thread Farzon Lotfi via cfe-commits
@@ -85,4 +85,9 @@ def int_dx_rsqrt : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>] def int_dx_wave_is_first_lane : DefaultAttrsIntrinsic<[llvm_i1_ty], [], [IntrConvergent]>; def int_dx_sign : DefaultAttrsIntrinsic<[LLVMScalarOrSameVectorWidth<0, llvm_i32_ty>],

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

2024-10-03 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl deleted 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-03 Thread Farzon Lotfi via cfe-commits
@@ -82,5 +82,5 @@ let TargetPrefix = "spv" in { [llvm_anyint_ty, LLVMScalarOrSameVectorWidth<0, LLVMVectorElementType<0>>], [IntrNoMem, Commutative] >; def int_spv_wave_is_first_lane : DefaultAttrsIntrinsic<[llvm_i1_ty], [], [IntrConvergent]>; - def int_spv_sign : D

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

2024-10-03 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-03 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] [Clang][Sema] Fix templated array size calculation. (PR #96464)

2024-10-03 Thread via cfe-commits
https://github.com/awson updated https://github.com/llvm/llvm-project/pull/96464 >From 096b999120cc28844d780acbc16f8308b3a54160 Mon Sep 17 00:00:00 2001 From: awson Date: Mon, 24 Jun 2024 10:34:51 +0300 Subject: [PATCH 1/3] [Clang][Sema] don't handle ArraySize/AllocType early. --- clang/lib/Se

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

2024-10-03 Thread Farzon Lotfi via cfe-commits
@@ -489,6 +542,9 @@ class OpLowerer { case Intrinsic::dx_typedBufferStore: HasErrors |= lowerTypedBufferStore(F); break; + case Intrinsic::dx_splitdouble: farzonl wrote: I'd like to see all the changes to `DXILOpLowering.cpp` removed

[clang] [RISCV][FMV] Support target_version (PR #99040)

2024-10-03 Thread Piyou Chen via cfe-commits
https://github.com/BeMg closed https://github.com/llvm/llvm-project/pull/99040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7ab488e - [RISCV][FMV] Support target_version (#99040)

2024-10-03 Thread via cfe-commits
Author: Piyou Chen Date: 2024-10-04T11:02:45+08:00 New Revision: 7ab488e92c39c813a50cb4fd6587e7afc161c7d5 URL: https://github.com/llvm/llvm-project/commit/7ab488e92c39c813a50cb4fd6587e7afc161c7d5 DIFF: https://github.com/llvm/llvm-project/commit/7ab488e92c39c813a50cb4fd6587e7afc161c7d5.diff LO

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

2024-10-03 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,16 @@ +; 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. + +defi

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

2024-10-03 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,16 @@ +; RUN: not opt -S -scalarizer -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s + +; DXIL operation splitdouble doesn't support vector types. farzonl wrote: This is the test I would like to see become an XFAIL https

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

2024-10-03 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,16 @@ +; RUN: not opt -S -scalarizer -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s + +; DXIL operation splitdouble doesn't support vector types. +; CHECK: in function test_vector_double_split +; CHECK-SAME: splitdouble doesn't support lo

[clang] [Sema] Avoid repeated hash lookups (NFC) (PR #111090)

2024-10-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/111090.diff 1 Files Affected: - (modified) clang/lib/Sema/SemaLambda.cpp (+3-3) ``diff diff --git a/clang/lib/Sema/SemaLambda.cpp

[clang] [Sema] Avoid repeated hash lookups (NFC) (PR #111090)

2024-10-03 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/111090 None >From cd8fc9cd8e9ef757d129b3bbdddaeaf163d08d51 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Thu, 3 Oct 2024 08:47:32 -0700 Subject: [PATCH] [Sema] Avoid repeated hash lookups (NFC) --- clang/l

[clang] [TableGen] Avoid repeated hash lookups (NFC) (PR #111089)

2024-10-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/111089.diff 1 Files Affected: - (modified) clang/utils/TableGen/MveEmitter.cpp (+16-12) ``diff diff --git a/clang/utils/TableGen/M

[clang] [DependencyScanning] Avoid repeated hash lookups (NFC) (PR #111088)

2024-10-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/111088.diff 1 Files Affected: - (modified) clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp (+1-1) ``diff diff --git a/

[clang] [TableGen] Avoid repeated hash lookups (NFC) (PR #111089)

2024-10-03 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/111089 None >From 14a0790867efd134b4ae0ceafeddb58e504929ec Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Thu, 3 Oct 2024 08:46:35 -0700 Subject: [PATCH] [TableGen] Avoid repeated hash lookups (NFC) --- cla

[clang] [DependencyScanning] Avoid repeated hash lookups (NFC) (PR #111088)

2024-10-03 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/111088 None >From 5e09bfd855a7ebee4dd07dc64bcdc157e89f6aa4 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Thu, 3 Oct 2024 08:47:01 -0700 Subject: [PATCH] [DependencyScanning] Avoid repeated hash lookups (NFC)

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

2024-10-03 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] [libclang] Avoid repeated hash lookups (NFC) (PR #111087)

2024-10-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/111087.diff 1 Files Affected: - (modified) clang/tools/libclang/CXIndexDataConsumer.cpp (+2-8) ``diff diff --git a/clang/tools/lib

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

2024-10-03 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,14 @@ +; RUN: opt -S -scalarizer -mtriple=spirv-vulkan-library %s 2>&1 | llc -verify-machineinstrs -O0 -mtriple=spirv-unknown-unknown -o - | FileCheck %s farzonl wrote: I don't think this file should exist. I don't understand why we are using `opt` t

[clang] [libclang] Avoid repeated hash lookups (NFC) (PR #111087)

2024-10-03 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/111087 None >From df0ae6125e18bae6e90863300e12d094654b7b1f Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Thu, 3 Oct 2024 08:45:56 -0700 Subject: [PATCH] [libclang] Avoid repeated hash lookups (NFC) --- cla

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

2024-10-03 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-03 Thread Farzon Lotfi via cfe-commits
@@ -264,6 +265,31 @@ class OpLowerer { return lowerToBindAndAnnotateHandle(F); } + Error replaceSplitDoubleCallUsages(CallInst *Intrin, CallInst *Op) { +IRBuilder<> &IRB = OpBuilder.getIRB(); + +for (Use &U : make_early_inc_range(Intrin->uses())) { + if (au

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

2024-10-03 Thread Farzon Lotfi via cfe-commits
@@ -461,6 +487,33 @@ class OpLowerer { }); } + [[nodiscard]] bool lowerSplitDouble(Function &F) { +IRBuilder<> &IRB = OpBuilder.getIRB(); +return replaceFunction(F, [&](CallInst *CI) -> Error { + IRB.SetInsertPoint(CI); + + Value *Arg0 = CI->getArgOper

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

2024-10-03 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-03 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,14 @@ +; RUN: opt -S -scalarizer -mtriple=spirv-vulkan-library %s 2>&1 | llc -verify-machineinstrs -O0 -mtriple=spirv-unknown-unknown -o - | FileCheck %s + +; SPIRV lowering for splitdouble should relly on the scalarizer. farzonl wrote: This comment d

[clang] [clang-format] Fix a bug that misannotates binary operators */&/&& (PR #110945)

2024-10-03 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/110945 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] eaff3a7 - [clang-format] Fix a bug that misannotates binary operators */&/&& (#110945)

2024-10-03 Thread via cfe-commits
Author: Owen Pan Date: 2024-10-03T18:57:50-07:00 New Revision: eaff3a743406ff1636e6328e1ba1bc66318d53cb URL: https://github.com/llvm/llvm-project/commit/eaff3a743406ff1636e6328e1ba1bc66318d53cb DIFF: https://github.com/llvm/llvm-project/commit/eaff3a743406ff1636e6328e1ba1bc66318d53cb.diff LOG:

[clang] [Clang][Driver][AArch64] Add support for aarch64-amazon-linux triple (PR #109263)

2024-10-03 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay requested changes to this pull request. . https://github.com/llvm/llvm-project/pull/109263 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Driver][AArch64] Add support for aarch64-amazon-linux triple (PR #109263)

2024-10-03 Thread Fangrui Song via cfe-commits
MaskRay wrote: I don't think we've reached consensus. The comment there serves a purpose and specifically discourages people from doing this mismatching triple things. If the GCC installation on Amazon Linux uses `aarch64-amazon-linux`, and the default target triple of the Clang is `aarch64-un

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

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

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

2024-10-03 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 5114758b1cacb9c93c6a3c5b842d67b06d1152f7 e9ed9f9a0415544781f8334b305eb3916fc0862c --e

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

2024-10-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Sarah Spall (spall) Changes Implements elementwise firstbithigh hlsl builtin. Implements firstbituhigh intrinsic for spirv and directx, which handles unsigned integers Implements firstbitshigh intrinsic for spirv and directx, which

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

2024-10-03 Thread Sarah Spall via cfe-commits
https://github.com/spall created https://github.com/llvm/llvm-project/pull/111082 Implements elementwise firstbithigh hlsl builtin. Implements firstbituhigh intrinsic for spirv and directx, which handles unsigned integers Implements firstbitshigh intrinsic for spirv and directx, which handles s

[clang] [Clang] Fix __builtin_dynamic_object_size off by 4 (PR #111015)

2024-10-03 Thread Jan Hendrik Farr via cfe-commits
Cydox wrote: >From page 113 and 114 of: >https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1548.pdf "As a special case, the last element of a structure with more than one named member may have an incomplete array type; this is called a flexible array member. In most situations, the flexible a

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Add GPU profiling flags to driver (PR #94268)

2024-10-03 Thread Joel E. Denny via cfe-commits
jdenny-ornl wrote: For some codes, I get the following error for a gfx906: ``` LLVM ERROR: Relocation for CG Profile could not be created: unknown relocation name ``` I see it for OpenMC, but the following is a simpler example: ``` $ cat test.c #include #include __attribute__((noinline)) d

[clang-tools-extra] [clang-tidy] support `return c ? a : b;` in bugprone-return-const-ref-from-parameter (PR #107657)

2024-10-03 Thread Congcong Cai via cfe-commits
@@ -15,20 +16,24 @@ using namespace clang::ast_matchers; namespace clang::tidy::bugprone { void ReturnConstRefFromParameterCheck::registerMatchers(MatchFinder *Finder) { - Finder->addMatcher( - returnStmt( - hasReturnValue(declRefExpr( - to(parmVarD

[clang] [Clang] Automatically enable `-fconvergent-functions` on GPU targets (PR #111076)

2024-10-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes Summary: This patch causes us to respect the `-fconvergent-functions` and `-fno-convergent-functions` options correctly. GPU targets should have this set all the time, but we now offer `-fno-convergent-functio

[clang] [libc] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-10-03 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,153 @@ +//===-- amdgpuintrin.h - AMDPGU intrinsic functions ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [libc] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-10-03 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,153 @@ +//===-- amdgpuintrin.h - AMDPGU intrinsic functions ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2024-10-03 Thread Peilin Ye via cfe-commits
@@ -522,6 +526,28 @@ let Predicates = [BPFNoALU32] in { } def STD : STOREi64; +class relaxed_store + : PatFrag<(ops node:$val, node:$ptr), (base node:$val, node:$ptr)> { + let IsAtomic = 1; + let IsAtomicOrderingReleaseOrStronger = 0; +} + +class releasing_store + : PatFra

[clang] [libc] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-10-03 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,153 @@ +//===-- amdgpuintrin.h - AMDPGU intrinsic functions ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [libc] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-10-03 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,153 @@ +//===-- amdgpuintrin.h - AMDPGU intrinsic functions ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2024-10-03 Thread via cfe-commits
trcrsired wrote: > Similarly it'd be excellent if clang supported equivalents to clang-cl's > `/winsdkdir` and `/vctoolsdir`, though these probably couldn't be smooshed > into existing options like `/winsysroot` can with `--sysroot`. @zmodem @godvino I strongly oppose making ```/winsysroot``

[clang] [flang] [llvm] [mlir] Make Ownership of MachineModuleInfo in Its Wrapper Pass External (PR #110443)

2024-10-03 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks commented: I see that MMI really is a Codegen concept and not a Target concept, so that's why it takes an LLVMTargetMachine instead of TargetMachine. However, the `static_cast`s everywhere are extremely unfortunate. And it doesn't make sense to make the return type

[clang] [Clang] Fix __builtin_dynamic_object_size off by 4 (PR #111015)

2024-10-03 Thread Jan Hendrik Farr via cfe-commits
Cydox wrote: So, we would actually get gcc's behavior with this patch: ``` diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp index c864714182e0..21ffe7b46a6e 100644 --- a/clang/lib/CodeGen/CGBuiltin.cpp +++ b/clang/lib/CodeGen/CGBuiltin.cpp @@ -1049,25 +1049,7 @@ Cod

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (PR #93365)

2024-10-03 Thread Joel E. Denny via cfe-commits
@@ -1311,4 +1314,96 @@ COMPILER_RT_VISIBILITY int __llvm_profile_set_file_object(FILE *File, return 0; } +int __llvm_write_custom_profile(const char *Target, +const __llvm_profile_data *DataBegin, +const __llvm

[libcxx] [libcxxabi] [libunwind] [runtimes] Always define cxx_shared, cxx_static & other targets (PR #80007)

2024-10-03 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. I can not reproduce linux bot issue with the patch. https://github.com/llvm/llvm-project/pull/80007 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [flang] [llvm] [mlir] Make Ownership of MachineModuleInfo in Its Wrapper Pass External (PR #110443)

2024-10-03 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks commented: ah there's more context in https://reviews.llvm.org/D123964 https://github.com/llvm/llvm-project/pull/110443 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [Clang] omit parentheses in fold expressions with a single expansion (PR #110761)

2024-10-03 Thread Erich Keane via cfe-commits
@@ -36,7 +36,7 @@ using r1i2 = r1; // expected-error {{constraints not satisfied for class t template requires false_v // expected-note@-1 {{because 'false_v'}} -// expected-note@-2 {{because 'false_v' evaluated to false}} +// expected-note@-2 {{because 'false_v' evaluated to

[clang] [clang][ExtractAPI] Fix up casting from CXXClassRecord (PR #110983)

2024-10-03 Thread Erick Velez via cfe-commits
https://github.com/evelez7 approved this pull request. https://github.com/llvm/llvm-project/pull/110983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix __builtin_dynamic_object_size off by 4 (PR #111015)

2024-10-03 Thread Jan Hendrik Farr via cfe-commits
Cydox wrote: After looking at the assembly produced by gcc more, it actually looks like it's using the allocation size if it's known in the current context (for example if the struct was just malloced in the same function) and otherwise returns INT_MAX for the __bdos of a struct containing a f

[clang] [clang codegen] Emit !unpredictable metadata more consistently. (PR #111065)

2024-10-03 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/111065 >From 0d74b6ccb1b23d74f713313cd09f44aa295905c0 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Thu, 3 Oct 2024 14:24:05 -0700 Subject: [PATCH] [clang codegen] Emit !unpredictable metadata more consisten

[clang] [clang][rtsan] Add sanitize_realtime_unsafe attr to [[clang::blocking]] function IR (PR #111055)

2024-10-03 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. https://github.com/llvm/llvm-project/pull/111055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][rtsan] Add sanitize_realtime_unsafe attr to [[clang::blocking]] function IR (PR #111055)

2024-10-03 Thread Florian Mayer via cfe-commits
fmayer wrote: > > > With the function effects warnings (as errors) activated, blocking > > > functions cannot be called from non-blocking functions, and this is > > > enforced at compile time. The purpose of this series of PRs is to > > > introduce similar functionality into RealtimeSanitizer,

[clang] [clang codegen] Emit !unpredictable metadata more consistently. (PR #111065)

2024-10-03 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 82a36468c74a29b6154639d659550c62457e655b bc7b771fce25d13c2da89f7992eda6e6ccb07242 --e

[clang] [clang codegen] Emit !unpredictable metadata more consistently. (PR #111065)

2024-10-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Eli Friedman (efriedma-quic) Changes Conditional operators that emit a branch go through a codepath which attaches metadata to that branch. But if we take a shortcut to emit a select directly, we end up skipping that code, and don

[clang] [clang codegen] Emit !unpredictable metadata more consistently. (PR #111065)

2024-10-03 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic created https://github.com/llvm/llvm-project/pull/111065 Conditional operators that emit a branch go through a codepath which attaches metadata to that branch. But if we take a shortcut to emit a select directly, we end up skipping that code, and don't emit the

[clang] [Clang] Fix __builtin_dynamic_object_size off by 4 (PR #111015)

2024-10-03 Thread Jan Hendrik Farr via cfe-commits
Cydox wrote: I slightly changed my mind. Was gonna write that gcc is definitely right, now I'm more at a 50/50. I got two arguments, one from a standards perspective, the other from practical/safety perspective. ## Standards argument: When you do ```C acl = malloc(sizeof(struct posix_acl) + s

[clang] [Clang] Add "extend lifetime" flags and release note (PR #110000)

2024-10-03 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer edited https://github.com/llvm/llvm-project/pull/11 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add "extend lifetime" flags and release note (PR #110000)

2024-10-03 Thread Stephen Tozer via cfe-commits
@@ -211,6 +211,16 @@ New Compiler Flags only for thread-local variables, and none (which corresponds to the existing ``-fno-c++-static-destructors`` flag) skips all static destructors registration. +- The ``-fextend-lifetimes`` and ``-fextend-this-ptr`` flags have been ad

[clang] [libc++] Remove unused HAVE_LIBCXXABI variable from Android cache (PR #111007)

2024-10-03 Thread Ryan Prichard via cfe-commits
https://github.com/rprichard approved this pull request. https://github.com/llvm/llvm-project/pull/111007 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   >