[clang-tools-extra] [clang-tidy]Fix PreferMemberInitializer false positive for reassignment (PR #70316)

2023-10-27 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. Overall looks fine. https://github.com/llvm/llvm-project/pull/70316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ASAN] For Asan instrumented global, emit two symbols, one with actual size and other with instrumented size. (PR #70166)

2023-10-27 Thread via cfe-commits
b-sumner wrote: > It's my understanding your problem is that you are asan-trapping on the > redzones when you copy data to/from the device. Is it possible instead to > just make those copy-from and copy-to functions in the runtime > `__attribute__((no_sanitize("address")))` and copy the paddin

[clang] [libc++] Make sure we implement and test LWG2280 properly (PR #67670)

2023-10-27 Thread Louis Dionne via cfe-commits
https://github.com/ldionne closed https://github.com/llvm/llvm-project/pull/67670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][test] Add more bugprone-string-constructor tests (PR #70456)

2023-10-27 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM, wait until CI passes before merging https://github.com/llvm/llvm-project/pull/70456 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [OpenACC] Initial commits to support OpenACC (PR #70234)

2023-10-27 Thread Erich Keane via cfe-commits
erichkeane wrote: Build failures are all 1 test, and are: `File /var/lib/buildkite-agent/builds/linux-56-59b8f5d88-fdgrz-1/llvm-project/clang-ci/libcxx/test/libcxx/algorithms/cpp17_iterator_concepts.verify.cpp Line 410: cannot find start of regex ('{{') in static assertion failed` The patch r

[clang-tools-extra] [OpenACC] Initial commits to support OpenACC (PR #70234)

2023-10-27 Thread Erich Keane via cfe-commits
erichkeane wrote: Build failures are all 1 test, and are: `File /var/lib/buildkite-agent/builds/linux-56-59b8f5d88-fdgrz-1/llvm-project/clang-ci/libcxx/test/libcxx/algorithms/cpp17_iterator_concepts.verify.cpp Line 410: cannot find start of regex ('{{') in static assertion failed` The patch r

[clang] [DebugMetadata][DwarfDebug] Clone uniqued function-local types after metadata loading (PR #68986)

2023-10-27 Thread Vladislav Dzhidzhoev via cfe-commits
dzhidzhoev wrote: Ping https://github.com/llvm/llvm-project/pull/68986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [time-trace] Add a new time trace scope variable named "ParseDeclarationOrFunctionDefinition". (PR #65268)

2023-10-27 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, thank you for this! Please add a release note letting users know about the improvement when you land the changes. https://github.com/llvm/llvm-project/pull/65268 ___ cfe-commits mailing

[clang] [clang] Language to String function (PR #69487)

2023-10-27 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/69487 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-27 Thread Erich Keane via cfe-commits
@@ -49,7 +49,7 @@ struct ExprDependenceScope { using ExprDependence = ExprDependenceScope::ExprDependence; struct TypeDependenceScope { - enum TypeDependence : uint8_t { + enum TypeDependence : unsigned { erichkeane wrote: >>My preferred solution would be t

[clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-27 Thread Erich Keane via cfe-commits
erichkeane wrote: We definitely need to wrap these in a macro/hide them in a macro somehow. This will fail `-Werror` on GCC/MSVC/Older Clang compilers. https://github.com/llvm/llvm-project/pull/70349 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-27 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > We definitely need to wrap these in a macro/hide them in a macro somehow. > This will fail `-Werror` on GCC/MSVC/Older Clang compilers. +1, the macro would live in https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/Support/Compiler.h along with the other at

[clang] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2023-10-27 Thread Felix via cfe-commits
@@ -649,6 +649,14 @@ void XCOFFObjectWriter::recordRelocation(MCAssembler &Asm, uint64_t &FixedValue) { auto getIndex = [this](const MCSymbol *Sym, const MCSectionXCOFF *ContainingCsect) { +// Fixup relocat

[PATCH] D134475: [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute

2023-10-27 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D134475#4655362 , @RIscRIpt wrote: > Should I re-submit it to GitHub? While I hate that we'll lose all of the Phabriator history on this one, I don't see being able to complete this review in the next two weeks before Phab

[clang] SwiftCallingConv: Fix the splitVectorEntry function (PR #69953)

2023-10-27 Thread Arnold Schwaighofer via cfe-commits
https://github.com/aschwaighofer updated https://github.com/llvm/llvm-project/pull/69953 >From 3dcc80df1acfe192e70f531995dff7518589d1ec Mon Sep 17 00:00:00 2001 From: Arnold Schwaighofer Date: Wed, 18 Oct 2023 11:44:16 -0700 Subject: [PATCH] SwiftCallingConv: Fix the splitVectorEntry function

[clang] [OpenMP][AMDGPU] Do not include 'ockl' implementations in OpenMP (PR #70462)

2023-10-27 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/70462 Summary: The 'ockl' bitcode library from the ROCm device library contains several implementations of functions like `printf` and `malloc`. We currently do not depend on these in the OpenMP toolchain, so we shouldn

[clang] [OpenMP][AMDGPU] Do not include 'ockl' implementations in OpenMP (PR #70462)

2023-10-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes Summary: The 'ockl' bitcode library from the ROCm device library contains several implementations of functions like `printf` and `malloc`. We currently do not depend on these in the OpenMP toolchain, so we sho

[clang-tools-extra] [clang-tidy][test] Add more bugprone-string-constructor tests (PR #70456)

2023-10-27 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/70456 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D134475: [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute

2023-10-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134475#4655362 , @RIscRIpt wrote: > Should I re-submit it to GitHub? Youch... I'm sorry this hasn't managed to get up to the top of my queue yet! I agree with Erich, as unfortunate as it is not to complete the review i

[PATCH] D70401: [RISCV] CodeGen of RVE and ilp32e/lp64e ABIs

2023-10-27 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:16200 SDValue Hi; - if (VA.getLocReg() == RISCV::X17) { // Second half of f64 is passed on the stack. This code has been rewritten recently. Please rebase Repos

[PATCH] D134475: [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute

2023-10-27 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt marked an inline comment as done. RIscRIpt added a comment. In D134475#4655389 , @erichkeane wrote: > If you can properly rebase, submit this to github, and include a summary of > the Phab discussion in a way that easy enough to catch back up o

[clang-tools-extra] [LoopPeeling] Fix weights updating of peeled off branches (PR #70094)

2023-10-27 Thread Aleksandr Popov via cfe-commits
https://github.com/aleks-tmb updated https://github.com/llvm/llvm-project/pull/70094 >From 4265cc4a05d939a29e57a116e696fa1eb032c249 Mon Sep 17 00:00:00 2001 From: Aleksandr Popov Date: Tue, 24 Oct 2023 16:47:50 + Subject: [PATCH] [LoopPeeling] Fix weights updating of peeled off branches In

[clang] [clang][Sema] Avoid non-empty unexpanded pack assertion for FunctionParmPackExpr (PR #69224)

2023-10-27 Thread Aaron Ballman via cfe-commits
@@ -402,6 +402,19 @@ bool Sema::DiagnoseUnexpandedParameterPack(Expr *E, if (!E->containsUnexpandedParameterPack()) return false; + // Exception: The `CollectUnexpandedParameterPacksVisitor` collects nothing + // from a FunctionParmPackExpr. In the context where the co

[clang] [OpenMP] Unify the min/max thread/teams pathways (PR #70273)

2023-10-27 Thread Johannes Doerfert via cfe-commits
@@ -1,68 +1,20 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck -allow-deprecated-dag-overlap %s -check-prefix=CHECK1 -// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerp

[clang] b1b9cd4 - [clang]set invalid for lambda which missing capture `this` (#70432)

2023-10-27 Thread via cfe-commits
Author: Congcong Cai Date: 2023-10-27T23:52:05+08:00 New Revision: b1b9cd4e457dc3c5d7e59104d5502da23295e49c URL: https://github.com/llvm/llvm-project/commit/b1b9cd4e457dc3c5d7e59104d5502da23295e49c DIFF: https://github.com/llvm/llvm-project/commit/b1b9cd4e457dc3c5d7e59104d5502da23295e49c.diff

[PATCH] D70401: [RISCV] CodeGen of RVE and ilp32e/lp64e ABIs

2023-10-27 Thread Alex Bradbury via Phabricator via cfe-commits
asb added a comment. First of all, thank you to everyone who has been trying to nudge this forward and apologies it must have been a frustrating experience. I appreciate there are users who want to see this and I don't like that LLVM doesn't serve them right now - I think it's unfortunate that

[clang-tools-extra] 2637467 - [clang-tidy]Fix PreferMemberInitializer false positive for reassignment (#70316)

2023-10-27 Thread via cfe-commits
Author: Congcong Cai Date: 2023-10-27T23:56:25+08:00 New Revision: 263746754ab2ad099ffb22112cda5926d7ae3353 URL: https://github.com/llvm/llvm-project/commit/263746754ab2ad099ffb22112cda5926d7ae3353 DIFF: https://github.com/llvm/llvm-project/commit/263746754ab2ad099ffb22112cda5926d7ae3353.diff

[clang] [OpenMP] Unify the min/max thread/teams pathways (PR #70273)

2023-10-27 Thread Shilei Tian via cfe-commits
@@ -1,68 +1,20 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck -allow-deprecated-dag-overlap %s -check-prefix=CHECK1 -// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerp

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-10-27 Thread via cfe-commits
@@ -984,7 +1041,7 @@ Value *InstCombinerImpl::SimplifyDemandedUseBits(Value *V, APInt DemandedMask, // If the client is only demanding bits that we know, return the known // constant. - if (DemandedMask.isSubsetOf(Known.Zero|Known.One)) + if (MaySimplifyAsConstant && De

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-10-27 Thread Alexander Richardson via cfe-commits
@@ -6411,6 +6411,40 @@ static Value *simplifyBinaryIntrinsic(Function *F, Value *Op0, Value *Op1, return Constant::getNullValue(ReturnType); break; } + case Intrinsic::ptrmask: { +if (isa(Op0) || isa(Op1)) + return PoisonValue::get(Op0->getType()); + +

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-10-27 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson edited https://github.com/llvm/llvm-project/pull/67166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-scan-deps] [P1689] Keep consistent behavior for make dependencies with clang (PR #69551)

2023-10-27 Thread Ben Langmuir via cfe-commits
benlangmuir wrote: Thanks for the ping, I had missed your question > How do you think about the idea to add a flag to the MDC about whether or not > calling makeAbsoluteAndPreferred? SGTM; this seems like a good compromise since we can't easily extract this into the consumer. https://github.

[clang-tools-extra] [libcxx] Fixed uniform_real_distribution.h allowing initializing with non floating point types (PR #70468)

2023-10-27 Thread Pranav Tatavarthy via cfe-commits
https://github.com/Pranav10903 created https://github.com/llvm/llvm-project/pull/70468 None >From 57c8eadd6ef3d40f14cefa7b88d70c43aac5757e Mon Sep 17 00:00:00 2001 From: Pranav Tatavarthy <97344709+pranav10...@users.noreply.github.com> Date: Fri, 27 Oct 2023 21:13:45 +0530 Subject: [PATCH 1/3]

[clang-tools-extra] [libcxx] Fixed uniform_real_distribution.h allowing initializing with non floating point types (PR #70468)

2023-10-27 Thread Pranav Tatavarthy via cfe-commits
https://github.com/Pranav10903 closed https://github.com/llvm/llvm-project/pull/70468 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] Fixed uniform_real_distribution.h allowing initializing with non floating point types (PR #70468)

2023-10-27 Thread Pranav Tatavarthy via cfe-commits
https://github.com/Pranav10903 closed https://github.com/llvm/llvm-project/pull/70468 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Add processor definition for XiangShan-NanHu (PR #70294)

2023-10-27 Thread Alex Bradbury via cfe-commits
asb wrote: > Xiangshan is of great famousness in China and there is already a community in > which many individual developers and organiztions/companies like PLCT, T-Head > have participated. So I think we needn't worry about the maintenance. :-) Thanks for that extra context! https://github.

[clang] [Clang] Fix a crash when using ast-dump=json (PR #70224)

2023-10-27 Thread Tom Honermann via cfe-commits
@@ -217,21 +221,21 @@ void i(); // CHECK-NEXT:"id": "0x{{.*}}", // CHECK-NEXT:"kind": "FunctionTemplateDecl", // CHECK-NEXT:"loc": { -// CHECK-NEXT: "offset": {{[0-9]+}}, +// CHECK-NEXT: "offset": 142, tahonermann wrote: Reverting the undes

[clang] [DebugMetadata][DwarfDebug] Clone uniqued function-local types after metadata loading (PR #68986)

2023-10-27 Thread David Blaikie via cfe-commits
https://github.com/dwblaikie approved this pull request. https://github.com/llvm/llvm-project/pull/68986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [DebugMetadata][DwarfDebug] Clone uniqued function-local types after metadata loading (PR #68986)

2023-10-27 Thread David Blaikie via cfe-commits
https://github.com/dwblaikie edited https://github.com/llvm/llvm-project/pull/68986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [DebugMetadata][DwarfDebug] Clone uniqued function-local types after metadata loading (PR #68986)

2023-10-27 Thread David Blaikie via cfe-commits
@@ -731,6 +731,29 @@ class MetadataLoader::MetadataLoaderImpl { upgradeCULocals(); } + void cloneLocalTypes() { +for (int I = MetadataList.size() - 1; I >= 0; --I) { dwblaikie wrote: any particular reason this iterates in reverse? Probably worth a

[clang] [DebugMetadata][DwarfDebug] Clone uniqued function-local types after metadata loading (PR #68986)

2023-10-27 Thread David Blaikie via cfe-commits
@@ -0,0 +1,43 @@ +; RUN: llvm-as < %s -o %t0 +; RUN: llvm-dis %t0 -o - | FileCheck %s + dwblaikie wrote: might be worth a comment describing the purpose of this test (some info from the commit message, probably) https://github.com/llvm/llvm-project/pull/68986 _

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-10-27 Thread Julian Schmidt via cfe-commits
5chmidti wrote: > I think you can't, instead of handling macro definitions, you just should > handle places where macro is used. It's fine if someone define a macro MY_PI, > check should flag usage of such macro, not necessarily a macro. > > Instead of using MacroDefined and try to find those

[clang] Recognize friend operator != to fix ambiguity with operator== (PR #70217)

2023-10-27 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: Thanks @zygoloid for filing the core issue https://cplusplus.github.io/CWG/issues/2804.html Would it make sense to go forward with this change and fix rewrite targets for friend operators (as a clang extension)? https://github.com/llvm/llvm-project/pull/70217 __

[clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-10-27 Thread Sam Tebbs via cfe-commits
https://github.com/SamTebbs33 updated https://github.com/llvm/llvm-project/pull/68565 >From de07976922782b9dcf5d13d44551b782dc8b3b94 Mon Sep 17 00:00:00 2001 From: Samuel Tebbs Date: Fri, 6 Oct 2023 17:09:36 +0100 Subject: [PATCH 1/3] [AArch64][SME] Remove immediate argument restriction for sv

[clang] [AArch64][SVE2.1] Add intrinsics for quadword loads/stores with unscaled offset (PR #70474)

2023-10-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Momchil Velikov (momchil-velikov) Changes ACLE spec: https://github.com/ARM-software/acle/pull/257 Co-authored-by: Caroline Concatto Co-authored-by: Hassnaa Hamdi --- Patch is 579.40

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-10-27 Thread via cfe-commits
@@ -984,7 +1041,7 @@ Value *InstCombinerImpl::SimplifyDemandedUseBits(Value *V, APInt DemandedMask, // If the client is only demanding bits that we know, return the known // constant. - if (DemandedMask.isSubsetOf(Known.Zero|Known.One)) + if (MaySimplifyAsConstant && De

[clang] [AArch64] Add SVE2.1 intrinsics for indexed quadword gather loads and scatter stores (PR #70476)

2023-10-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: Momchil Velikov (momchil-velikov) Changes [Note, first patch is a part of another pull request] This patch adds the quadword gather load intrinsics of the form ``` (1) sv_t svld1q_gather_u64index_(svbool_t, cons

[clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-10-27 Thread Sam Tebbs via cfe-commits
https://github.com/SamTebbs33 edited https://github.com/llvm/llvm-project/pull/68565 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-10-27 Thread via cfe-commits
@@ -6411,6 +6411,40 @@ static Value *simplifyBinaryIntrinsic(Function *F, Value *Op0, Value *Op1, return Constant::getNullValue(ReturnType); break; } + case Intrinsic::ptrmask: { +if (isa(Op0) || isa(Op1)) + return PoisonValue::get(Op0->getType()); + +

[clang] [mlir] Add config for PDL (PR #69927)

2023-10-27 Thread Jacques Pienaar via cfe-commits
https://github.com/jpienaar edited https://github.com/llvm/llvm-project/pull/69927 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [mlir] Add config for PDL (PR #69927)

2023-10-27 Thread Jacques Pienaar via cfe-commits
https://github.com/jpienaar edited https://github.com/llvm/llvm-project/pull/69927 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-10-27 Thread Sam Tebbs via cfe-commits
SamTebbs33 wrote: I've updated this patch with my progress in lowering the intrinsics in DAGToDAG, hopefully capturing your feedback in the process. https://github.com/llvm/llvm-project/pull/68565 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-27 Thread Sang Ik Lee via cfe-commits
silee2 wrote: @joker-eph This PR got approval from @fabianmcg. What do I need to do next to get the PR merged? https://github.com/llvm/llvm-project/pull/69949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [mlir] Add config for PDL (PR #69927)

2023-10-27 Thread Jacques Pienaar via cfe-commits
jpienaar wrote: > Can you expand on the motivation? Why is it a problem that PDL is always > included? Your description isn’t very explicit on the impact. Done. Its not PDL specific, I think it is a problem if any dialect is always included even if not used :) The others just have a simple met

[clang-tools-extra] [mlir] Add config for PDL (PR #69927)

2023-10-27 Thread Jacques Pienaar via cfe-commits
jpienaar wrote: > Can you expand on the motivation? Why is it a problem that PDL is always > included? Your description isn’t very explicit on the impact. Done. Its not PDL specific, I think it is a problem if any dialect is always included even if not used :) The others just have a simple met

[clang] [AArch64] Add SVE2.1 intrinsics for indexed quadword gather loads and scatter stores (PR #70476)

2023-10-27 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 7aa65c3c5c29658fb38db832771e49251cb16080 0422343f6d7edb9e72da081d85d583fe321c34ec --

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-10-27 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna created https://github.com/llvm/llvm-project/pull/70480 -fbounds-safety-experimental is an experimental flag for -fbounds-safety, which is a bounds-safety extension for C. -fbounds-safety will require substantial changes across the Clang codebase. So we introduce th

[clang] [Headers] Add \returns to _rdpid_u32 (PR #70481)

2023-10-27 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 created https://github.com/llvm/llvm-project/pull/70481 Our doc tooling complained about this missing directive. >From a6bcb7b93d3d856a367b40b08a42c641c87217f3 Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Fri, 27 Oct 2023 10:00:00 -0700 Subject: [PATCH] [Headers

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-10-27 Thread Yeoul Na via cfe-commits
rapidsna wrote: I'll push BoundsSafety.rst documentation in a separate PR. https://github.com/llvm/llvm-project/pull/70480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers] Add \returns to _rdpid_u32 (PR #70481)

2023-10-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Paul T Robinson (pogo59) Changes Our doc tooling complained about this missing directive. --- Full diff: https://github.com/llvm/llvm-project/pull/70481.diff 1 Files Affected: - (modified) clang/lib/Headers/immintrin.h (+3-1) ```

[clang] [ASAN] For Asan instrumented global, emit two symbols, one with actual size and other with instrumented size. (PR #70166)

2023-10-27 Thread via cfe-commits
b-sumner wrote: Actually the DWARF and ELF are inconsistent now and this patch removes that inconsistency. For example, for a global int named "gv" the DWARF says < 1><0x0023>DW_TAG_variable DW_AT_name (indexed string: 0x0003)**gv**

[clang] [Clang] Diagnose defaulted assignment operator with incompatible object parameter (PR #70176)

2023-10-27 Thread Shafik Yaghmour via cfe-commits
@@ -585,3 +585,34 @@ class Server : public Thing { S name_; }; } + +namespace GH69233 { +struct Base {}; +struct S : Base { +int j; +S& operator=(this Base& self, const S&) = default; +// expected-warning@-1 {{explicitly defaulted copy assignment operator is im

[clang] [APINotes] Upstream APINotesReader (PR #66769)

2023-10-27 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan updated https://github.com/llvm/llvm-project/pull/66769 >From 4561ed86480e89d0e36560adab13f22a59627d81 Mon Sep 17 00:00:00 2001 From: Egor Zhdan Date: Tue, 19 Sep 2023 13:42:16 +0100 Subject: [PATCH] [APINotes] Upstream APINotesReader This upstreams more of the Cla

[clang] [APINotes] Upstream APINotesReader (PR #66769)

2023-10-27 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 4c43c1eeef434cf0b98ee9094c776d118da1faeb 4561ed86480e89d0e36560adab13f22a59627d81 --

[clang] [Headers] Add \returns to _rdpid_u32 (PR #70481)

2023-10-27 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/70481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers] Add \returns to _rdpid_u32 (PR #70481)

2023-10-27 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 closed https://github.com/llvm/llvm-project/pull/70481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 793e636 - [Headers] Add \returns to _rdpid_u32 (#70481)

2023-10-27 Thread via cfe-commits
Author: Paul T Robinson Date: 2023-10-27T13:26:24-04:00 New Revision: 793e636ecb194f43a1fbcc7ccbe9b3b96f0d URL: https://github.com/llvm/llvm-project/commit/793e636ecb194f43a1fbcc7ccbe9b3b96f0d DIFF: https://github.com/llvm/llvm-project/commit/793e636ecb194f43a1fbcc7ccbe9b3b96f0d.dif

[clang] [APINotes] Upstream APINotesReader (PR #66769)

2023-10-27 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan updated https://github.com/llvm/llvm-project/pull/66769 >From 629a80917e7968cf4617a0d5135cd12bdccd4e43 Mon Sep 17 00:00:00 2001 From: Egor Zhdan Date: Tue, 19 Sep 2023 13:42:16 +0100 Subject: [PATCH] [APINotes] Upstream APINotesReader This upstreams more of the Cla

[clang] [AMDGPU] make w32i16/w32f16 legal (PR #70484)

2023-10-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Changpeng Fang (changpeng) Changes Some upcoming intrinsics will be using these new types --- Patch is 120.40 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/70484.diff 17 Files Affec

[clang] [CUDA][HIP] Fix std::is_invocable (PR #70369)

2023-10-27 Thread Artem Belevich via cfe-commits
@@ -283,12 +283,18 @@ set(cuda_wrapper_files cuda_wrappers/cmath cuda_wrappers/complex cuda_wrappers/new + cuda_wrappers/type_traits ) set(cuda_wrapper_bits_files cuda_wrappers/bits/shared_ptr_base.h cuda_wrappers/bits/basic_string.h cuda_wrappers/bits/basic

[clang] [OpenMP] Improve omp offload profiler (PR #68016)

2023-10-27 Thread via cfe-commits
https://github.com/fel-cab updated https://github.com/llvm/llvm-project/pull/68016 >From dd44de067c26ba94b6561c5ed7fa4a5d812a3d1a Mon Sep 17 00:00:00 2001 From: Felipe Cabarcas Date: Mon, 18 Sep 2023 12:07:12 + Subject: [PATCH 01/13] testing Profiler features --- openmp/libomptarget/src/i

[clang] [Driver][NFC] Make use of final (PR #70416)

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

[clang] [Driver][NFC] Make use of final (PR #70416)

2023-10-27 Thread Fangrui Song via cfe-commits
MaskRay wrote: You can say "Make some derived classes of Tool final" to make the title more specific. https://github.com/llvm/llvm-project/pull/70416 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [clang] Language to String function (PR #69487)

2023-10-27 Thread Fangrui Song via cfe-commits
MaskRay wrote: > This is intended to be used by the z/OS target, see the patch here: #68926 Can the description (first comment) https://github.com/llvm/llvm-project/pull/69487#issue-195029 be amended to link to this PR? https://github.com/llvm/llvm-project/pull/69487 _

[clang] [analyzer] Improve reports from ArrayBoundCheckerV2 (PR #70056)

2023-10-27 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: DonatNagyE wrote: Note that this PR introduces a `PathSensitiveBugReport` where the `Description` and `ShortDescription` fields (inherited from `BugReport`) are different (because I'm using the four-argument constructor). These fields are inten

[clang-tools-extra] Bfi precision (PR #66285)

2023-10-27 Thread Matthias Braun via cfe-commits
MatzeB wrote: Not sure how this change could trigger leaks. Changing BFI here should mostly effect inlining decisions, basic block placement, register allocation. But it shouldn't change program behavior or memory operations... Will try to reproduce this test on my machine, to see if there's a

[clang] [HLSL] Support vector swizzles on scalars (PR #67700)

2023-10-27 Thread Chris B via cfe-commits
https://github.com/llvm-beanz updated https://github.com/llvm/llvm-project/pull/67700 >From 2fa183da3991c0bc4da6163609331d198f4a37af Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Tue, 26 Sep 2023 19:48:18 -0500 Subject: [PATCH 1/4] [HLSL] Support vector swizzles on scalars HLSL supports

[clang] [AMDGPU] make w32i16/w32f16 legal (PR #70484)

2023-10-27 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 793e636ecb194f43a1fbcc7ccbe9b3b96f0d 940cb66575812237a269a5d98fe30956f44d --

[clang] Bfi precision (PR #66285)

2023-10-27 Thread Matthias Braun via cfe-commits
MatzeB wrote: Some very ad-hoc benchmarking. Of clang compilation speed (measured in instructions as reported by valgrind/callgrind which I think somewhat matches the setup of nikic) compiling `sqlite3` of CTMark: Old-BFI (this PR reverted), New-BFI (this PR applied), no-cold (cold-callsite-r

[clang] [libc++] Fixed uniform_real_distribution.h where it was allowing initialization with non floating point types (PR #70485)

2023-10-27 Thread Pranav Tatavarthy via cfe-commits
https://github.com/Pranav10903 created https://github.com/llvm/llvm-project/pull/70485 Included a static_assert to deal with cases where result_types are initialized with non floating point type values which can cause undefined behaviour as mentioned [here](https://en.cppreference.com/w/cpp/n

[clang] [APINotes] Upstream APINotesReader (PR #66769)

2023-10-27 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,202 @@ +//===--- APINotesReader.h - API Notes Reader *- C++ -*-===// +// +// 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] [APINotes] Upstream APINotesReader (PR #66769)

2023-10-27 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. https://github.com/llvm/llvm-project/pull/66769 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64] Implement reinterpret builtins for SVE vector tuples (PR #69598)

2023-10-27 Thread Momchil Velikov via cfe-commits
@@ -64,26 +65,29 @@ class ImmCheck { }; class SVEType { - TypeSpec TS; bool Float, Signed, Immediate, Void, Constant, Pointer, BFloat; bool DefaultType, IsScalable, Predicate, PredicatePattern, PrefetchOp, Svcount; unsigned Bitwidth, ElementBitwidth, NumVector

[clang] [AArch64] Implement reinterpret builtins for SVE vector tuples (PR #69598)

2023-10-27 Thread Momchil Velikov via cfe-commits
@@ -383,6 +381,20 @@ class SVEEmitter { SmallVectorImpl> &Out); }; +const std::array SVEEmitter::Reinterprets = +{{{SVEType("c"), "s8"}, momchil-velikov wrote: Done https://github.com/llvm/llvm-project/pull/69598 _

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-10-27 Thread Dan Liew via cfe-commits
https://github.com/delcypher requested changes to this pull request. In general looks good but there are some minor changes I'd like made. https://github.com/llvm/llvm-project/pull/70480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-10-27 Thread Dan Liew via cfe-commits
@@ -3618,6 +3618,23 @@ void CompilerInvocationBase::GenerateLangArgs(const LangOptions &Opts, GenerateArg(Consumer, OPT_frandomize_layout_seed_EQ, Opts.RandstructSeed); } +static bool SupportsBoundsSafety(Language Lang) { + // Currently, bounds safety is only supported f

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-10-27 Thread Dan Liew via cfe-commits
https://github.com/delcypher edited https://github.com/llvm/llvm-project/pull/70480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-10-27 Thread Dan Liew via cfe-commits
@@ -3835,6 +3852,12 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, Opts.Trigraphs = Args.hasFlag(OPT_ftrigraphs, OPT_fno_trigraphs, Opts.Trigraphs); + Opts.BoundsSafety = Args.hasFlag(OPT_fbounds_safety, OPT_fno_bounds_safety, ---

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-10-27 Thread Dan Liew via cfe-commits
@@ -330,6 +330,9 @@ def warn_alias_with_section : Warning< "as the %select{aliasee|resolver}2">, InGroup; +def error_bounds_safety_lang_not_supported : Error< delcypher wrote: Nit: A lot of the error diagnostics use `err` as a preifx rather than `error`.

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-10-27 Thread Dan Liew via cfe-commits
@@ -0,0 +1,9 @@ +// RUN: %clang -c %s -### 2>&1 | not grep fbounds-safety-experimental delcypher wrote: Could we use `FileCheck` here instead of `grep`? https://github.com/llvm/llvm-project/pull/70480 ___ cfe-commits m

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-10-27 Thread Dan Liew via cfe-commits
@@ -330,6 +330,9 @@ def warn_alias_with_section : Warning< "as the %select{aliasee|resolver}2">, InGroup; +def error_bounds_safety_lang_not_supported : Error< delcypher wrote: Should we introduce a "bounds safety" category and have the diagnostics fall u

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-10-27 Thread Dan Liew via cfe-commits
@@ -3618,6 +3618,23 @@ void CompilerInvocationBase::GenerateLangArgs(const LangOptions &Opts, GenerateArg(Consumer, OPT_frandomize_layout_seed_EQ, Opts.RandstructSeed); } +static bool SupportsBoundsSafety(Language Lang) { + // Currently, bounds safety is only supported f

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-10-27 Thread Dan Liew via cfe-commits
@@ -3835,6 +3852,12 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, Opts.Trigraphs = Args.hasFlag(OPT_ftrigraphs, OPT_fno_trigraphs, Opts.Trigraphs); + Opts.BoundsSafety = Args.hasFlag(OPT_fbounds_safety, OPT_fno_bounds_safety, ---

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-10-27 Thread via cfe-commits
https://github.com/goldsteinn updated https://github.com/llvm/llvm-project/pull/67166 >From ddc443b6af4708a37317c9f9133bb1bbe460ecba Mon Sep 17 00:00:00 2001 From: Noah Goldstein Date: Fri, 22 Sep 2023 08:21:21 -0500 Subject: [PATCH 1/7] [InstSimplify] Add tests for simplify `llvm.ptrmask`; NFC

[clang] [CodeGen][OpenMP] Set the default schedule for loops to static,1 if TSan is enabled (PR #68891)

2023-10-27 Thread Johannes Doerfert via cfe-commits
@@ -0,0 +1,161 @@ +/* + * DRB006-indirectaccess2-orig-yes.c -- Archer testcase + */ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// +// See tools/archer/LIC

[clang] Support MemProf on darwin (PR #69640)

2023-10-27 Thread Snehasish Kumar via cfe-commits
https://github.com/snehasish requested changes to this pull request. It would be nice to split this patch into at least two parts: 1. Add basic support for Darwin (malloc implementation, build ids, raw format etc) 2. Record and dump references to static data in the binary I think there are a n

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-10-27 Thread Alexander Richardson via cfe-commits
@@ -6411,6 +6411,40 @@ static Value *simplifyBinaryIntrinsic(Function *F, Value *Op0, Value *Op1, return Constant::getNullValue(ReturnType); break; } + case Intrinsic::ptrmask: { +if (isa(Op0) || isa(Op1)) + return PoisonValue::get(Op0->getType()); + +

[clang] [AMDGPU] make w32i16/w32f16 legal (PR #70484)

2023-10-27 Thread Jay Foad via cfe-commits
jayfoad wrote: > [AMDGPU] make w32i16/w32f16 Typos "v32" https://github.com/llvm/llvm-project/pull/70484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc++] Fixed uniform_real_distribution.h where it was allowing initialization with non floating point types (PR #70485)

2023-10-27 Thread via cfe-commits
https://github.com/philnik777 requested changes to this pull request. Thanks for working on this! The code itself looks fine, but this needs a test. https://github.com/llvm/llvm-project/pull/70485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [libc++] Fixed uniform_real_distribution.h where it was allowing initialization with non floating point types (PR #70485)

2023-10-27 Thread via cfe-commits
@@ -14,6 +14,7 @@ #include <__random/is_valid.h> #include #include +#include philnik777 wrote: Please include `<__type_traits/is_floating_point.h>` instead. https://github.com/llvm/llvm-project/pull/70485 ___ cfe

<    1   2   3   4   >