[clang] [Clang] Fix Microsoft ABI inheritance model when member pointer is used in a base specifier (PR #91990)

2024-09-05 Thread Max Winkler via cfe-commits
MaxEW707 wrote: @rnk @zmodem Sorry for the ping. Its been a bit since this got reviewed and I recently hit this ABI case when moving some parts of a larger project to clang. https://github.com/llvm/llvm-project/pull/91990 ___ cfe-commits mailing list

[clang] [clang-format] Correctly annotate braces in macro definition (PR #107352)

2024-09-05 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick 616a8ce6203d8c7569266bfaf163e74df1f440ad https://github.com/llvm/llvm-project/pull/107352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Correctly annotate braces in macro definition (PR #107352)

2024-09-05 Thread Owen Pan via cfe-commits
https://github.com/owenca milestoned https://github.com/llvm/llvm-project/pull/107352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-BF16 new instructions. (PR #101603)

2024-09-05 Thread Freddy Ye via cfe-commits
@@ -205,7 +214,8 @@ bool X86ATTInstPrinter::printVecCompareInstr(const MCInst *MI, printwordmem(MI, CurOp--, OS); else printdwordmem(MI, CurOp--, OS); - } else if ((Desc.TSFlags & X86II::OpPrefixMask) == X86II::XD) { +

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-09-05 Thread via cfe-commits
JinjinLi868 wrote: i add the gcc behavior in this case ``` __bf16 test_convert_from_fp16_to_bf16(_Float16 a) { return (__bf16)a; } test_convert_from_fp16_to_bf16(_Float16): pushrbp mov rbp, rsp sub rsp, 16 movdeax, xmm0 mov WORD PTR

[clang] [clang][bytecode] Implement comparsion operators for vector type (PR #107258)

2024-09-05 Thread Timm Baeder via cfe-commits
@@ -1222,6 +1224,105 @@ bool Compiler::VisitComplexBinOp(const BinaryOperator *E) { return true; } +template +bool Compiler::VisitVectorBinOp(const BinaryOperator *E) { + assert(E->getType()->isVectorType()); + assert(E->getLHS()->getType()->isVectorType()); + assert(E-

[clang] [clang-format] Correctly annotate braces in macro definition (PR #107352)

2024-09-05 Thread Pierre Jolivet via cfe-commits
prj- wrote: Could you please back-port this to `llvm:release/19.x` while reverting the previous fix? https://github.com/llvm/llvm-project/pull/107352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang-tools-extra] [clang-tidy][readability-container-contains] Extend to any class with contains (PR #107521)

2024-09-05 Thread Nicolas van Kempen via cfe-commits
nicovank wrote: Pinging @vogelsgesang, @PiotrZSL, @5chmidti, @HerrCai0907, @carlosgalvezp for review. I applied this modified version to llvm-project root, **554 files changed**, `check-all` passes. Almost all cases are moving from `count` to `contains`. How do you suggest putting up this PR

[clang-tools-extra] [clang-tidy][readability-container-contains] Extend to any class with contains (PR #107521)

2024-09-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Nicolas van Kempen (nicovank) Changes This check will now work out of the box with other containers that have a `contains` method, such as `folly::F14` or Abseil containers. It will also work with strings, which are basically just we

[clang-tools-extra] [clang-tidy][readability-container-contains] Extend to any class with contains (PR #107521)

2024-09-05 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank created https://github.com/llvm/llvm-project/pull/107521 This check will now work out of the box with other containers that have a `contains` method, such as `folly::F14` or Abseil containers. It will also work with strings, which are basically just weird containers

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-05 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-libc-amdgpu-runtime` running on `omp-vega20-1` while building `clang` at step 10 "Add check check-offload". Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/5051 Here is the r

[clang] [llvm] [AMDGPU] Add target intrinsic for s_buffer_prefetch_data (PR #107293)

2024-09-05 Thread Matt Arsenault via cfe-commits
@@ -9934,6 +9934,12 @@ SDValue SITargetLowering::LowerINTRINSIC_VOID(SDValue Op, auto NewMI = DAG.getMachineNode(Opc, DL, Op->getVTList(), Ops); return SDValue(NewMI, 0); } + case Intrinsic::amdgcn_s_prefetch_data: { +// For non-global address space preserve the

[clang] [Clang][RISCV] Recognize unsupport target feature by supporting isValidFeatureName (PR #106495)

2024-09-05 Thread Piyou Chen via cfe-commits
@@ -4,3 +4,12 @@ int __attribute__((target("arch=rv64g"))) foo(void) { return 0; } //expected-error@+1 {{redefinition of 'foo'}} int __attribute__((target("arch=rv64gc"))) foo(void) { return 0; } + +//expected-warning@+1 {{unsupported 'notafeature' in the 'target' attribute st

[clang] [Clang][RISCV] Recognize unsupport target feature by supporting isValidFeatureName (PR #106495)

2024-09-05 Thread Piyou Chen via cfe-commits
@@ -4,3 +4,12 @@ int __attribute__((target("arch=rv64g"))) foo(void) { return 0; } //expected-error@+1 {{redefinition of 'foo'}} int __attribute__((target("arch=rv64gc"))) foo(void) { return 0; } + +//expected-warning@+1 {{unsupported 'notafeature' in the 'target' attribute st

[clang] [Clang][RISCV] Recognize unsupport target feature by supporting isValidFeatureName (PR #106495)

2024-09-05 Thread Piyou Chen via cfe-commits
@@ -2993,10 +2993,17 @@ bool Sema::checkTargetAttr(SourceLocation LiteralLoc, StringRef AttrStr) { return Diag(LiteralLoc, diag::warn_unsupported_target_attribute) << Unknown << Tune << ParsedAttrs.Tune << Target; - if (Context.getTargetInfo().getTriple().isRI

[clang] [Clang][RISCV] Recognize unsupport target feature by supporting isValidFeatureName (PR #106495)

2024-09-05 Thread Piyou Chen via cfe-commits
@@ -4,3 +4,12 @@ int __attribute__((target("arch=rv64g"))) foo(void) { return 0; } //expected-error@+1 {{redefinition of 'foo'}} int __attribute__((target("arch=rv64gc"))) foo(void) { return 0; } + +//expected-warning@+1 {{unsupported 'notafeature' in the 'target' attribute st

[clang] [Clang][RISCV] Recognize unsupport target feature by supporting isValidFeatureName (PR #106495)

2024-09-05 Thread Piyou Chen via cfe-commits
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/106495 >From e8f472674e0d1e70adcd1d29b8c902f4cd80f188 Mon Sep 17 00:00:00 2001 From: Piyou Chen Date: Wed, 28 Aug 2024 21:15:57 -0700 Subject: [PATCH 1/7] [Clang][RISCV] Recognize unsupport feature by supporting isValidFe

[clang] 8e35c86 - [HLSL] Apply resource attributes to the resource type rather than the handle member (#107160)

2024-09-05 Thread via cfe-commits
Author: Helena Kotas Date: 2024-09-05T21:50:00-07:00 New Revision: 8e35c86977ce5529a9387657321ac9fefcdae5b5 URL: https://github.com/llvm/llvm-project/commit/8e35c86977ce5529a9387657321ac9fefcdae5b5 DIFF: https://github.com/llvm/llvm-project/commit/8e35c86977ce5529a9387657321ac9fefcdae5b5.diff

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

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

[clang] [HIP][Clang][CodeGen] Handle hip bin symbols properly. (PR #107458)

2024-09-05 Thread via cfe-commits
https://github.com/jofrn updated https://github.com/llvm/llvm-project/pull/107458 >From 2064cf330e57d798c13c8214d589e4c0b671d658 Mon Sep 17 00:00:00 2001 From: jofernau Date: Thu, 5 Sep 2024 23:31:55 -0400 Subject: [PATCH] [HIP][Clang][CodeGen] Handle hip bin symbols properly. Remove '_' in fa

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-05 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/107292 >From f1ca0a6070aa34bcce92d76df3a2e897d44e5f9c Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Tue, 3 Sep 2024 19:06:22 + Subject: [PATCH 1/2] Adding `asuint` implementation to hlsl --- clang/includ

[clang] [compiler-rt] [libcxx] [cmake] Add hexagon-linux cmake cache files (PR #98712)

2024-09-05 Thread Brian Cain via cfe-commits
@@ -0,0 +1,25 @@ + +set(LLVM_DEFAULT_TARGET_TRIPLE hexagon-unknown-linux-musl CACHE STRING "") +set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR OFF CACHE BOOL "") +set(LLVM_ENABLE_RUNTIMES libcxx;libcxxabi;libunwind;compiler-rt CACHE STRING "") +set(LIBCXX_INCLUDE_BENCHMARKS OFF CACHE BOO

[clang] [compiler-rt] [libcxx] [cmake] Add hexagon-linux cmake cache files (PR #98712)

2024-09-05 Thread Brian Cain via cfe-commits
https://github.com/androm3da updated https://github.com/llvm/llvm-project/pull/98712 >From 29554e6a090075993a67126880cfb9e5f93f28f4 Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Fri, 12 Jul 2024 21:34:56 -0700 Subject: [PATCH] [cmake] Add hexagon-linux cmake cache files These can be used to

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-05 Thread Helena Kotas via cfe-commits
@@ -556,46 +562,120 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } -void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) { - if (!AL.isArgIdent(0)) { -Diag(AL.getLoc(), diag::err_attribute_argument_type) -

[clang] [Clang] [Driver] Ensure `-fms-volatile` is set for x86 for `*-windows-msvc` triple on non cl driver modes (PR #107509)

2024-09-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Max Winkler (MaxEW707) Changes Similar reasoning as this PR: https://github.com/llvm/llvm-project/pull/107177 `-fms-volatile` should be set by default for x86 targets as long as the triple is `*-windows-msvc`. The driver mode shouldn't di

[clang] [Clang] [Driver] Ensure `-fms-volatile` is set for x86 for `*-windows-msvc` triple on non cl driver modes (PR #107509)

2024-09-05 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 created https://github.com/llvm/llvm-project/pull/107509 Similar reasoning as this PR: https://github.com/llvm/llvm-project/pull/107177 `-fms-volatile` should be set by default for x86 targets as long as the triple is `*-windows-msvc`. The driver mode shouldn't dict

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

2024-09-05 Thread Matheus Izvekov via cfe-commits
@@ -6803,9 +6809,6 @@ bool CXXNameMangler::mangleSubstitution(QualType T) { } bool CXXNameMangler::mangleSubstitution(TemplateName Template) { - if (TemplateDecl *TD = Template.getAsTemplateDecl()) -return mangleSubstitution(TD); - mizvekov wrote: This o

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

2024-09-05 Thread Matheus Izvekov via cfe-commits
@@ -2143,15 +2107,17 @@ static TemplateDeductionResult DeduceTemplateArgumentsByTypeMatch( unsigned SubTDF = TDF & TDF_IgnoreQualifiers; if (auto Result = DeduceTemplateArgumentsByTypeMatch( S, TemplateParams, PPT, APT, Info, Deduced, SubTDF, -

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

2024-09-05 Thread Matheus Izvekov via cfe-commits
@@ -139,28 +165,63 @@ TemplateName::NameKind TemplateName::getKind() const { return AssumedTemplate; if (uncommon->getAsSubstTemplateTemplateParm()) return SubstTemplateTemplateParm; + if (uncommon->getAsDeducedTemplateName()) +return DeducedTemplate; + + assert

[clang] [clang-format] Fix a regression on BAS_AlwaysBreak (PR #107506)

2024-09-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #107401. --- Full diff: https://github.com/llvm/llvm-project/pull/107506.diff 2 Files Affected: - (modified) clang/lib/Format/ContinuationIndenter.cpp (+1-1) - (modified) clang/unittests/Format/Fo

[clang] [clang-format] Fix a regression on BAS_AlwaysBreak (PR #107506)

2024-09-05 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/107506 Fixes #107401. >From bd7da6ec9afabd829010db4c33d088590ab68b5a Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 5 Sep 2024 19:44:46 -0700 Subject: [PATCH] [clang-format] Fix a regression on BAS_AlwaysBreak Fix

[clang] [clang][scan] Report module dependencies in topological order (PR #107474)

2024-09-05 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/107474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5acd9d1 - [clang][scan] Report module dependencies in topological order (#107474)

2024-09-05 Thread via cfe-commits
Author: Jan Svoboda Date: 2024-09-05T19:13:08-07:00 New Revision: 5acd9d11373ca67f0d4baf17a78ebb56193a7df0 URL: https://github.com/llvm/llvm-project/commit/5acd9d11373ca67f0d4baf17a78ebb56193a7df0 DIFF: https://github.com/llvm/llvm-project/commit/5acd9d11373ca67f0d4baf17a78ebb56193a7df0.diff L

[clang] [clang-tools-extra] [clangd] show lambda name instead of operator() in signature help (PR #101857)

2024-09-05 Thread Timothy Akintilo via cfe-commits
tilobyte wrote: ping tagging clangd code owner for review: @sam-mccall https://github.com/llvm/llvm-project/pull/101857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [Modules] Support Reusable Modules Builder (PR #106683)

2024-09-05 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @sam-mccall @kadircet @HighCommander4 ping~ https://github.com/llvm/llvm-project/pull/106683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Avoid repeated hash lookups (NFC) (PR #107490)

2024-09-05 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/107490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 33ceb2d - [clang-tidy] Avoid repeated hash lookups (NFC) (#107490)

2024-09-05 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-09-05T19:04:30-07:00 New Revision: 33ceb2dd7596a05277fd246865862df6b03cf976 URL: https://github.com/llvm/llvm-project/commit/33ceb2dd7596a05277fd246865862df6b03cf976 DIFF: https://github.com/llvm/llvm-project/commit/33ceb2dd7596a05277fd246865862df6b03cf976.diff L

[clang-tools-extra] [clang-tidy] Avoid repeated hash lookups (NFC) (PR #107490)

2024-09-05 Thread Kazu Hirata via cfe-commits
kazutakahirata wrote: > Are you finding those automatically with a tool? Or just stumbled upon it? Somewhat automatically. Put `[[deprecated]]` on `insert` and `try_emplace`, collect warnings from the build, and look for `find` and `contain` in the few lines prior to `insert` and `try_emplace

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: None (joaosaffran) Changes Implements support for the `asuint` HLSL function casting behaviour. Addressing the `splitdouble` scenario will be addressed in a future PR. Fixes: #70097 --- Full diff: https://github.com/llvm/llvm-proje

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-05 Thread via cfe-commits
https://github.com/joaosaffran ready_for_review https://github.com/llvm/llvm-project/pull/107292 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-05 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/107292 >From f1ca0a6070aa34bcce92d76df3a2e897d44e5f9c Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Tue, 3 Sep 2024 19:06:22 + Subject: [PATCH 1/2] Adding `asuint` implementation to hlsl --- clang/includ

[clang] [lld] [llvm] [X86, lld] Add relocation R_X86_64_REX2_GOTPCRELX (PR #106681)

2024-09-05 Thread Shengchen Kan via cfe-commits
KanRobert wrote: > I suppose the name of relocation used by binutils is > R_X86_64_CODE_4_GOTPCRELX Also binutils has added > R_X86_64_CODE_5_GOTPCRELX/R_X86_64_CODE_6_GOTPCRELX, for evex relocation > Refer to > [bminor/binutils-gdb@3d5a60d](https://github.com/bminor/binutils-gdb/commit/3d5a6

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-05 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/107292 >From f1ca0a6070aa34bcce92d76df3a2e897d44e5f9c Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Tue, 3 Sep 2024 19:06:22 + Subject: [PATCH 1/2] Adding `asuint` implementation to hlsl --- clang/includ

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-05 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/107292 >From f1ca0a6070aa34bcce92d76df3a2e897d44e5f9c Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Tue, 3 Sep 2024 19:06:22 + Subject: [PATCH 1/2] Adding `asuint` implementation to hlsl --- clang/includ

[clang-tools-extra] [clang-tidy] Avoid repeated hash lookups (NFC) (PR #107490)

2024-09-05 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank approved this pull request. Are you finding those automatically with a tool? Or just stumbled upon it? https://github.com/llvm/llvm-project/pull/107490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [lld] [llvm] [X86, lld] Add relocation R_X86_64_REX2_GOTPCRELX (PR #106681)

2024-09-05 Thread via cfe-commits
wwwhhhyyy wrote: I suppose the name of relocation used by binutils is R_X86_64_CODE_4_GOTPCRELX Also binutils has added R_X86_64_CODE_5_GOTPCRELX/R_X86_64_CODE_6_GOTPCRELX, for evex relocation Refer to https://github.com/bminor/binutils-gdb/commit/3d5a60de52556f6a53d71d7e607c6696450ae3e4 and h

[clang] [lld] [llvm] Deprecate the `-fbasic-block-sections=labels` option. (PR #107494)

2024-09-05 Thread Mircea Trofin via cfe-commits
https://github.com/mtrofin approved this pull request. nice! https://github.com/llvm/llvm-project/pull/107494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] Deprecate the `-fbasic-block-sections=labels` option. (PR #107494)

2024-09-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-lld Author: Rahman Lavaee (rlavaee) Changes This feature is supported via the newer option `-fbasic-block-address-map`. Using the old option still works by delegating to the newer option, while a warning is printed to show deprecation. --- Patch is 2

[clang] [lld] [llvm] Deprecate the `-fbasic-block-sections=labels` option. (PR #107494)

2024-09-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Rahman Lavaee (rlavaee) Changes This feature is supported via the newer option `-fbasic-block-address-map`. Using the old option still works by delegating to the newer option, while a warning is printed to show deprecation. ---

[clang] [lld] [llvm] Deprecate the `-fbasic-block-sections=labels` option. (PR #107494)

2024-09-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Rahman Lavaee (rlavaee) Changes This feature is supported via the newer option `-fbasic-block-address-map`. Using the old option still works by delegating to the newer option, while a warning is printed to show deprecation. --- P

[clang] [lld] [llvm] Deprecate the `-fbasic-block-sections=labels` option. (PR #107494)

2024-09-05 Thread Rahman Lavaee via cfe-commits
https://github.com/rlavaee created https://github.com/llvm/llvm-project/pull/107494 This feature is supported via the newer option `-fbasic-block-address-map`. Using the old option still works by delegating to the newer option, while a warning is printed to show deprecation. >From 716f5da93a2

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-09-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Michael Toguchi (mdtoguchi) Changes Introduces the SYCL based toolchain and initial toolchain construction when using the '-fsycl' option. This option will enable SYCL based offloading, creating a SPIR-V based IR file packaged int

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-09-05 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] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-09-05 Thread Michael Toguchi via cfe-commits
https://github.com/mdtoguchi created https://github.com/llvm/llvm-project/pull/107493 Introduces the SYCL based toolchain and initial toolchain construction when using the '-fsycl' option. This option will enable SYCL based offloading, creating a SPIR-V based IR file packaged into the compile

[clang] [Clang][RISCV] Recognize unsupport target feature by supporting isValidFeatureName (PR #106495)

2024-09-05 Thread Craig Topper via cfe-commits
@@ -4,3 +4,12 @@ int __attribute__((target("arch=rv64g"))) foo(void) { return 0; } //expected-error@+1 {{redefinition of 'foo'}} int __attribute__((target("arch=rv64gc"))) foo(void) { return 0; } + +//expected-warning@+1 {{unsupported 'notafeature' in the 'target' attribute st

[clang] [Clang][RISCV] Recognize unsupport target feature by supporting isValidFeatureName (PR #106495)

2024-09-05 Thread Craig Topper via cfe-commits
@@ -2993,10 +2993,17 @@ bool Sema::checkTargetAttr(SourceLocation LiteralLoc, StringRef AttrStr) { return Diag(LiteralLoc, diag::warn_unsupported_target_attribute) << Unknown << Tune << ParsedAttrs.Tune << Target; - if (Context.getTargetInfo().getTriple().isRI

[clang] [Clang][RISCV] Recognize unsupport target feature by supporting isValidFeatureName (PR #106495)

2024-09-05 Thread Craig Topper via cfe-commits
@@ -4,3 +4,12 @@ int __attribute__((target("arch=rv64g"))) foo(void) { return 0; } //expected-error@+1 {{redefinition of 'foo'}} int __attribute__((target("arch=rv64gc"))) foo(void) { return 0; } + +//expected-warning@+1 {{unsupported 'notafeature' in the 'target' attribute st

[clang-tools-extra] [clang-tidy] Avoid repeated hash lookups (NFC) (PR #107490)

2024-09-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/107490.diff 1 Files Affected: - (modified) clang-tools-extra/clang-tidy/cppcoreguidelines/PreferMemberInitializerCheck.cpp (+1-3) `

[clang-tools-extra] [clang-tidy] Avoid repeated hash lookups (NFC) (PR #107490)

2024-09-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/107490.diff 1 Files Affected: - (modified) clang-tools-extra/clang-tidy/cppcoreguidelines/PreferMemberInitializerCheck.cpp (+1-

[clang] [-Wunsafe-buffer-usage] Warning Libc functions (PR #101583)

2024-09-05 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: > There needs to be a flag to opt out of this to not break everybody who is > currently using unsafe-buffer-usage. #105383 seems to do that, but it really > should be in this same PR. Can this be reverted and relanded with the flag? @aeubanks you should be able to suppress

[clang] d7dd2c4 - Re-land "[-Wunsafe-buffer-usage] Warning Libc functions (#101583)"

2024-09-05 Thread via cfe-commits
Author: ziqingluo-90 Date: 2024-09-05T16:56:34-07:00 New Revision: d7dd2c468fecae871ba67e891a3519c758c94b63 URL: https://github.com/llvm/llvm-project/commit/d7dd2c468fecae871ba67e891a3519c758c94b63 DIFF: https://github.com/llvm/llvm-project/commit/d7dd2c468fecae871ba67e891a3519c758c94b63.diff

[clang-tools-extra] [clangd] Use `SymbolName` to represent Objective-C selectors (PR #82061)

2024-09-05 Thread Alex Hoppen via cfe-commits
ahoppen wrote: @sam-mccall If you could review my latest changes, that would be great. https://github.com/llvm/llvm-project/pull/82061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CodeView] Flatten cmd args in frontend for LF_BUILDINFO (PR #106369)

2024-09-05 Thread Alexandre Ganea via cfe-commits
aganea wrote: The code LG but I’d like please @nebulark if you can explain de unit tests changes? Why those offset changes? The code should emit the same thing as before? https://github.com/llvm/llvm-project/pull/106369 ___ cfe-commits mailing list c

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-05 Thread Sarah Spall via cfe-commits
https://github.com/spall deleted https://github.com/llvm/llvm-project/pull/107129 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFCI]Remove EntryCount from FunctionSummary and clean up surrounding synthetic count passes. (PR #107471)

2024-09-05 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/107471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFCI]Remove EntryCount from FunctionSummary and clean up surrounding synthetic count passes. (PR #107471)

2024-09-05 Thread David Li via cfe-commits
https://github.com/david-xl approved this pull request. Thanks for the cleanup. https://github.com/llvm/llvm-project/pull/107471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFCI]Remove EntryCount from FunctionSummary and clean up surrounding synthetic count passes. (PR #107471)

2024-09-05 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 updated https://github.com/llvm/llvm-project/pull/107471 >From a18e042a0d03321d3ffca9ede92e976343a1b4c7 Mon Sep 17 00:00:00 2001 From: mingmingl Date: Thu, 5 Sep 2024 14:36:28 -0700 Subject: [PATCH 1/4] [NFCI]Clean up synthetic count --- clang/docs/tools/clang-f

[clang] [llvm] [NFCI]Remove EntryCount from FunctionSummary and clean up surrounding synthetic count passes. (PR #107471)

2024-09-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms Author: Mingming Liu (minglotus-6) Changes The primary motivation is to remove `EntryCount` from `FunctionSummary`. This frees 8 bytes out of `sizeof(FunctionSummary)` (136 byte as of https://github.com/llvm/llvm-project/commit/64498c54

[clang] [llvm] [NFCI]Remove EntryCount from FunctionSummary and clean up surrounding synthetic count passes. (PR #107471)

2024-09-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mingming Liu (minglotus-6) Changes The primary motivation is to remove `EntryCount` from `FunctionSummary`. This frees 8 bytes out of `sizeof(FunctionSummary)` (136 byte as of https://github.com/llvm/llvm-project/commit/64498c54831bed9cf0

[clang] [llvm] [NFCI]Remove EntryCount from FunctionSummary and clean up surrounding synthetic count passes. (PR #107471)

2024-09-05 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 ready_for_review https://github.com/llvm/llvm-project/pull/107471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] remove autosar link in documents (PR #107412)

2024-09-05 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/107412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 6d37259 - [clang-tidy][NFC] remove autosar link in documents (#107412)

2024-09-05 Thread via cfe-commits
Author: Congcong Cai Date: 2024-09-06T07:03:05+08:00 New Revision: 6d3725924fe6adf0d490697327938de9c3516cbe URL: https://github.com/llvm/llvm-project/commit/6d3725924fe6adf0d490697327938de9c3516cbe DIFF: https://github.com/llvm/llvm-project/commit/6d3725924fe6adf0d490697327938de9c3516cbe.diff

[clang] [llvm] [NFCI]Remove EntryCount from FunctionSummary and clean up surrounding synthetic count passes. (PR #107471)

2024-09-05 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/107471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFCI]Remove EntryCount from FunctionSummary and clean up surrounding synthetic count passes. (PR #107471)

2024-09-05 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/107471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFCI]Clean up synthetic count pass (PR #107471)

2024-09-05 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 f00c946c2da0caf6da4a49e87ac905a8b1d2e8b6 157c9a86efdea3382bfa9c1a7fa1d7b5c46c48ef --e

[clang] [llvm] [NFCI]Clean up synthetic count pass (PR #107471)

2024-09-05 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 updated https://github.com/llvm/llvm-project/pull/107471 >From a18e042a0d03321d3ffca9ede92e976343a1b4c7 Mon Sep 17 00:00:00 2001 From: mingmingl Date: Thu, 5 Sep 2024 14:36:28 -0700 Subject: [PATCH 1/3] [NFCI]Clean up synthetic count --- clang/docs/tools/clang-f

[clang] [CUDA/HIP] propagate -cuid to a host-only compilation. (PR #107483)

2024-09-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Artem Belevich (Artem-B) Changes Right now we're bailing out too early, and `-cuid` does not get set for the host-only compilations. --- Full diff: https://github.com/llvm/llvm-project/pull/107483.diff 2 Files Affected: - (modi

[clang] [CUDA/HIP] propagate -cuid to a host-only compilation. (PR #107483)

2024-09-05 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B created https://github.com/llvm/llvm-project/pull/107483 Right now we're bailing out too early, and `-cuid` does not get set for the host-only compilations. >From 52a27293d1c93a7ed4dcef845f705808afa3c273 Mon Sep 17 00:00:00 2001 From: Artem Belevich Date: Thu, 5 Se

[clang] [llvm] [CodeView] Flatten cmd args in frontend for LF_BUILDINFO (PR #106369)

2024-09-05 Thread Saleem Abdulrasool via cfe-commits
compnerd wrote: Please also get a sign off from @aganea https://github.com/llvm/llvm-project/pull/106369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CodeView] Flatten cmd args in frontend for LF_BUILDINFO (PR #106369)

2024-09-05 Thread Saleem Abdulrasool via cfe-commits
@@ -484,8 +519,10 @@ static bool initTargetOptions(DiagnosticsEngine &Diags, Entry.Group == frontend::IncludeDirGroup::System)) Options.MCOptions.IASSearchPaths.push_back( Entry.IgnoreSysRoot ? Entry.Path : HSOpts.Sysroot + Entry.Path); - Options.MCOpt

[clang] [llvm] [CodeView] Flatten cmd args in frontend for LF_BUILDINFO (PR #106369)

2024-09-05 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. https://github.com/llvm/llvm-project/pull/106369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add target intrinsic for s_prefetch_data (PR #107133)

2024-09-05 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec closed https://github.com/llvm/llvm-project/pull/107133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] bd840a4 - [AMDGPU] Add target intrinsic for s_prefetch_data (#107133)

2024-09-05 Thread via cfe-commits
Author: Stanislav Mekhanoshin Date: 2024-09-05T15:14:31-07:00 New Revision: bd840a40042c2c67f56079493d0bcdbfc70325ba URL: https://github.com/llvm/llvm-project/commit/bd840a40042c2c67f56079493d0bcdbfc70325ba DIFF: https://github.com/llvm/llvm-project/commit/bd840a40042c2c67f56079493d0bcdbfc70325

[clang] [llvm] [NFCI]Clean up synthetic count pass (PR #107471)

2024-09-05 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/107471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-05 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. A couple more very minor comments then this LGTM! https://github.com/llvm/llvm-project/pull/107160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-05 Thread Justin Bogner via cfe-commits
@@ -559,46 +563,123 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } -void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) { - if (!AL.isArgIdent(0)) { -Diag(AL.getLoc(), diag::err_attribute_argument_type) -

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-05 Thread Justin Bogner via cfe-commits
@@ -559,46 +563,123 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } -void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) { - if (!AL.isArgIdent(0)) { -Diag(AL.getLoc(), diag::err_attribute_argument_type) -

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-05 Thread Justin Bogner via cfe-commits
@@ -556,46 +562,120 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } -void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) { - if (!AL.isArgIdent(0)) { -Diag(AL.getLoc(), diag::err_attribute_argument_type) -

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-05 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/107160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFCI]Clean up synthetic count pass (PR #107471)

2024-09-05 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/107471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][scan] Report module dependencies in topological order (PR #107474)

2024-09-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Svoboda (jansvoboda11) Changes Clients of the dependency scanner may benefit from being able to process modular dependencies in topological order. The scanner already processes dependencies in this order, so it makes sense to make it

[clang] [clang][scan] Report module dependencies in topological order (PR #107474)

2024-09-05 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/107474 Clients of the dependency scanner may benefit from being able to process modular dependencies in topological order. The scanner already processes dependencies in this order, so it makes sense to make it ea

[clang] [llvm] [NFCI]Clean up synthetic count (PR #107471)

2024-09-05 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 updated https://github.com/llvm/llvm-project/pull/107471 >From a18e042a0d03321d3ffca9ede92e976343a1b4c7 Mon Sep 17 00:00:00 2001 From: mingmingl Date: Thu, 5 Sep 2024 14:36:28 -0700 Subject: [PATCH 1/2] [NFCI]Clean up synthetic count --- clang/docs/tools/clang-f

[clang] [HIP][Clang][CodeGen] Handle hip bin symbols properly. (PR #107458)

2024-09-05 Thread Yaxun Liu via cfe-commits
@@ -840,8 +840,10 @@ llvm::Function *CGNVCUDARuntime::makeModuleCtorFunction() { FatBinStr = new llvm::GlobalVariable( CGM.getModule(), CGM.Int8Ty, /*isConstant=*/true, llvm::GlobalValue::ExternalLinkage, nullptr, - "__hip_fatbin_" + CGM.getCo

[clang] [flang] [flang][Driver] Support -Xlinker in flang (PR #107472)

2024-09-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-driver @llvm/pr-subscribers-clang Author: Tarun Prabhu (tarunprabhu) Changes Partially addresses: https://github.com/llvm/llvm-project/issues/89888 --- Full diff: https://github.com/llvm/llvm-project/pull/107472.diff 2 Files Affected: - (modifi

[clang] [flang] [flang][Driver] Support -Xlinker in flang (PR #107472)

2024-09-05 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu edited https://github.com/llvm/llvm-project/pull/107472 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [TableGen] Add const variants of accessors for backend (PR #106658)

2024-09-05 Thread Rahul Joshi via cfe-commits
jurahul wrote: I posted the PSA at: https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089 https://github.com/llvm/llvm-project/pull/106658 ___ cfe-commits mailing list cfe-commit

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-09-05 Thread Damyan Pepper via cfe-commits
@@ -1239,9 +1239,9 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy, if (getLangOpts().OpenMP && CurCodeDecl) CGM.getOpenMPRuntime().emitFunctionProlog(*this, CurCodeDecl); - if (FD && getLangOpts().HLSL) { + if (getLangOpts().HLSL) { // Handl

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-09-05 Thread Damyan Pepper via cfe-commits
@@ -2474,7 +2474,9 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, // If we don't have a declaration to control inlining, the function isn't // explicitly marked as alwaysinline for semantic reasons, and inlining is // disabled, mark th

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-09-05 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,74 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -std=hlsl202x -emit-llvm -o - -disable-llvm-passes %s | FileCheck %s --check-prefixes=CHECK,NOINLINE +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -std=hlsl202x -emit-llvm -o - -disable-llv

  1   2   3   4   5   >