[clang] 0ca80eb - [NFC] Remove duplicated message resulted from a bad merge I think

2023-12-04 Thread Phoebe Wang via cfe-commits
Author: Phoebe Wang Date: 2023-12-05T15:58:55+08:00 New Revision: 0ca80eb5e814a6d061556888c9c9fbd04f054a80 URL: https://github.com/llvm/llvm-project/commit/0ca80eb5e814a6d061556888c9c9fbd04f054a80 DIFF: https://github.com/llvm/llvm-project/commit/0ca80eb5e814a6d061556888c9c9fbd04f054a80.diff

[clang] [clang] Fixes compile error that double colon operator cannot resolve macro with parentheses. (PR #68618)

2023-12-04 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang closed https://github.com/llvm/llvm-project/pull/68618 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 8cfdd37 - [clang] Fixes compile error that double colon operator cannot resolve macro with parentheses. (#68618)

2023-12-04 Thread via cfe-commits
Author: Yonggang Luo Date: 2023-12-05T15:49:31+08:00 New Revision: 8cfdd37088d662338ec85ac15721dddf3f6d8db6 URL: https://github.com/llvm/llvm-project/commit/8cfdd37088d662338ec85ac15721dddf3f6d8db6 DIFF: https://github.com/llvm/llvm-project/commit/8cfdd37088d662338ec85ac15721dddf3f6d8db6.diff

[libc] [llvm] [clang-tools-extra] [libcxx] [compiler-rt] [lld] [libunwind] [mlir] [clang] [lldb] [flang] Fix clang to recognize new C23 modifiers %w and %wf when printing and scanning (PR #71771)

2023-12-04 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/71771 >From 06c4cf02dfb4b20c8349c5f3c7209276f6d56edf Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Thu, 9 Nov 2023 02:21:46 + Subject: [PATCH 1/5] Fix clang to recognize new C23 modifiers %w and %wf when

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-04 Thread via cfe-commits
@@ -57,6 +57,15 @@ global variable or function should be in after translation. let Heading = "section, __declspec(allocate)"; } +def CodeModelDocs : Documentation { + let Category = DocCatVariable; + let Content = [{ +The ``model`` attribute allows you to specify a

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-04 Thread via cfe-commits
@@ -3369,6 +3369,33 @@ static void handleSectionAttr(Sema , Decl *D, const ParsedAttr ) { } } +static void handleCodeModelAttr(Sema , Decl *D, const ParsedAttr ) { + StringRef CM; + StringRef Str; + SourceLocation LiteralLoc; + bool Ok = false; + // Check that it is a

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-04 Thread via cfe-commits
https://github.com/heiher updated https://github.com/llvm/llvm-project/pull/72078 >From e3863873ab817dacf8680763bb42d91f005fe5ea Mon Sep 17 00:00:00 2001 From: WANG Rui Date: Fri, 10 Nov 2023 21:07:48 -0600 Subject: [PATCH 1/2] [clang] Add per-global code model attribute This patch adds a

[clang] [clang] Skip tautological comparison if the comparison involves the 'size_t' type (PR #74427)

2023-12-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Shivam Gupta (xgupta) Changes The issue with size_t comes when we are trying to add -Wtype-limits to -Wextra for GCC compatibility in review https://reviews.llvm.org/D142826. Example of issue (false positive) - $ cat

[clang] [clang] Skip tautological comparison if the comparison involves the 'size_t' type (PR #74427)

2023-12-04 Thread Shivam Gupta via cfe-commits
https://github.com/xgupta created https://github.com/llvm/llvm-project/pull/74427 The issue with size_t comes when we are trying to add -Wtype-limits to -Wextra for GCC compatibility in review https://reviews.llvm.org/D142826. Example of issue (false positive) - $ cat

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-04 Thread WÁNG Xuěruì via cfe-commits
@@ -57,6 +57,15 @@ global variable or function should be in after translation. let Heading = "section, __declspec(allocate)"; } +def CodeModelDocs : Documentation { + let Category = DocCatVariable; + let Content = [{ +The ``model`` attribute allows you to specify a

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-04 Thread WÁNG Xuěruì via cfe-commits
@@ -3369,6 +3369,33 @@ static void handleSectionAttr(Sema , Decl *D, const ParsedAttr ) { } } +static void handleCodeModelAttr(Sema , Decl *D, const ParsedAttr ) { + StringRef CM; + StringRef Str; + SourceLocation LiteralLoc; + bool Ok = false; + // Check that it is a

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-04 Thread WÁNG Xuěruì via cfe-commits
https://github.com/xen0n edited https://github.com/llvm/llvm-project/pull/72078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-04 Thread WÁNG Xuěruì via cfe-commits
https://github.com/xen0n commented: There should also be a test case that shows the attribute is not supported on a non-LoongArch target. Otherwise this mostly looks fine to me, thanks for pushing this forward! https://github.com/llvm/llvm-project/pull/72078

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-04 Thread via cfe-commits
https://github.com/heiher edited https://github.com/llvm/llvm-project/pull/72078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-04 Thread via cfe-commits
https://github.com/heiher updated https://github.com/llvm/llvm-project/pull/72078 >From e3863873ab817dacf8680763bb42d91f005fe5ea Mon Sep 17 00:00:00 2001 From: WANG Rui Date: Fri, 10 Nov 2023 21:07:48 -0600 Subject: [PATCH] [clang] Add per-global code model attribute This patch adds a

[clang] d11d38c - [clang][NFC] Refactor expected directives in C++ DRs 500-599 (#74373)

2023-12-04 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2023-12-05T11:23:32+04:00 New Revision: d11d38cb095b7f86d4c1298ea9806099d2fc4bd6 URL: https://github.com/llvm/llvm-project/commit/d11d38cb095b7f86d4c1298ea9806099d2fc4bd6 DIFF:

[clang] [clang][NFC] Refactor expected directives in C++ DRs 500-599 (PR #74373)

2023-12-04 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/74373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-04 Thread Bill Wendling via cfe-commits
bwendling wrote: Okay, this was tougher than I thought. I make sure that we're not causing any new side-effects in the code. I try as much as possible to use previously generated code when accessing the `counted_by` variable. I also corrected how offsets were calculated. There are some a few

[llvm] [clang] [LoongArch] Support per-global code model attribute for LoongArch (PR #72079)

2023-12-04 Thread WÁNG Xuěruì via cfe-commits
xen0n wrote: I think we should initially only support the attribute on LoongArch. GCC's `model` attribute is only ever supported on ia64 and loongarch, yet the patch currently seems to allow other architectures to use this attribute, with LLVM code model names accepted -- this may or may not

[compiler-rt] [flang] [llvm] [clang] [clang-tools-extra] [PowerPC][CodeGen] Exploit STMW and LMW in 32-bit big-endian mode. (PR #74415)

2023-12-04 Thread Qiu Chaofan via cfe-commits
@@ -2399,6 +2405,30 @@ bool PPCFrameLowering::assignCalleeSavedSpillSlots( return AllSpilledToReg; } +static void findContinuousLoadStore(ArrayRef CSI, +Register ) { + CalleeSavedInfo BeginI = CSI[0]; + unsigned I = 1, E = CSI.size(); +

[clang-tools-extra] [flang] [clang] [llvm] [compiler-rt] [PowerPC][CodeGen] Exploit STMW and LMW in 32-bit big-endian mode. (PR #74415)

2023-12-04 Thread Qiu Chaofan via cfe-commits
@@ -2607,6 +2658,11 @@ bool PPCFrameLowering::restoreCalleeSavedRegisters( unsigned CSIIndex = 0; BitVector Restored(TRI->getNumRegs()); + Register MergeFrom = PPC::R31; + if (EnableLoadStoreMultiple && !Subtarget.isLittleEndian() && + !Subtarget.isPPC64()) +

[llvm] [clang-tools-extra] [flang] [compiler-rt] [clang] [PowerPC][CodeGen] Exploit STMW and LMW in 32-bit big-endian mode. (PR #74415)

2023-12-04 Thread Qiu Chaofan via cfe-commits
@@ -2513,7 +2548,23 @@ bool PPCFrameLowering::spillCalleeSavedRegisters( !MF->getFunction().hasFnAttribute(Attribute::NoUnwind)) TII.storeRegToStackSlotNoUpd(MBB, MI, Reg, !IsLiveIn, I.getFrameIdx(), RC, TRI); -

[llvm] [compiler-rt] [clang-tools-extra] [clang] [flang] [PowerPC][CodeGen] Exploit STMW and LMW in 32-bit big-endian mode. (PR #74415)

2023-12-04 Thread Qiu Chaofan via cfe-commits
@@ -0,0 +1,110 @@ +; RUN: llc -mtriple=powerpc-unknown-aix-xcoff -verify-machineinstrs \ +; RUN: -mcpu=pwr4 -mattr=-altivec --ppc-enable-load-store-multiple < %s \ +; RUN: | FileCheck %s + +; CHECK: stmw 16, 64(1) # 4-byte Folded Spill +; CHECK: lmw 16, 64(1)#

[clang] [compiler-rt] [llvm] [clang-tools-extra] [flang] [PowerPC][CodeGen] Exploit STMW and LMW in 32-bit big-endian mode. (PR #74415)

2023-12-04 Thread Qiu Chaofan via cfe-commits
@@ -1676,6 +1676,10 @@ PPCRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II, bool noImmForm = !MI.isInlineAsm() && OpC != TargetOpcode::STACKMAP && OpC != TargetOpcode::PATCHPOINT && !ImmToIdxMap.count(OpC); ecnelises wrote:

[llvm] [clang-tools-extra] [compiler-rt] [clang] [flang] [PowerPC][CodeGen] Exploit STMW and LMW in 32-bit big-endian mode. (PR #74415)

2023-12-04 Thread Qiu Chaofan via cfe-commits
@@ -2399,6 +2405,30 @@ bool PPCFrameLowering::assignCalleeSavedSpillSlots( return AllSpilledToReg; } +static void findContinuousLoadStore(ArrayRef CSI, +Register ) { + CalleeSavedInfo BeginI = CSI[0]; ecnelises wrote:

[llvm] [clang-tools-extra] [libcxx] [compiler-rt] [mlir] [clang] [flang] [mlir] Fix a zero stride canonicalizer crash (PR #74200)

2023-12-04 Thread Mehdi Amini via cfe-commits
joker-eph wrote: > Is it possible to add the test case (or minimal similar example) with > `--inline` option so that we can confirm the original issue is resolved. > > #73383 It is common that the person filing the issue does not reduce the IR or the pipeline that causes the bug. In

[clang] [C++20] [Modules] Enable -fmodules-embed-all-files by default for named modules (PR #74419)

2023-12-04 Thread David Blaikie via cfe-commits
dwblaikie wrote: I'd still like to know more about what other implementations do - see ongoing discussion on the original issue. https://github.com/llvm/llvm-project/pull/74419 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [mlir] [compiler-rt] [llvm] [libcxx] [clang-tools-extra] [flang] [mlir] Fix a zero stride canonicalizer crash (PR #74200)

2023-12-04 Thread Mehdi Amini via cfe-commits
@@ -0,0 +1,14 @@ +// RUN: mlir-opt %s -inline -split-input-file | FileCheck %s + +// CHECK-LABEL: func @inline_negative_stride +func.func @inline_negative_stride(%arg0 : memref<10xf32>) -> memref<1xf32, strided<[?], offset: 1>> { + cf.br ^bb1(%arg0 : memref<10xf32>) +^bb1(%m:

[clang] [C++20] [Modules] Enable -fmodules-embed-all-files by default for named modules (PR #74419)

2023-12-04 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/74419 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Enable -fmodules-embed-all-files by default for named modules (PR #74419)

2023-12-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Chuanqi Xu (ChuanqiXu9) Changes Close https://github.com/llvm/llvm-project/issues/72383 It looks incorrect or odd for the BMIs to dependent on the real files. It prevents we moving the BMIs and the distributed builds. And it

[llvm] [clang] [SimplifyCFG] Not folding branch in loop header with constant iterations (PR #74268)

2023-12-04 Thread via cfe-commits
xiangzh1 wrote: > So where is the different X86 can partial unroll but AMDGPU can not unroll at > all? > https://godbolt.org/z/cMeE61bhf Loop unroll with -unroll-runtime can partial > unroll the case. @nikic It looks if we don't avoid the transform, it will > become a runtime unroll. The case

[clang] [C++20] [Modules] Enable -fmodules-embed-all-files by default for named modules (PR #74419)

2023-12-04 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/74419 Close https://github.com/llvm/llvm-project/issues/72383 It looks incorrect or odd for the BMIs to dependent on the real files. It prevents we moving the BMIs and the distributed builds. And it looks like

[clang] [compiler-rt] [llvm] [clang-tools-extra] [flang] [PowerPC][CodeGen] Exploit STMW and LMW in 32-bit big-endian mode. (PR #74415)

2023-12-04 Thread via cfe-commits
https://github.com/EsmeYi updated https://github.com/llvm/llvm-project/pull/74415 >From f6d0ef8357540c61a9c20774e3b170a8db5b72ca Mon Sep 17 00:00:00 2001 From: esmeyi Date: Tue, 5 Dec 2023 00:44:04 -0500 Subject: [PATCH] Exploit STMW and LMW in 32-bit big-endian mode. ---

[clang-tools-extra] [compiler-rt] [flang] [libcxx] [libc] [llvm] [clang] [openmp] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,39 @@ +//===--- MoveSharedPointerContentsCheck.h - clang-tidy --*- 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:

[openmp] [libc] [llvm] [clang-tools-extra] [libcxx] [compiler-rt] [clang] [flang] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/67467 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [openmp] [compiler-rt] [libc] [llvm] [libcxx] [clang-tools-extra] [flang] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL commented: Few issues with `unaryOperator` left, after that will be fixed, it would look fine. https://github.com/llvm/llvm-project/pull/67467 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [libcxx] [llvm] [flang] [libc] [openmp] [clang-tools-extra] [compiler-rt] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,49 @@ +//===--- MoveSharedPointerContentsCheck.cpp - clang-tidy --===// +// +// 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:

[libc] [flang] [openmp] [compiler-rt] [libcxx] [clang] [llvm] [clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,49 @@ +//===--- MoveSharedPointerContentsCheck.cpp - clang-tidy --===// +// +// 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:

[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)

2023-12-04 Thread Ziqing Luo via cfe-commits
@@ -2487,15 +2486,15 @@ void ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContext ) { // Clean up constructed object even if there are no attributes to // keep the number of objects in limbo as small as possible. - if (auto Object =

[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)

2023-12-04 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 updated https://github.com/llvm/llvm-project/pull/74020 >From 9c2718abce31d61c079e0945313fe14ad0f334b3 Mon Sep 17 00:00:00 2001 From: ziqingluo-90 Date: Mon, 4 Dec 2023 14:37:10 -0800 Subject: [PATCH] Thread safety analysis: Fix a bug in handling temporary

[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)

2023-12-04 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 updated https://github.com/llvm/llvm-project/pull/74020 >From 81701bfc9052eed567abb76ac05d44cb99298303 Mon Sep 17 00:00:00 2001 From: ziqingluo-90 Date: Mon, 4 Dec 2023 14:37:10 -0800 Subject: [PATCH] Thread safety analysis: Fix a bug in handling temporary

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

2023-12-04 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,74 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers

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

2023-12-04 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. Unless you want this to be merged as 44101708+5chmi...@users.noreply.github.com, correct your github settings, squash all commits into one and make sure that author of commit is correct. https://github.com/llvm/llvm-project/pull/66583

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

2023-12-04 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,74 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers

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

2023-12-04 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/66583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [llvm] [XCOFF][obj2yaml] support parsing auxiliary symbols for XCOFF (PR #70642)

2023-12-04 Thread via cfe-commits
https://github.com/EsmeYi updated https://github.com/llvm/llvm-project/pull/70642 >From 7ba6a651bb84befdcd1566352d5340880591789d Mon Sep 17 00:00:00 2001 From: esmeyi Date: Mon, 30 Oct 2023 06:00:18 -0400 Subject: [PATCH 1/7] Add support for parsing auxiliary symbols of XCOFF object file for

[clang] [llvm] [ValueTracking] Add dominating condition support in computeKnownBits() (PR #73662)

2023-12-04 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: Looks like the regression in `DILATE` has been addressed. Could you please have a look at `MultiSource/Benchmarks/mediabench/mpeg2/mpeg2dec/mpeg2decode`? https://github.com/llvm/llvm-project/pull/73662 ___ cfe-commits mailing list

[compiler-rt] [clang] [llvm] [HIP] support 128 bit int division (PR #71978)

2023-12-04 Thread Yaxun Liu via cfe-commits
@@ -937,27 +938,105 @@ bool CodeGenAction::loadLinkModules(CompilerInstance ) { for (const CodeGenOptions::BitcodeFileToLink : CI.getCodeGenOpts().LinkBitcodeFiles) { -auto BCBuf = CI.getFileManager().getBufferForFile(F.Filename); -if (!BCBuf) { + +auto

[clang] [llvm] [SimplifyCFG] Not folding branch in loop header with constant iterations (PR #74268)

2023-12-04 Thread via cfe-commits
bcl5980 wrote: https://godbolt.org/z/cMeE61bhf Loop unroll with -unroll-runtime can partial unroll the case. @nikic It looks if we don't avoid the transform, it will become a runtime unroll. @xiangzh1 's solution looks fine to me if we do not involve loopInfo in simplifycfg.

[clang] [llvm] [LoongArch] Support per-global code model attribute for LoongArch (PR #72079)

2023-12-04 Thread via cfe-commits
https://github.com/heiher ready_for_review https://github.com/llvm/llvm-project/pull/72079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LoongArch] Support per-global code model attribute for LoongArch (PR #72079)

2023-12-04 Thread via cfe-commits
https://github.com/heiher updated https://github.com/llvm/llvm-project/pull/72079 >From 478cbb52d3ed3c6311389dd48c8d187cb28de18d Mon Sep 17 00:00:00 2001 From: WANG Rui Date: Fri, 10 Nov 2023 21:07:48 -0600 Subject: [PATCH 1/2] [clang] Add per-global code model attribute This adds a

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-04 Thread via cfe-commits
https://github.com/heiher updated https://github.com/llvm/llvm-project/pull/72078 >From 478cbb52d3ed3c6311389dd48c8d187cb28de18d Mon Sep 17 00:00:00 2001 From: WANG Rui Date: Fri, 10 Nov 2023 21:07:48 -0600 Subject: [PATCH] [clang] Add per-global code model attribute This adds a per-global

[clang] [llvm] [SimplifyCFG] Not folding branch in loop header with constant iterations (PR #74268)

2023-12-04 Thread via cfe-commits
bcl5980 wrote: > I think we should follow this principle: if a loop required to be unroll > later, we should not distroy the loop count info. The ideal is right. But I think what nikic say is loop unroll should handle the case( upper bound unrolling). But It doesn't work. We need to find why

[clang] [compiler-rt] [llvm] [HIP] support 128 bit int division (PR #71978)

2023-12-04 Thread Yaxun Liu via cfe-commits
@@ -937,27 +938,105 @@ bool CodeGenAction::loadLinkModules(CompilerInstance ) { for (const CodeGenOptions::BitcodeFileToLink : CI.getCodeGenOpts().LinkBitcodeFiles) { -auto BCBuf = CI.getFileManager().getBufferForFile(F.Filename); -if (!BCBuf) { + +auto

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-04 Thread via cfe-commits
https://github.com/heiher ready_for_review https://github.com/llvm/llvm-project/pull/72078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-04 Thread via cfe-commits
https://github.com/heiher updated https://github.com/llvm/llvm-project/pull/72078 >From 20069f5db5e45e4884397ebda1797d2050283854 Mon Sep 17 00:00:00 2001 From: WANG Rui Date: Fri, 10 Nov 2023 21:07:48 -0600 Subject: [PATCH] [clang] Add per-global code model attribute This adds a per-global

[clang] [libclang/python] Fix some minor typos (PR #74292)

2023-12-04 Thread Craig Hesling via cfe-commits
https://github.com/linux4life798 edited https://github.com/llvm/llvm-project/pull/74292 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-04 Thread via cfe-commits
https://github.com/heiher converted_to_draft https://github.com/llvm/llvm-project/pull/72078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-04 Thread via cfe-commits
https://github.com/heiher ready_for_review https://github.com/llvm/llvm-project/pull/72078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-04 Thread via cfe-commits
https://github.com/heiher edited https://github.com/llvm/llvm-project/pull/72078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-04 Thread via cfe-commits
https://github.com/heiher updated https://github.com/llvm/llvm-project/pull/72078 >From 5333233261a3563f80ed58250c40791bd44a9901 Mon Sep 17 00:00:00 2001 From: WANG Rui Date: Fri, 10 Nov 2023 21:07:48 -0600 Subject: [PATCH] [clang] Add per-global code model attribute This adds a per-global

[clang] [llvm] [clang-tools-extra] [clang] Reject incomplete type arguments for __builtin_dump_struct (PR #72749)

2023-12-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/72749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b3392c4 - [clang] Reject incomplete type arguments for __builtin_dump_struct (#72749)

2023-12-04 Thread via cfe-commits
Author: Younan Zhang Date: 2023-12-05T09:59:42+08:00 New Revision: b3392c447ad7b18a652d2ed63e8ebb7741077a98 URL: https://github.com/llvm/llvm-project/commit/b3392c447ad7b18a652d2ed63e8ebb7741077a98 DIFF: https://github.com/llvm/llvm-project/commit/b3392c447ad7b18a652d2ed63e8ebb7741077a98.diff

[clang] [llvm] [clang-tools-extra] [clang] Reject incomplete type arguments for __builtin_dump_struct (PR #72749)

2023-12-04 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Thanks! Added the link. https://github.com/llvm/llvm-project/pull/72749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-tools-extra] [clang] Reject incomplete type arguments for __builtin_dump_struct (PR #72749)

2023-12-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/72749 >From d23305db7faba1ed1464aeee6d9e0f2ee1994226 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Mon, 6 Nov 2023 16:50:02 +0800 Subject: [PATCH 1/2] [clang] Reject incomplete type arguments for

[clang] [clang] Reject incomplete type arguments for __builtin_dump_struct (PR #72749)

2023-12-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/72749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SimplifyCFG] Not folding branch in loop header with constant iterations (PR #74268)

2023-12-04 Thread via cfe-commits
xiangzh1 wrote: I think we should follow this principle: if a loop required to be unroll later, we should not distroy the loop count info. https://github.com/llvm/llvm-project/pull/74268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-format][NFC] Use `prog` in clang-format-diff.py (PR #74399)

2023-12-04 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/74399 >From ee039e7c50751fabdbaadae73a0a09bc905620f2 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Mon, 4 Dec 2023 17:33:47 -0800 Subject: [PATCH 1/2] [clang-format][NFC] Use `prog` in clang-format-diff.py This is a

[clang] [clang-format][NFC] Use `prog` in clang-format-diff.py (PR #74399)

2023-12-04 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 192439db6e3fcccf98c850bda1b970a11c590bbb..ee039e7c50751fabdbaadae73a0a09bc905620f2

[clang] [clang-format][NFC] Use `prog` in clang-format-diff.py (PR #74399)

2023-12-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes This is a minor improvement to #73491. --- Full diff: https://github.com/llvm/llvm-project/pull/74399.diff 1 Files Affected: - (modified) clang/tools/clang-format/clang-format-diff.py (+1-2)

[clang] [clang-format][NFC] Use `prog` in clang-format-diff.py (PR #74399)

2023-12-04 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/74399 This is a minor improvement to #73491. >From ee039e7c50751fabdbaadae73a0a09bc905620f2 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Mon, 4 Dec 2023 17:33:47 -0800 Subject: [PATCH] [clang-format][NFC] Use `prog`

[llvm] [clang] [SimplifyCFG] Not folding branch in loop header with constant iterations (PR #74268)

2023-12-04 Thread via cfe-commits
xiangzh1 wrote: > AMDGPU can not unorll this case: > > https://godbolt.org/z/4Pq3bnzTT > > But the same code in X86 looks can unroll: > > https://godbolt.org/z/zr8aTG1KW > > We may need to continue debug on it. X86 do very conservative unroll too,its upper bound send to 4 (default is 8),

[clang] [llvm] [SimplifyCFG] Not folding branch in loop header with constant iterations (PR #74268)

2023-12-04 Thread via cfe-commits
bcl5980 wrote: AMDGPU can not unorll this case: https://godbolt.org/z/4Pq3bnzTT But the same code in X86 looks can unroll: https://godbolt.org/z/zr8aTG1KW We may need to continue debug on it. https://github.com/llvm/llvm-project/pull/74268 ___

[clang] [clang-format] Remove duplicates in @property using std::set (PR #74235)

2023-12-04 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/74235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 924f6ca - [clang-format] Remove duplicates in @property using std::set (#74235)

2023-12-04 Thread via cfe-commits
Author: Owen Pan Date: 2023-12-04T16:33:20-08:00 New Revision: 924f6ca1bdc49efe776d7f5cfd43d421b65346ba URL: https://github.com/llvm/llvm-project/commit/924f6ca1bdc49efe776d7f5cfd43d421b65346ba DIFF: https://github.com/llvm/llvm-project/commit/924f6ca1bdc49efe776d7f5cfd43d421b65346ba.diff

[compiler-rt] [llvm] [clang] [libcxx] [mlir] [flang] [clang-tools-extra] [mlir] Fix a zero stride canonicalizer crash (PR #74200)

2023-12-04 Thread Kai Sasaki via cfe-commits
https://github.com/Lewuathe approved this pull request. Thanks for the update. It LGTM. https://github.com/llvm/llvm-project/pull/74200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)

2023-12-04 Thread Aaron Puchert via cfe-commits
@@ -2487,15 +2486,15 @@ void ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContext ) { // Clean up constructed object even if there are no attributes to // keep the number of objects in limbo as small as possible. - if (auto Object =

[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)

2023-12-04 Thread Aaron Puchert via cfe-commits
@@ -1530,7 +1532,6 @@ void ThreadSafetyAnalyzer::getEdgeLockset(FactSet& Result, } namespace { - aaronpuchert wrote: Nitpick: can you undo the whitespace change? https://github.com/llvm/llvm-project/pull/74020 ___

[clang] [clang][modules] Reset codegen options (take 2). (PR #74388)

2023-12-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Juergen Ributzka (ributzka) Changes CodeGen options do not affect the AST, so they usually can be ignored. The only exception to the rule is when a PCM is created with `-gmodules`. In that case the Clang module format is switched to object

[clang] [clang][modules] Reset codegen options (take 2). (PR #74388)

2023-12-04 Thread Juergen Ributzka via cfe-commits
https://github.com/ributzka created https://github.com/llvm/llvm-project/pull/74388 CodeGen options do not affect the AST, so they usually can be ignored. The only exception to the rule is when a PCM is created with `-gmodules`. In that case the Clang module format is switched to object file

[llvm] [clang] [clang] NFC: Deprecate `FileEntry::getName()` (PR #68157)

2023-12-04 Thread Jan Svoboda via cfe-commits
@@ -284,7 +284,6 @@ TEST_F(FileManagerTest, getFileRefReturnsCorrectNameForDifferentStatPath) { ASSERT_FALSE(!F1Alias); ASSERT_FALSE(!F1Alias2); EXPECT_EQ("dir/f1.cpp", F1->getName()); - EXPECT_EQ("dir/f1.cpp", F1->getFileEntry().getName());

[llvm] [compiler-rt] [flang] [openmp] [clang] [libcxx] [clang-tools-extra] [libc] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread via cfe-commits
pizzud wrote: Try searching for `unresolvedLookupExpr` & `UnresolvedLookupExpr` in the clang-tidy directory. There is a high probability that another check has done something related/similar. > >

[llvm] [libc] [clang-tools-extra] [compiler-rt] [flang] [clang] [libcxx] [openmp] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread via cfe-commits
@@ -0,0 +1,75 @@ +// RUN: %check_clang_tidy %s bugprone-move-shared-pointer-contents %t -- -config="{CheckOptions: {bugprone-move-shared-pointer-contents.SharedPointerClasses: 'std::shared_ptr;my::OtherSharedPtr;'}}" + +// Some dummy definitions we'll need. + +namespace std {

[llvm] [compiler-rt] [flang] [openmp] [clang] [libcxx] [clang-tools-extra] [libc] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread via cfe-commits
@@ -107,6 +107,7 @@ Clang-Tidy Checks :doc:`bugprone-misplaced-pointer-arithmetic-in-alloc `, "Yes" :doc:`bugprone-misplaced-widening-cast `, :doc:`bugprone-move-forwarding-reference `, "Yes" + :doc:`bugprone-move-shared-pointer-contents `, "Yes"

[clang-tools-extra] [clang] [libc] [libcxx] [llvm] [compiler-rt] [openmp] [flang] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread via cfe-commits
@@ -118,6 +119,7 @@ Clang-Tidy Checks :doc:`bugprone-posix-return `, "Yes" :doc:`bugprone-redundant-branch-condition `, "Yes" :doc:`bugprone-reserved-identifier `, "Yes" + :doc:`bugprone-shared-pointer-contents-move `, "Yes" pizzud wrote: Done.

[llvm] [libc] [clang-tools-extra] [compiler-rt] [flang] [clang] [libcxx] [openmp] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread via cfe-commits
@@ -0,0 +1,51 @@ +//===--- MoveSharedPointerContentsCheck.cpp - clang-tidy --===// +// +// 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:

[clang-tools-extra] [clang] [libc] [libcxx] [llvm] [compiler-rt] [openmp] [flang] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread via cfe-commits
@@ -25,6 +25,7 @@ add_clang_library(clangTidyBugproneModule ImplicitWideningOfMultiplicationResultCheck.cpp InaccurateEraseCheck.cpp IncorrectEnableIfCheck.cpp + MoveSharedPointerContentsCheck.cpp pizzud wrote: Done, bad merge.

[llvm] [compiler-rt] [flang] [openmp] [clang] [libcxx] [clang-tools-extra] [libc] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread via cfe-commits
@@ -0,0 +1,51 @@ +//===--- MoveSharedPointerContentsCheck.cpp - clang-tidy --===// +// +// 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:

[llvm] [libc] [clang-tools-extra] [compiler-rt] [flang] [clang] [libcxx] [openmp] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread via cfe-commits
@@ -0,0 +1,39 @@ +//===--- MoveSharedPointerContentsCheck.h - clang-tidy --*- 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:

[compiler-rt] [clang-tools-extra] [libcxx] [libc] [llvm] [flang] [openmp] [clang] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread via cfe-commits
@@ -0,0 +1,51 @@ +//===--- MoveSharedPointerContentsCheck.cpp - clang-tidy --===// +// +// 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:

[clang-tools-extra] [clang] [libc] [libcxx] [llvm] [compiler-rt] [openmp] [flang] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread via cfe-commits
@@ -0,0 +1,51 @@ +//===--- MoveSharedPointerContentsCheck.cpp - clang-tidy --===// +// +// 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:

[llvm] [compiler-rt] [flang] [openmp] [clang] [libcxx] [clang-tools-extra] [libc] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread via cfe-commits
https://github.com/pizzud updated https://github.com/llvm/llvm-project/pull/67467 >From 6d5d35e1273f595e8a0382053d5183cbce7a9d8a Mon Sep 17 00:00:00 2001 From: David Pizzuto Date: Tue, 26 Sep 2023 10:45:42 -0700 Subject: [PATCH 1/4] [clang-tidy] Add bugprone-move-shared-pointer-contents

[llvm] [compiler-rt] [flang] [openmp] [clang] [libcxx] [clang-tools-extra] [libc] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread via cfe-commits
https://github.com/pizzud updated https://github.com/llvm/llvm-project/pull/67467 >From 6d5d35e1273f595e8a0382053d5183cbce7a9d8a Mon Sep 17 00:00:00 2001 From: David Pizzuto Date: Tue, 26 Sep 2023 10:45:42 -0700 Subject: [PATCH 1/3] [clang-tidy] Add bugprone-move-shared-pointer-contents

[clang-tools-extra] [Clangd] Sanitize path before recording into IncludeStructure during buildPreamble (PR #70798)

2023-12-04 Thread via cfe-commits
https://github.com/Maddobun updated https://github.com/llvm/llvm-project/pull/70798 >From 0572afa42e4e6ca1d1de0e9df045828552cb4480 Mon Sep 17 00:00:00 2001 From: Leo Zhu Date: Wed, 8 Nov 2023 11:10:13 -0500 Subject: [PATCH 1/3] Convert URI to uppercase drive letter during parsing ---

[clang] [Driver] Mark -arch as TargetSpecific (PR #74365)

2023-12-04 Thread Brad Smith via cfe-commits
https://github.com/brad0 approved this pull request. https://github.com/llvm/llvm-project/pull/74365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Remove duplicates in @property using std::set (PR #74235)

2023-12-04 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. https://github.com/llvm/llvm-project/pull/74235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)

2023-12-04 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: @aaronpuchert Thanks for your comment! I have addressed them. Do you mind to take an another look and approve it if it looks good to you? https://github.com/llvm/llvm-project/pull/74020 ___ cfe-commits mailing list

[llvm] [compiler-rt] [flang] [clang] [libcxx] [lldb] [libc] [lld] [hwasan] Use ErrorAction::Recover in interceptors (PR #74000)

2023-12-04 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/74000 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [lldb] [libc] [mlir] [clang] [libcxx] [polly] [compiler-rt] [lld] [llvm] [flang] [NFC][asan] Inline ENSURE_ASAN_INITED macro (PR #74174)

2023-12-04 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/74174 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [lldb] [libc] [mlir] [clang] [libcxx] [polly] [compiler-rt] [lld] [llvm] [flang] [NFC][asan] Inline ENSURE_ASAN_INITED macro (PR #74174)

2023-12-04 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/74174 >From 71e54faa238765cb9df656a3f6e347a2d04f989a Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Fri, 1 Dec 2023 19:20:37 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20change?=

  1   2   3   4   >