[PATCH] D150083: [clang-format] ObjCPropertyAttributeOrder to sort ObjC property attributes

2023-11-15 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. Thank you for your patience! There are still a few comments not done from the previous round. In D150083#4655528 , @owenpan wrote: > See also D153228 . Would this patch have a similar performan

[clang] [flang] [Flang][Clang] Add support for frame pointers in Flang (PR #72146)

2023-11-15 Thread Andrzej Warzyński via cfe-commits
banach-space wrote: Could you add some tests? In e.g. "driver-help.f90" we merely test that a flag is visible. https://github.com/llvm/llvm-project/pull/72146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [clang][analyzer] Restrict 'fopen' modeling to POSIX versions in SimpleStreamChecker (PR #72016)

2023-11-15 Thread Balázs Kéri via cfe-commits
https://github.com/balazske approved this pull request. The change is OK, automated tests show a failure but it is in an unrelated test. https://github.com/llvm/llvm-project/pull/72016 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] 9a9933f - [llvm][DebugInfo] DWARFv5: static data members declarations are DW_TAG_variable (#72234)

2023-11-15 Thread via cfe-commits
Author: Michael Buch Date: 2023-11-15T08:16:24Z New Revision: 9a9933fae23249fbf6cf5b3c090e630f578b7f98 URL: https://github.com/llvm/llvm-project/commit/9a9933fae23249fbf6cf5b3c090e630f578b7f98 DIFF: https://github.com/llvm/llvm-project/commit/9a9933fae23249fbf6cf5b3c090e630f578b7f98.diff LOG:

[clang] [llvm] [llvm][DebugInfo] DWARFv5: static data members declarations are DW_TAG_variable (PR #72234)

2023-11-15 Thread Michael Buch via cfe-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/72234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [flang] [compiler-rt] [llvm] [libc] [clang][DebugInfo] DWARFv5: static data members declarations are DW_TAG_variable (PR #72235)

2023-11-15 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/72235 >From c0db61f318f50a1cf219c69af9c6b624b05c9da1 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Mon, 13 Nov 2023 09:48:39 + Subject: [PATCH] [clang][DebugInfo] DWARFv5: static data members declarations a

[flang] [clang] [flang] Add depdendent-lib option to flang -fc1 on Windows (PR #72121)

2023-11-15 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space approved this pull request. LGTM :) Thank you for addressing my comments. https://github.com/llvm/llvm-project/pull/72121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [flang] [flang] Add depdendent-lib option to flang -fc1 on Windows (PR #72121)

2023-11-15 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space edited https://github.com/llvm/llvm-project/pull/72121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Add depdendent-lib option to flang -fc1 on Windows (PR #72121)

2023-11-15 Thread Andrzej Warzyński via cfe-commits
@@ -303,6 +323,9 @@ bool CodeGenAction::beginSourceFileAction() { Fortran::parser::Program &parseTree{*ci.getParsing().parseTree()}; lb.lower(parseTree, ci.getInvocation().getSemanticsContext()); + // Add dependent libraries + addDepdendentLibs(*mlirModule, ci);

[clang] [flang] [flang] Add depdendent-lib option to flang -fc1 on Windows (PR #72121)

2023-11-15 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space edited https://github.com/llvm/llvm-project/pull/72121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [flang] Add depdendent-lib option to flang -fc1 on Windows (PR #72121)

2023-11-15 Thread Andrzej Warzyński via cfe-commits
@@ -0,0 +1,15 @@ +! DEFINE: %{triple} = +! DEFINE: %{run} = %flang_fc1 -emit-mlir -triple %{triple} --dependent-lib=libtest %s -o - 2>&1 | FileCheck %s +! REDEFINE: %{triple} = aarch64-pc-windows-msvc +! RUN: %{run} +! REDEFINE: %{triple} = x86_64-pc-windows-msvc +! RUN: %{run} +

[PATCH] D150083: [clang-format] ObjCPropertyAttributeOrder to sort ObjC property attributes

2023-11-15 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. BTW, it may be simpler and more efficient to use a set (e.g. `llvm::SmallSet`) for `Indices`, especially if we don't need/want to handle duplicate attributes that have a value. (See D150083#inline-1551778 .) CHANGES SIN

[clang] [llvm] [llvm][DebugInfo] DWARFv5: static data members declarations are DW_TAG_variable (PR #72234)

2023-11-15 Thread Michael Buch via cfe-commits
Michael137 wrote: Looks like the OCaml bindings are using the C-API that was changed in this PR. Will make a follow-up fix for those https://github.com/llvm/llvm-project/pull/72234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] 8e8bad7 - Revert "[llvm][DebugInfo] DWARFv5: static data members declarations are DW_TAG_variable (#72234)"

2023-11-15 Thread Michael Buch via cfe-commits
Author: Michael Buch Date: 2023-11-15T08:50:16Z New Revision: 8e8bad70e6db0b04198c025bef9acccfd06f36f0 URL: https://github.com/llvm/llvm-project/commit/8e8bad70e6db0b04198c025bef9acccfd06f36f0 DIFF: https://github.com/llvm/llvm-project/commit/8e8bad70e6db0b04198c025bef9acccfd06f36f0.diff LOG:

[clang] [Clang][RISCV] Introduce tuple types for RVV bfloat16 (PR #72216)

2023-11-15 Thread via cfe-commits
kda wrote: This commit seems to be breaking Sanitizer buildbots: https://lab.llvm.org/buildbot/#/builders/168/builds/16824 https://lab.llvm.org/buildbot/#/builders/74/builds/23531 https://lab.llvm.org/buildbot/#/builders/5/builds/38325 https://github.com/llvm/llvm-project/pull/72216 ___

[llvm] [clang-tools-extra] [clang] [MCP] Enhance MCP copy Instruction removal for special case (PR #70778)

2023-11-15 Thread via cfe-commits
https://github.com/LWenH updated https://github.com/llvm/llvm-project/pull/70778 >From a42f48a44c614f2c996f3f4cb0561e2f7ab35d6f Mon Sep 17 00:00:00 2001 From: LWenH <924105...@qq.com> Date: Tue, 31 Oct 2023 16:33:41 +0800 Subject: [PATCH 1/7] add pre commit test for later mcp patch --- llvm/tes

[clang] [clang-tools-extra] [llvm] [MCP] Enhance MCP copy Instruction removal for special case (PR #70778)

2023-11-15 Thread via cfe-commits
LWenH wrote: Resolve conflict test file: ``` /llvm/test/CodeGen/AMDGPU/load-constant-i1.ll ``` https://github.com/llvm/llvm-project/pull/70778 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] fix: compatible C++ empty record with align UB with gcc (PR #72197)

2023-11-15 Thread via cfe-commits
https://github.com/hstk30-hw edited https://github.com/llvm/llvm-project/pull/72197 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [compiler-rt] [llvm] [clang] [flang] [mlir] [mlir] Verify non-negative `offset` and `size` (PR #72059)

2023-11-15 Thread Mehdi Amini via cfe-commits
https://github.com/joker-eph approved this pull request. Nice, thanks! https://github.com/llvm/llvm-project/pull/72059 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RISCV] Introduce tuple types for RVV bfloat16 (PR #72216)

2023-11-15 Thread antoine moynault via cfe-commits
antmox wrote: This also broke several aarch64 bots: https://lab.llvm.org/buildbot/#/builders/245/builds/16676 https://lab.llvm.org/buildbot/#/builders/188/builds/37969 https://lab.llvm.org/buildbot/#/builders/198/builds/6244 https://lab.llvm.org/buildbot/#/builders/176/builds/6987 https://lab.llv

[llvm] [flang] [clang-tools-extra] [clang] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-15 Thread via cfe-commits
https://github.com/jeanPerier edited https://github.com/llvm/llvm-project/pull/70917 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [llvm] [clang-tools-extra] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-15 Thread via cfe-commits
@@ -37,5 +75,19 @@ void FORTRAN_PROCEDURE_NAME(getarg)( (void)RTNAME(GetCommandArgument)( n, &value, nullptr, nullptr, __FILE__, __LINE__); } + +void FORTRAN_PROCEDURE_NAME(getlog)(std::int8_t *arg, std::int64_t length) { + std::array str; + int error = getlogin_r(str

[clang-tools-extra] [llvm] [flang] [clang] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-15 Thread via cfe-commits
@@ -37,5 +75,19 @@ void FORTRAN_PROCEDURE_NAME(getarg)( (void)RTNAME(GetCommandArgument)( n, &value, nullptr, nullptr, __FILE__, __LINE__); } + +void FORTRAN_PROCEDURE_NAME(getlog)(std::int8_t *arg, std::int64_t length) { + std::array str; + int error = getlogin_r(str

[clang-tools-extra] [llvm] [clang] [flang] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-15 Thread via cfe-commits
https://github.com/jeanPerier commented: Thanks a lot for the update and addressing my previous comments! https://github.com/llvm/llvm-project/pull/70917 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [flang] [clang-tools-extra] [llvm] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-15 Thread via cfe-commits
@@ -13,6 +13,44 @@ #include "flang/Runtime/command.h" #include "flang/Runtime/descriptor.h" #include "flang/Runtime/io-api.h" +#include + +#ifdef _WIN32 +#define WIN32_LEAN_AND_MEAN +#define NOMINMAX +#include + +#include // UNLEN=256 +#include // wcstombs_s +#include // w

[llvm] [clang] split load to bytes to deduce load value (PR #72364)

2023-11-15 Thread via cfe-commits
https://github.com/mohammed-nurulhoque created https://github.com/llvm/llvm-project/pull/72364 When the last clobbering write for a load doesn't cover the whole load (example below). AnalyzeLoadAvailability would give up. This emits temporary byte-sized loads that cover the original load, the

[llvm] [clang] split load to bytes to deduce load value (PR #72364)

2023-11-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-analysis Author: None (mohammed-nurulhoque) Changes When the last clobbering write for a load doesn't cover the whole load (example below). AnalyzeLoadAvailability would give up. This emits temporary byte-sized loads that cover the original load,

[llvm] [clang] split load to bytes to deduce load value (PR #72364)

2023-11-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (mohammed-nurulhoque) Changes When the last clobbering write for a load doesn't cover the whole load (example below). AnalyzeLoadAvailability would give up. This emits temporary byte-sized loads that cover the original load, then ru

[llvm] [clang] split load to bytes to deduce load value (PR #72364)

2023-11-15 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 dedf2c6bb5193652f6ad7d9ff9e676624c2485b7 41a9dbd39fbb866e7fc090f82d58ee6364a7cfda --

[clang] Revert "[Clang][RISCV] Introduce tuple types for RVV bfloat16 (#72216)" (PR #72367)

2023-11-15 Thread Yueh-Ting Chen via cfe-commits
https://github.com/eopXD created https://github.com/llvm/llvm-project/pull/72367 This reverts commit 8434b0b9d39b7ffcd1f7f7b5746151e293620e0d. #72216 This commit broke the multiple buildbots, looks like the extension in `NUM_PREDEF_TYPE_IDS` might have broken some inheriting usages, causing i

[clang] Revert "[Clang][RISCV] Introduce tuple types for RVV bfloat16 (#72216)" (PR #72367)

2023-11-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Yueh-Ting (eop) Chen (eopXD) Changes This reverts commit 8434b0b9d39b7ffcd1f7f7b5746151e293620e0d. #72216 This commit broke the multiple buildbots, looks like the extension in `NUM_PREDEF_TYPE_IDS` might have broken some inheriti

[clang] Revert "[Clang][RISCV] Introduce tuple types for RVV bfloat16 (#72216)" (PR #72367)

2023-11-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yueh-Ting (eop) Chen (eopXD) Changes This reverts commit 8434b0b9d39b7ffcd1f7f7b5746151e293620e0d. #72216 This commit broke the multiple buildbots, looks like the extension in `NUM_PREDEF_TYPE_IDS` might have broken some inheriting usage

[clang] [clang] Reapply Handle templated operators with reversed arguments (PR #72213)

2023-11-15 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/72213 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang][RISCV] Introduce tuple types for RVV bfloat16 (#72216)" (PR #72367)

2023-11-15 Thread antoine moynault via cfe-commits
https://github.com/antmox approved this pull request. https://github.com/llvm/llvm-project/pull/72367 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5107a47 - Revert "[Clang][RISCV] Introduce tuple types for RVV bfloat16 (#72216)" (#72367)

2023-11-15 Thread via cfe-commits
Author: Yueh-Ting (eop) Chen Date: 2023-11-15T18:05:07+08:00 New Revision: 5107a47fee9c95489d3743a53e9578407b0e3656 URL: https://github.com/llvm/llvm-project/commit/5107a47fee9c95489d3743a53e9578407b0e3656 DIFF: https://github.com/llvm/llvm-project/commit/5107a47fee9c95489d3743a53e9578407b0e365

[clang] Revert "[Clang][RISCV] Introduce tuple types for RVV bfloat16 (#72216)" (PR #72367)

2023-11-15 Thread Yueh-Ting Chen via cfe-commits
https://github.com/eopXD closed https://github.com/llvm/llvm-project/pull/72367 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0f7f8db - [clang][analyzer] Restrict 'fopen' modeling to POSIX versions in SimpleStreamChecker (#72016)

2023-11-15 Thread via cfe-commits
Author: Ben Shi Date: 2023-11-15T18:17:32+08:00 New Revision: 0f7f8dbcf5ec06cb1ea8912ffd234523f60a61be URL: https://github.com/llvm/llvm-project/commit/0f7f8dbcf5ec06cb1ea8912ffd234523f60a61be DIFF: https://github.com/llvm/llvm-project/commit/0f7f8dbcf5ec06cb1ea8912ffd234523f60a61be.diff LOG:

[clang] [clang][analyzer] Restrict 'fopen' modeling to POSIX versions in SimpleStreamChecker (PR #72016)

2023-11-15 Thread Ben Shi via cfe-commits
https://github.com/benshi001 closed https://github.com/llvm/llvm-project/pull/72016 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Recommit "[Clang][RISCV] Introduce tuple types for RVV bfloat16 #72216" (PR #72370)

2023-11-15 Thread Yueh-Ting Chen via cfe-commits
https://github.com/eopXD created https://github.com/llvm/llvm-project/pull/72370 This PR attempts to recommit the PR (#72216) with a safe-bounded TypeID that will not cause indeterminate results for the compiler. >From 78e3ab20f5e527563b7645635b7147fdda8ba4b9 Mon Sep 17 00:00:00 2001 From: "Yue

[clang] Recommit "[Clang][RISCV] Introduce tuple types for RVV bfloat16 #72216" (PR #72370)

2023-11-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v @llvm/pr-subscribers-clang Author: Yueh-Ting (eop) Chen (eopXD) Changes This PR attempts to recommit the PR (#72216) with a safe-bounded TypeID that will not cause indeterminate results for the compiler. --- Full diff: https://github.com

[clang] da90fd7 - Reland "[llvm][DebugInfo] DWARFv5: static data members declarations are DW_TAG_variable (#72234)"

2023-11-15 Thread Michael Buch via cfe-commits
Author: Michael Buch Date: 2023-11-15T10:26:35Z New Revision: da90fd75241d5b149fd307e3eeae84f7317d9d9b URL: https://github.com/llvm/llvm-project/commit/da90fd75241d5b149fd307e3eeae84f7317d9d9b DIFF: https://github.com/llvm/llvm-project/commit/da90fd75241d5b149fd307e3eeae84f7317d9d9b.diff LOG:

[clang] [llvm] split load to bytes to deduce load value (PR #72364)

2023-11-15 Thread Nikita Popov via cfe-commits
https://github.com/nikic requested changes to this pull request. I don't like the overall approach of assembling this from individual byte-sized loads here. What I would expect to see is more something along these lines: If we find a clobbering store that a) only clobbers some subset of the loa

[llvm] [clang] split load to bytes to deduce load value (PR #72364)

2023-11-15 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/72364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] split load to bytes to deduce load value (PR #72364)

2023-11-15 Thread Nikita Popov via cfe-commits
@@ -2128,6 +2129,105 @@ static void patchAndReplaceAllUsesWith(Instruction *I, Value *Repl) { I->replaceAllUsesWith(Repl); } +// split load to single byte loads and check if the value can be deduced +// +// Example: +// define i32 @f(i8* %P) +// 1: %b2 = getelementptr inbo

[llvm] [clang] split load to bytes to deduce load value (PR #72364)

2023-11-15 Thread Nikita Popov via cfe-commits
@@ -2128,6 +2129,105 @@ static void patchAndReplaceAllUsesWith(Instruction *I, Value *Repl) { I->replaceAllUsesWith(Repl); } +// split load to single byte loads and check if the value can be deduced +// +// Example: +// define i32 @f(i8* %P) +// 1: %b2 = getelementptr inbo

[clang] [clang][DebugInfo] DWARFv5: static data members declarations are DW_TAG_variable (PR #72235)

2023-11-15 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/72235 >From a933f170dcbdbaf76f93a15cdb1c1148d78a82e8 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Mon, 13 Nov 2023 09:48:39 + Subject: [PATCH] [clang][DebugInfo] DWARFv5: static data members declarations a

[llvm] [clang] split load to bytes to deduce load value (PR #72364)

2023-11-15 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,166 @@ +; RUN: opt -S -O3 < %s nikic wrote: GVN tests should use `-passes=gvn` only, not `-O3`. https://github.com/llvm/llvm-project/pull/72364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [llvm] split load to bytes to deduce load value (PR #72364)

2023-11-15 Thread Sergey Kachkov via cfe-commits
skachkov-sc wrote: I think we should also check this optimization for non-byte stores, e.g. ``` define i32 @f(ptr %ptr) %ptr1 = getelementptr inbounds i8, ptr %ptr, i64 2 store i16 0, ptr %ptr, align 2 store i16 0, ptr %ptr1, align 2 %L = load i32, ptr %ptr, align 4 ``` GVN should

[llvm] [clang] [clang-tools-extra] [MCP] Enhance MCP copy Instruction removal for special case (PR #70778)

2023-11-15 Thread via cfe-commits
@@ -163,7 +163,8 @@ class CopyTracker { /// Clobber a single register, removing it from the tracker's copy maps. void clobberRegister(MCRegister Reg, const TargetRegisterInfo &TRI, - const TargetInstrInfo &TII, bool UseCopyInstr) { +

[clang] [llvm] [clang-tools-extra] [MCP] Enhance MCP copy Instruction removal for special case (PR #70778)

2023-11-15 Thread via cfe-commits
@@ -784,18 +813,33 @@ void MachineCopyPropagation::ForwardCopyPropagateBlock(MachineBasicBlock &MBB) { // %xmm2 = copy %xmm0 // ... // %xmm2 = copy %xmm9 -Tracker.clobberRegister(Def, *TRI, *TII, UseCopyInstr); + +// While we do need to

[clang] faa3a5e - [clang][DebugInfo] DWARFv5: static data members declarations are DW_TAG_variable (#72235)

2023-11-15 Thread via cfe-commits
Author: Michael Buch Date: 2023-11-15T11:01:39Z New Revision: faa3a5ea9ae481da757dab1c95c589e2d5645982 URL: https://github.com/llvm/llvm-project/commit/faa3a5ea9ae481da757dab1c95c589e2d5645982 DIFF: https://github.com/llvm/llvm-project/commit/faa3a5ea9ae481da757dab1c95c589e2d5645982.diff LOG:

[clang] [clang][DebugInfo] DWARFv5: static data members declarations are DW_TAG_variable (PR #72235)

2023-11-15 Thread Michael Buch via cfe-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/72235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [Flang][Clang] Add support for frame pointers in Flang (PR #72146)

2023-11-15 Thread Radu Salavat via cfe-commits
https://github.com/Radu2k updated https://github.com/llvm/llvm-project/pull/72146 >From 0b0f02eab4dc02adf79461bc865be6f7580938cf Mon Sep 17 00:00:00 2001 From: Radu2k Date: Mon, 13 Nov 2023 17:49:06 + Subject: [PATCH 1/3] [Flang][Clang] Add support for frame pointers in Flang --- clang/in

[clang] Add SME2 builtins for pfalse and ptrue (PR #71953)

2023-11-15 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau updated https://github.com/llvm/llvm-project/pull/71953 >From 79c05d1f8554d5a4469b9501b61b47863f086ffa Mon Sep 17 00:00:00 2001 From: Matt Devereau Date: Fri, 10 Nov 2023 13:40:31 + Subject: [PATCH 1/2] Add SME2 builtins for pfalse and ptrue Extend pfalse and p

[clang] Add SME2 builtins for pfalse and ptrue (PR #71953)

2023-11-15 Thread Matthew Devereau via cfe-commits
@@ -0,0 +1,34 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | FileCheck %s

[clang] Add SME2 builtins for pfalse and ptrue (PR #71953)

2023-11-15 Thread Matthew Devereau via cfe-commits
@@ -1981,6 +1979,11 @@ def SVCNTP_COUNT : SInst<"svcntp_{d}", "n}i", "QcQsQiQl", MergeNone, "aarch64_sv defm SVREVD : SInstZPZ<"svrevd", "csilUcUsUiUl", "aarch64_sve_revd">; } +let TargetGuard = "sve2p1|sme2" in { + def SVPTRUE_COUNT : SInst<"svptrue_{d}", "}v", "QcQsQiQl",

[clang] Add SME2 builtins for pfalse and ptrue (PR #71953)

2023-11-15 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau edited https://github.com/llvm/llvm-project/pull/71953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Introduce scoped variants of GNU atomic functions (PR #72280)

2023-11-15 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > Is there any actual difference now between these and the HIP/OpenCL flavors > other than dropping the language from the name? Yes, these directly copy the GNU functions and names. The OpenCL / HIP ones use a different format. https://github.com/llvm/llvm-project/pull/72280 __

[clang] [Clang] Introduce scoped variants of GNU atomic functions (PR #72280)

2023-11-15 Thread Joseph Huber via cfe-commits
@@ -798,6 +798,13 @@ static void InitializePredefinedMacros(const TargetInfo &TI, Builder.defineMacro("__ATOMIC_ACQ_REL", "4"); Builder.defineMacro("__ATOMIC_SEQ_CST", "5"); + // Define macros for the clang atomic scopes. + Builder.defineMacro("__MEMORY_SCOPE_SYSTEM", "

[clang] [Clang] Introduce scoped variants of GNU atomic functions (PR #72280)

2023-11-15 Thread Joseph Huber via cfe-commits
@@ -205,6 +220,56 @@ class AtomicScopeHIPModel : public AtomicScopeModel { } }; +/// Defines the generic atomic scope model. +class AtomicScopeGenericModel : public AtomicScopeModel { +public: + /// The enum values match predefined built-in macros __ATOMIC_SCOPE_*. + enum

[clang] [Clang] Introduce scoped variants of GNU atomic functions (PR #72280)

2023-11-15 Thread Joseph Huber via cfe-commits
@@ -54,6 +59,16 @@ enum class SyncScope { inline llvm::StringRef getAsString(SyncScope S) { jhuber6 wrote: I think it's because this is for AST printing purposes, while the backend strings vary per target. https://github.com/llvm/llvm-project/pull/72280

[clang] [Clang] Introduce scoped variants of GNU atomic functions (PR #72280)

2023-11-15 Thread Joseph Huber via cfe-commits
@@ -904,6 +904,32 @@ BUILTIN(__atomic_signal_fence, "vi", "n") BUILTIN(__atomic_always_lock_free, "bzvCD*", "nE") BUILTIN(__atomic_is_lock_free, "bzvCD*", "nE") +// GNU atomic builtins with atomic scopes. +ATOMIC_BUILTIN(__scoped_atomic_load, "v.", "t") jhuber

[flang] [libcxx] [lldb] [compiler-rt] [libc] [clang] [clang-tools-extra] [llvm] ✨ [Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy) (PR #68620)

2023-11-15 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman converted_to_draft https://github.com/llvm/llvm-project/pull/68620 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix more bugs in isStartOfName() (PR #72336)

2023-11-15 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/72336 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c3329b1 - [clang][Interp][NFC] Limit Pointer::isArrayElement() to actual arrays

2023-11-15 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-11-15T13:40:16+01:00 New Revision: c3329b1cac3158bba62aab14d648b9dc615f8c67 URL: https://github.com/llvm/llvm-project/commit/c3329b1cac3158bba62aab14d648b9dc615f8c67 DIFF: https://github.com/llvm/llvm-project/commit/c3329b1cac3158bba62aab14d648b9dc615f8c67.diff LO

[lldb] [mlir] [openmp] [libc] [clang] [libcxx] [flang] [llvm] [clang-tools-extra] GlobalISel: Guard return in llvm::getIConstantSplatVal (PR #71989)

2023-11-15 Thread via cfe-commits
@@ -1116,9 +1116,9 @@ std::optional llvm::getIConstantSplatVal(const Register Reg, const MachineRegisterInfo &MRI) { if (auto SplatValAndReg = getAnyConstantSplat(Reg, MRI, /* AllowUndef */ false)) { -std::optional ValAndVReg = -getIConstantVRegValWithL

[flang] [clang-tools-extra] [clang] [llvm] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-15 Thread Yi Wu via cfe-commits
https://github.com/PAX-12-WU updated https://github.com/llvm/llvm-project/pull/70917 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 1/6] GETLOG runtime and extension implementation: get login username Ge

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

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

[clang] [llvm] [AMDGPU] Emit a waitcnt instruction after each memory instruction (PR #68932)

2023-11-15 Thread Matt Arsenault via cfe-commits
arsenm wrote: > So, while it's possible to create a combined option, using a separate option > also makes sense. Do we generally try to avoid creating new command-line > options? Looking again, I see they are different and unrelated. I don't really understand why we have amdgpu-waitcnt-forcez

[clang] Recommit "[Clang][RISCV] Introduce tuple types for RVV bfloat16 #72216" (PR #72370)

2023-11-15 Thread Yueh-Ting Chen via cfe-commits
https://github.com/eopXD updated https://github.com/llvm/llvm-project/pull/72370 >From 78e3ab20f5e527563b7645635b7147fdda8ba4b9 Mon Sep 17 00:00:00 2001 From: "Yueh-Ting (eop) Chen" Date: Wed, 15 Nov 2023 13:50:14 +0800 Subject: [PATCH 1/3] [Clang][RISCV] Introduce tuple types for RVV bfloat16

[clang] Recommit "[Clang][RISCV] Introduce tuple types for RVV bfloat16 #72216" (PR #72370)

2023-11-15 Thread Yueh-Ting Chen via cfe-commits
https://github.com/eopXD updated https://github.com/llvm/llvm-project/pull/72370 >From 78e3ab20f5e527563b7645635b7147fdda8ba4b9 Mon Sep 17 00:00:00 2001 From: "Yueh-Ting (eop) Chen" Date: Wed, 15 Nov 2023 13:50:14 +0800 Subject: [PATCH 1/3] [Clang][RISCV] Introduce tuple types for RVV bfloat16

[clang] Recommit "[Clang][RISCV] Introduce tuple types for RVV bfloat16 #72216" (PR #72370)

2023-11-15 Thread Yueh-Ting Chen via cfe-commits
eopXD wrote: @antmox The test case failure should be resolved with the latest commit. Its not any indeterminate result detected by CI, just that I missed an update to the test case that is expecting deterministic TypeID. If CI passed, based on previous approval, should be good and safe to land

[clang] [coroutines] Introduce [[clang::coro_return_type]] and [[clang::coro_wrapper]] (PR #71945)

2023-11-15 Thread Utkarsh Saxena via cfe-commits
@@ -15811,6 +15813,32 @@ static void diagnoseImplicitlyRetainedSelf(Sema &S) { << FixItHint::CreateInsertion(P.first, "self->"); } +// Return whether FD is `promise_type::get_return_object`. +bool isGetReturnObject(FunctionDecl *FD) { + if (!FD->getDeclName().isIden

[clang-tools-extra] [clang-tidy] Add new modernize-string-find-startswith check (PR #72385)

2023-11-15 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank created https://github.com/llvm/llvm-project/pull/72385 Matchers are copied over from abseil-string-find-startswith, only the error message is different and suggests `std::{string|string_view}::starts_with` instead of the Abseil equivalent. >From 5e5a2bac0f7373e6b1

[clang-tools-extra] [clang-tidy] Add new modernize-string-find-startswith check (PR #72385)

2023-11-15 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 2060bfcdc7eb704647c64bf925cdceb94c1f535f 5e5a2bac0f7373e6b1830fddc609e97dc61df9d4 --

[clang-tools-extra] [llvm] [clang] Dont alter cold function alignment unless using Os (PR #72387)

2023-11-15 Thread Phil Camp via cfe-commits
https://github.com/FlameTop created https://github.com/llvm/llvm-project/pull/72387 This PR alters the behaviour of function alignment for functions marked as 'cold'. Currently functions marked with a ‘cold’ attribute are also set as optimize by size. Optimize by size alters the function align

[llvm] [clang] [clang-tools-extra] Dont alter cold function alignment unless using Os (PR #72387)

2023-11-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Phil Camp (FlameTop) Changes This PR alters the behaviour of function alignment for functions marked as 'cold'. Currently functions marked with a ‘cold’ attribute are also set as optimize by size. Optimize by size alters the function alig

[clang-tools-extra] [llvm] [clang] Dont alter cold function alignment unless using Os (PR #72387)

2023-11-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Phil Camp (FlameTop) Changes This PR alters the behaviour of function alignment for functions marked as 'cold'. Currently functions marked with a ‘cold’ attribute are also set as optimize by size. Optimize by size alters the functio

[llvm] [clang] [clang-tools-extra] Dont alter cold function alignment unless using Os (PR #72387)

2023-11-15 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 2060bfcdc7eb704647c64bf925cdceb94c1f535f effbfe02b71638fe49dfc09423663f9077c4cc41 --

[clang] [APINotes] Upstream APINotesManager (PR #72389)

2023-11-15 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan created https://github.com/llvm/llvm-project/pull/72389 This upstreams more of the Clang API Notes functionality that is currently implemented in the Apple fork: https://github.com/apple/llvm-project/tree/next/clang/lib/APINotes >From 2550d96acc9ce134b4f7359af0c75

[clang] [APINotes] Upstream APINotesManager (PR #72389)

2023-11-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Egor Zhdan (egorzhdan) Changes This upstreams more of the Clang API Notes functionality that is currently implemented in the Apple fork: https://github.com/apple/llvm-project/tree/next/clang/lib/APINotes --- Patch is 35.64 KiB, truncate

[PATCH] D144006: [DebugMetadata][DwarfDebug] Support function-local types in lexical block scopes (4/7)

2023-11-15 Thread Vladislav Dzhidzhoev via Phabricator via cfe-commits
dzhidzhoev added a comment. In D144006#4656728 , @jmorse wrote: > Hi, > > Just to note that we've been seeing LTO crashes as a result of > rG3b449bd46a11a > (now > reverted on trunk)

[PATCH] D158824: [RISCV][MC] MC layer support for xcvmem and xcvelw extensions

2023-11-15 Thread Liao Chunyu via Phabricator via cfe-commits
liaolucy updated this revision to Diff 558107. liaolucy added a comment. 1. use a custom parser to parse Register-Register load/store 2. Rebase Thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158824/new/ https://reviews.llvm.org/D158824 File

[mlir] [llvm] [clang] [llvm] Improve implementation of StringRef::find_last_of and cie (PR #71865)

2023-11-15 Thread via cfe-commits
@@ -274,6 +278,23 @@ StringRef::size_type StringRef::find_first_not_of(StringRef Chars, /// Note: O(size() + Chars.size()) StringRef::size_type StringRef::find_last_of(StringRef Chars, size_t From) const { +#ifdef __SSE2__ + if (Ch

[PATCH] D144006: [DebugMetadata][DwarfDebug] Support function-local types in lexical block scopes (4/7)

2023-11-15 Thread Vladislav Dzhidzhoev via Phabricator via cfe-commits
dzhidzhoev added a comment. In D144006#4656399 , @aeubanks wrote: > In D144006#4656383 , @dzhidzhoev > wrote: > >> In D144006#4656371 , @aeubanks >> wrote: >> >>> Is the

[clang] Recommit "[Clang][RISCV] Introduce tuple types for RVV bfloat16 #72216" (PR #72370)

2023-11-15 Thread antoine moynault via cfe-commits
antmox wrote: @eopXD tested successfully, no failure with this commit https://github.com/llvm/llvm-project/pull/72370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [flang] Add depdendent-lib option to flang -fc1 on Windows (PR #72121)

2023-11-15 Thread David Truby via cfe-commits
https://github.com/DavidTruby updated https://github.com/llvm/llvm-project/pull/72121 >From cfd46a8825aa34b3e513d898ceb57f4e48e78faf Mon Sep 17 00:00:00 2001 From: David Truby Date: Mon, 13 Nov 2023 14:48:44 + Subject: [PATCH 1/3] [flang] Add depdendent-lib option to flang -fc1 on Windows

[clang] [lldb] Reland "[clang][DebugInfo] Emit global variable definitions for static data members with constant initializers" (PR #71780)

2023-11-15 Thread via cfe-commits
zmodem wrote: We're seeing crashes after this. Here is a reproducer: https://bugs.chromium.org/p/chromium/issues/detail?id=1502489#c1 Please consider reverting if it can't be fixed quickly (I had a look, but it seems there are some dependent changes on top). https://github.com/llvm/llvm-proje

[clang] 33b5158 - Replace usage of StringRef::find_last_of with a string literal of size one by the equivalent char literal

2023-11-15 Thread via cfe-commits
Author: serge-sans-paille Date: 2023-11-15T15:01:36+01:00 New Revision: 33b51588c5d51995909f1f0be0b47b1708dac4fa URL: https://github.com/llvm/llvm-project/commit/33b51588c5d51995909f1f0be0b47b1708dac4fa DIFF: https://github.com/llvm/llvm-project/commit/33b51588c5d51995909f1f0be0b47b1708dac4fa.d

[flang] [clang] [clang-tools-extra] [llvm] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-15 Thread Yi Wu via cfe-commits
@@ -37,5 +75,19 @@ void FORTRAN_PROCEDURE_NAME(getarg)( (void)RTNAME(GetCommandArgument)( n, &value, nullptr, nullptr, __FILE__, __LINE__); } + +void FORTRAN_PROCEDURE_NAME(getlog)(std::int8_t *arg, std::int64_t length) { + std::array str; + int error = getlogin_r(str

[flang] [clang] [clang-tools-extra] [llvm] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-15 Thread Yi Wu via cfe-commits
@@ -13,6 +13,44 @@ #include "flang/Runtime/command.h" #include "flang/Runtime/descriptor.h" #include "flang/Runtime/io-api.h" +#include + +#ifdef _WIN32 +#define WIN32_LEAN_AND_MEAN +#define NOMINMAX +#include + +#include // UNLEN=256 +#include // wcstombs_s +#include // w

[flang] [clang] [clang-tools-extra] [llvm] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-15 Thread Yi Wu via cfe-commits
@@ -37,5 +75,19 @@ void FORTRAN_PROCEDURE_NAME(getarg)( (void)RTNAME(GetCommandArgument)( n, &value, nullptr, nullptr, __FILE__, __LINE__); } + +void FORTRAN_PROCEDURE_NAME(getlog)(std::int8_t *arg, std::int64_t length) { + std::array str; + int error = getlogin_r(str

[clang-tools-extra] [clang-tidy] Add new modernize-string-find-startswith check (PR #72385)

2023-11-15 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank updated https://github.com/llvm/llvm-project/pull/72385 >From 58e1392e140f0d5b932fce683a07fb799ef6b89f Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Wed, 15 Nov 2023 01:13:10 -0800 Subject: [PATCH] [clang-tidy] Add new modernize-string-find-startswith check

[clang] [llvm] [flang] [clang-tools-extra] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-15 Thread Yi Wu via cfe-commits
@@ -37,5 +75,19 @@ void FORTRAN_PROCEDURE_NAME(getarg)( (void)RTNAME(GetCommandArgument)( n, &value, nullptr, nullptr, __FILE__, __LINE__); } + +void FORTRAN_PROCEDURE_NAME(getlog)(std::int8_t *arg, std::int64_t length) { + std::array str; + int error = getlogin_r(str

[compiler-rt] [clang-tools-extra] [llvm] [flang] [clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-15 Thread via cfe-commits
https://github.com/smanna12 updated https://github.com/llvm/llvm-project/pull/70762 >From 93d46d40f46663cfa30fc01da965887508684e25 Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" Date: Mon, 30 Oct 2023 21:41:00 -0700 Subject: [PATCH 01/21] [clang] Add support for new loop attribute [[clang::code

[clang] [clang][Analyzer][NFC] Use condition type for comparison in several checkers (PR #72358)

2023-11-15 Thread Balázs Kéri via cfe-commits
https://github.com/balazske approved this pull request. https://github.com/llvm/llvm-project/pull/72358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [flang] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-15 Thread Yi Wu via cfe-commits
https://github.com/PAX-12-WU updated https://github.com/llvm/llvm-project/pull/70917 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 1/6] GETLOG runtime and extension implementation: get login username Ge

[clang] [llvm] [llvm][DebugInfo] DWARFv5: static data members declarations are DW_TAG_variable (PR #72234)

2023-11-15 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 commented: @adrian-prantl We do have a pretty strong guarantee of compatibility in the llvm-c API. A new parameter pretty much means you need to define a new function. https://github.com/llvm/llvm-project/pull/72234 ___ cfe-c

[clang-tools-extra] [clang-tidy] Add new modernize-string-find-startswith check (PR #72385)

2023-11-15 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank ready_for_review https://github.com/llvm/llvm-project/pull/72385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add new modernize-string-find-startswith check (PR #72385)

2023-11-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Nicolas van Kempen (nicovank) Changes Matchers are copied over from abseil-string-find-startswith, only the error message is different and suggests `std::{string|string_view}::starts_with` instead of the Abseil equivalent. --- Full

  1   2   3   4   5   6   >