[clang] [clang][dataflow] Retrieve members from accessors called using member… (PR #73978)

2023-12-01 Thread Yitzhak Mandelbaum via cfe-commits
@@ -300,9 +300,10 @@ static void insertIfFunction(const Decl &D, } static MemberExpr *getMemberForAccessor(const CXXMemberCallExpr &C) { - if (!C.getMethodDecl()) + const auto *MethodDecl = dyn_cast_or_null(C.getCalleeDecl()); ymand wrote: Please add a comm

[clang] [flang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-12-01 Thread Andrzej Warzyński via cfe-commits
banach-space wrote: > Since this patch, I can no longer build spec2006 gromacs and calculix because > they supply their own main function in a C file, then link using flang-new: > leading to another definition of `main()` from the runtime. Do I need to use > a special flag to avoid linking to

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

2023-12-01 Thread Nikita Popov via cfe-commits
@@ -16,11 +16,15 @@ define i32 @test_asr(i32 %a, i32 %b) { ; CHECK-NEXT:[[C:%.*]] = icmp slt i32 [[A]], 0 ; CHECK-NEXT:br i1 [[C]], label [[BB2:%.*]], label [[BB3:%.*]] ; CHECK: bb2: +; CHECK-NEXT:[[NOT:%.*]] = xor i32 [[A]], -1 +; CHECK-NEXT:[[D:%.*]] = l

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

2023-12-01 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,74 @@ +//===- DomConditionCache.cpp --===// +// +// 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: Apa

[clang] [llvm] [SME2] Add LUTI2 and LUTI4 quad Builtins and Intrinsics (PR #73317)

2023-12-01 Thread Matthew Devereau via cfe-commits
@@ -1859,6 +1867,34 @@ void AArch64DAGToDAGISel::SelectFrintFromVT(SDNode *N, unsigned NumVecs, SelectUnaryMultiIntrinsic(N, NumVecs, true, Opcode); } +template +void AArch64DAGToDAGISel::SelectMultiVectorLuti(SDNode *Node, +

[clang] [llvm] [SME2] Add LUTI2 and LUTI4 quad Builtins and Intrinsics (PR #73317)

2023-12-01 Thread Matthew Devereau via cfe-commits
@@ -1859,6 +1867,34 @@ void AArch64DAGToDAGISel::SelectFrintFromVT(SDNode *N, unsigned NumVecs, SelectUnaryMultiIntrinsic(N, NumVecs, true, Opcode); } +template MDevereau wrote: Done https://github.com/llvm/llvm-project/pull/73317 ___

[clang] [clang][ExtractAPI] Ensure LocationFileChecker doesn't try to traverse VFS when determining file path (PR #74071)

2023-12-01 Thread Tristan Labelle via cfe-commits
tristanlabelle wrote: @daniel-grumberg It's me. I'm looking at this https://github.com/llvm/llvm-project/pull/74071 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SME2] Add LUTI2 and LUTI4 quad Builtins and Intrinsics (PR #73317)

2023-12-01 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 076ec9f5f5bf03983f43f703e3f9d4600bad9653 5a18e55780467b2a07de60da0b6cc50933a5d2d1 --

[clang] [clang][ExtractAPI] Ensure LocationFileChecker doesn't try to traverse VFS when determining file path (PR #74071)

2023-12-01 Thread Daniel Grumberg via cfe-commits
daniel-grumberg wrote: Awesome! Let me know if you need any clarification as the semantic is now different from what it was originally and what it was after your patch. https://github.com/llvm/llvm-project/pull/74071 ___ cfe-commits mailing list cfe-c

[clang] [clang][ExtractAPI] Ensure LocationFileChecker doesn't try to traverse VFS when determining file path (PR #74071)

2023-12-01 Thread Tristan Labelle via cfe-commits
https://github.com/tristanlabelle approved this pull request. Looks good, thanks for catching this. https://github.com/llvm/llvm-project/pull/74071 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [clang][dataflow] Retrieve members from accessors called using member… (PR #73978)

2023-12-01 Thread Samira Bazuzi via cfe-commits
@@ -300,9 +300,10 @@ static void insertIfFunction(const Decl &D, } static MemberExpr *getMemberForAccessor(const CXXMemberCallExpr &C) { - if (!C.getMethodDecl()) + const auto *MethodDecl = dyn_cast_or_null(C.getCalleeDecl()); bazuzi wrote: Done https://gi

[clang] [clang][dataflow] Retrieve members from accessors called using member… (PR #73978)

2023-12-01 Thread Samira Bazuzi via cfe-commits
https://github.com/bazuzi updated https://github.com/llvm/llvm-project/pull/73978 >From aab1069636896c4a8289545ba01d2fdf4f1715c0 Mon Sep 17 00:00:00 2001 From: Samira Bazuzi Date: Thu, 30 Nov 2023 14:18:04 -0500 Subject: [PATCH 1/2] [clang][dataflow] Retrieve members from accessors called usin

[clang] [clang][dataflow] Retrieve members from accessors called using member… (PR #73978)

2023-12-01 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 ff485a0e77a55847cb50768b01c04fe45a6879ea 120bdd51496dd69c601181bccae072effb547920 --

[clang] [clang][dataflow] Retrieve members from accessors called using member… (PR #73978)

2023-12-01 Thread Samira Bazuzi via cfe-commits
https://github.com/bazuzi updated https://github.com/llvm/llvm-project/pull/73978 >From aab1069636896c4a8289545ba01d2fdf4f1715c0 Mon Sep 17 00:00:00 2001 From: Samira Bazuzi Date: Thu, 30 Nov 2023 14:18:04 -0500 Subject: [PATCH 1/3] [clang][dataflow] Retrieve members from accessors called usin

[clang] 14e9917 - [clang][ExtractAPI] Ensure LocationFileChecker doesn't try to traverse VFS when determining file path (#74071)

2023-12-01 Thread via cfe-commits
Author: Daniel Grumberg Date: 2023-12-01T15:54:36Z New Revision: 14e991740b5425680d49d75336132e793f1315e8 URL: https://github.com/llvm/llvm-project/commit/14e991740b5425680d49d75336132e793f1315e8 DIFF: https://github.com/llvm/llvm-project/commit/14e991740b5425680d49d75336132e793f1315e8.diff LO

[clang] [clang][ExtractAPI] Ensure LocationFileChecker doesn't try to traverse VFS when determining file path (PR #74071)

2023-12-01 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/74071 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Retrieve members from accessors called using member… (PR #73978)

2023-12-01 Thread Samira Bazuzi via cfe-commits
https://github.com/bazuzi updated https://github.com/llvm/llvm-project/pull/73978 >From aab1069636896c4a8289545ba01d2fdf4f1715c0 Mon Sep 17 00:00:00 2001 From: Samira Bazuzi Date: Thu, 30 Nov 2023 14:18:04 -0500 Subject: [PATCH 1/4] [clang][dataflow] Retrieve members from accessors called usin

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

2023-12-01 Thread Nikita Popov via cfe-commits
@@ -16,11 +16,15 @@ define i32 @test_asr(i32 %a, i32 %b) { ; CHECK-NEXT:[[C:%.*]] = icmp slt i32 [[A]], 0 ; CHECK-NEXT:br i1 [[C]], label [[BB2:%.*]], label [[BB3:%.*]] ; CHECK: bb2: +; CHECK-NEXT:[[NOT:%.*]] = xor i32 [[A]], -1 +; CHECK-NEXT:[[D:%.*]] = l

[clang] [clang-tools-extra] [llvm] [LLVM] Add IRNormalizer Pass (PR #68176)

2023-12-01 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,14 @@ +; RUN: opt -S -passes=normalize < %s | FileCheck %s + +define double @foo(double %a0, double %a1) { +entry: +; CHECK: %b +; CHECK: %d +; CHECK: %a +; CHECK: %c + %a = fmul double %a0, %a1 + %b = fmul double %a0, 2.00e+00 + %c = fmul double %a, 6.00e+00

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

2023-12-01 Thread Nikita Popov via cfe-commits
@@ -16,11 +16,15 @@ define i32 @test_asr(i32 %a, i32 %b) { ; CHECK-NEXT:[[C:%.*]] = icmp slt i32 [[A]], 0 ; CHECK-NEXT:br i1 [[C]], label [[BB2:%.*]], label [[BB3:%.*]] ; CHECK: bb2: +; CHECK-NEXT:[[NOT:%.*]] = xor i32 [[A]], -1 +; CHECK-NEXT:[[D:%.*]] = l

[clang] [llvm] [SME2] Add LUTI2 and LUTI4 quad Builtins and Intrinsics (PR #73317)

2023-12-01 Thread David Sherwood via cfe-commits
https://github.com/david-arm commented: This looks good to me, but I think it needs rebasing after https://github.com/llvm/llvm-project/pull/72849 landed. It also looks like @sdesmalen-arm left a comment about renaming ImmToTile - perhaps that could be done in this patch? https://github.com/l

[clang] [AArch64][SME2] Add _x2/_x4 svqrshr builtins. (PR #74100)

2023-12-01 Thread Dinar Temirbulatov via cfe-commits
https://github.com/dtemirbulatov created https://github.com/llvm/llvm-project/pull/74100 Patch by: Kerry McLaughlin >From 68fdadc7fc5c6541ac56cab0240d24df3f003eb0 Mon Sep 17 00:00:00 2001 From: Dinar Temirbulatov Date: Fri, 1 Dec 2023 16:27:42 + Subject: [PATCH] [AArch64][SME2] Add _x2/_x

[libcxx] [libunwind] [llvm] [libc++] Allow running the test suite with optimizations (PR #68753)

2023-12-01 Thread Louis Dionne via cfe-commits
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/68753 >From 5dc552a8231132f5ae780e1220961fe22309d49d Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Tue, 10 Oct 2023 16:35:11 -0700 Subject: [PATCH 1/4] [libc++] Allow running the test suite with optimizations This

[clang] [AArch64][SME2] Add _x2/_x4 svqrshr builtins. (PR #74100)

2023-12-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Dinar Temirbulatov (dtemirbulatov) Changes Patch by: Kerry McLaughlin --- Patch is 30.66 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/74100.diff 2 Files Affected:

[clang] [AArch64][SME] Warn when using a streaming builtin from a non-streaming function (PR #74064)

2023-12-01 Thread Sander de Smalen via cfe-commits
@@ -6,20 +6,20 @@ #include __attribute__((target("sme"))) -void test_sme(svbool_t pg, void *ptr) { +void test_sme(svbool_t pg, void *ptr) __arm_streaming { svld1_hor_za8(0, 0, pg, ptr); } __attribute__((target("arch=armv8-a+sme"))) -void test_arch_sme(svbool_t pg, void

[clang] [AArch64][SME] Warn when using a streaming builtin from a non-streaming function (PR #74064)

2023-12-01 Thread Sander de Smalen via cfe-commits
@@ -3023,6 +3151,66 @@ static void checkArmStreamingBuiltin(Sema &S, CallExpr *TheCall, << TheCall->getSourceRange() << "streaming compatible"; return; } + + if (FnType == ArmNonStreaming && BuiltinType == ArmStreaming) { +S.Diag(TheCall->getBeginLoc(), dia

[clang] [AArch64][SME] Warn when using a streaming builtin from a non-streaming function (PR #74064)

2023-12-01 Thread Sander de Smalen via cfe-commits
@@ -289,7 +283,7 @@ ARM_STREAMING_ATTR void test_svst1_ver_vnum_za64(uint32_t slice_base, svbool_t p // CHECK-CXX-NEXT:tail call void @llvm.aarch64.sme.st1q.vert( [[TMP0]], ptr [[TMP2]], i32 15, i32 [[SLICE_BASE]]) // CHECK-CXX-NEXT:ret void // -ARM_STREAMING_ATTR void

[clang] [AArch64][SME] Warn when using a streaming builtin from a non-streaming function (PR #74064)

2023-12-01 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm edited https://github.com/llvm/llvm-project/pull/74064 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64][SME2] Add _x2/_x4 svqrshr builtins. (PR #74100)

2023-12-01 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm edited https://github.com/llvm/llvm-project/pull/74100 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64][SME2] Add _x2/_x4 svqrshr builtins. (PR #74100)

2023-12-01 Thread Sander de Smalen via cfe-commits
@@ -2119,6 +2119,21 @@ let TargetGuard = "sme2" in { // 2-way and 4-way selects def SVSEL_X2 : SInst<"svsel[_{d}_x2]", "2}22", "cUcsUsiUilUlbhfd", MergeNone, "aarch64_sve_sel_x2", [IsStreaming], []>; def SVSEL_X4 : SInst<"svsel[_{d}_x4]", "4}44", "cUcsUsiUilUlbhfd", M

[clang] [AArch64][SME2] Add _x2/_x4 svqrshr builtins. (PR #74100)

2023-12-01 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm requested changes to this pull request. https://github.com/llvm/llvm-project/pull/74100 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P2308R1 - Template Parameter Initialization. (PR #73103)

2023-12-01 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/73103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64][SME2] Add _x2/_x4 svqrshr builtins. (PR #74100)

2023-12-01 Thread Kerry McLaughlin via cfe-commits
@@ -2119,6 +2119,21 @@ let TargetGuard = "sme2" in { // 2-way and 4-way selects def SVSEL_X2 : SInst<"svsel[_{d}_x2]", "2}22", "cUcsUsiUilUlbhfd", MergeNone, "aarch64_sve_sel_x2", [IsStreaming], []>; def SVSEL_X4 : SInst<"svsel[_{d}_x4]", "4}44", "cUcsUsiUilUlbhfd", M

[clang-tools-extra] [clang] [llvm] Report pass name when -llvm-verify-each reports breakage (PR #71447)

2023-12-01 Thread via cfe-commits
https://github.com/chrulski-intel updated https://github.com/llvm/llvm-project/pull/71447 >From c7a15dcfed077f95470eaa5781a24d54fd3c Mon Sep 17 00:00:00 2001 From: chrulski-intel Date: Mon, 6 Nov 2023 09:39:33 -0800 Subject: [PATCH 1/3] Report pass name when -llvm-verify-each reports breaka

[clang] [flang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-12-01 Thread Tom Eccles via cfe-commits
tblah wrote: Yes they are mixed source projects. They worked previously because the main function from `Frotran_main` was silently ignored. I don't know if this was accidental or not, but it tended to do the right thing for mixed source projects because if the user intended to use `Fortran_mai

[clang] f40d251 - [Clang] Implement P2308R1 - Template Parameter Initialization. (#73103)

2023-12-01 Thread via cfe-commits
Author: cor3ntin Date: 2023-12-01T17:44:22+01:00 New Revision: f40d25151c25e257f3ebd2696e0bf133fe2a30ff URL: https://github.com/llvm/llvm-project/commit/f40d25151c25e257f3ebd2696e0bf133fe2a30ff DIFF: https://github.com/llvm/llvm-project/commit/f40d25151c25e257f3ebd2696e0bf133fe2a30ff.diff LOG:

[clang] [Clang] Implement P2308R1 - Template Parameter Initialization. (PR #73103)

2023-12-01 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/73103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenMP] Bug #69214 fix (PR #73861)

2023-12-01 Thread via cfe-commits
https://github.com/lwshanbd updated https://github.com/llvm/llvm-project/pull/73861 >From 9eb00076c22197f223649b420994176a170a2671 Mon Sep 17 00:00:00 2001 From: Baodi Shan Date: Wed, 29 Nov 2023 16:26:33 -0500 Subject: [PATCH 1/2] [Clang][OpenMP] Bug #69214 fix --- clang/lib/CodeGen/CGStmtOp

[llvm] [compiler-rt] [clang] [clang-tools-extra] [mlir] [clang] Fix a bug with qualified name lookup into current instantiation (PR #73018)

2023-12-01 Thread via cfe-commits
john-brawn-arm wrote: I'm not completely sure if we should be giving an error for the example I gave above. Looking through the C++20 standard I see temp.res paragraph 2: > A name used in a template declaration or definition and that is dependent on > a template-parameter is assumed not to nam

[clang] [Clang][OpenMP] Bug #69214 fix (PR #73861)

2023-12-01 Thread via cfe-commits
https://github.com/lwshanbd updated https://github.com/llvm/llvm-project/pull/73861 >From 8396dd8a1343451f786a2391df864636925eb11a Mon Sep 17 00:00:00 2001 From: Baodi Shan Date: Fri, 1 Dec 2023 11:57:47 -0500 Subject: [PATCH] Update test --- clang/lib/CodeGen/CGStmtOpenMP.cpp| 2

[clang] [Clang][OpenMP] Bug #69214 fix (PR #73861)

2023-12-01 Thread via cfe-commits
https://github.com/lwshanbd closed https://github.com/llvm/llvm-project/pull/73861 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Bug fix #69214 (PR #74105)

2023-12-01 Thread via cfe-commits
https://github.com/lwshanbd created https://github.com/llvm/llvm-project/pull/74105 Fix https://github.com/llvm/llvm-project/issues/69214. In emitOMPSimdRegion, the EmitOMPPrivateLoopCounters should be after EmitOMPPrivateClause. >From 8396dd8a1343451f786a2391df864636925eb11a Mon Sep 17 00:00:

[clang] [flang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-12-01 Thread Tom Eccles via cfe-commits
tblah wrote: Simple reproducer: main.c ``` int main(void) { // call fortran code return 0; } ``` fortran.f90 ``` function pow(a, b) real :: a, b, pow pow = a ** b end function ``` ``` clang -c main.c -o main.o flang-now -c fortran.f90 -o fortran.o flang-new fortran.o main.o -o out ```

[clang] ea4eb69 - [Flang][Clang] Add support for frame pointers in Flang

2023-12-01 Thread Tom Eccles via cfe-commits
Author: Radu Salavat Date: 2023-12-01T17:09:59Z New Revision: ea4eb691f4955e3b784ebf9bc94a47186838c6f2 URL: https://github.com/llvm/llvm-project/commit/ea4eb691f4955e3b784ebf9bc94a47186838c6f2 DIFF: https://github.com/llvm/llvm-project/commit/ea4eb691f4955e3b784ebf9bc94a47186838c6f2.diff LOG:

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

2023-12-01 Thread Tom Eccles via cfe-commits
tblah wrote: Merged manually https://github.com/llvm/llvm-project/commit/ea4eb691f4955e3b784ebf9bc94a47186838c6f2 https://github.com/llvm/llvm-project/pull/72146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

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

2023-12-01 Thread Tom Eccles via cfe-commits
https://github.com/tblah closed https://github.com/llvm/llvm-project/pull/72146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix crash when declaring invalid lambda member (PR #74110)

2023-12-01 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/74110 I've come across this while working on implementing lambdas in C++03. >From 563f86bddc0ec59b63c6aeffee2342f027c09119 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 1 Dec 2023 18:16:36 +0100 Subjec

[llvm] [clang-tools-extra] [clang] [Clang] Fix linker error for function multiversioning (PR #71706)

2023-12-01 Thread via cfe-commits
https://github.com/elizabethandrews updated https://github.com/llvm/llvm-project/pull/71706 >From 534fad70af45a6a22ba2d03f474089e896f4fcd6 Mon Sep 17 00:00:00 2001 From: Elizabeth Andrews Date: Thu, 26 Oct 2023 08:53:54 -0700 Subject: [PATCH 1/3] [Clang] Fix linker error for function multivers

[clang] [clang] Fix crash when declaring invalid lambda member (PR #74110)

2023-12-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nikolas Klauser (philnik777) Changes I've come across this while working on implementing lambdas in C++03. --- Full diff: https://github.com/llvm/llvm-project/pull/74110.diff 2 Files Affected: - (modified) clang/lib/AST/DeclCXX.cpp (+3

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-12-01 Thread Andrzej Warzyński via cfe-commits
banach-space wrote: > @DavidTruby suggested only linking Fortran_main if the fortran source > contains a program statement. That would be ideal, but how is the driver meant to know that? ;-) > One could build a mixed source project now by linking using clang and > manually specifying to link

[clang-tools-extra] [llvm] [clang] [Clang] Fix linker error for function multiversioning (PR #71706)

2023-12-01 Thread via cfe-commits
elizabethandrews wrote: > > I requested some minor changes. > > Can we document the `.ifunc` symbols as a deprecated feature? With this > > change, they will never be referenced except by code compiled by older > > compiler versions. Maybe plan to deprecate them a year from now? > > How/where

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-12-01 Thread Michael Klemm via cfe-commits
mjklemm wrote: gfortran and also ifort should fail for codes that have both a program unit and a makn() function coming from C. These compilers have a main() function that calls into the Fortran program unit and link that via an object file. Id be interested to see the link line for these c

[clang-tools-extra] [llvm] [clang] [Clang] Fix linker error for function multiversioning (PR #71706)

2023-12-01 Thread via cfe-commits
elizabethandrews wrote: Hmm the build fails with: ⚠️ Warning: Checkout failed! checking out commit "af600cbf98ce1bf55c51ef88ddf94cd9114181c2": exit status 128 (Attempt 3/3) 🚨 Error: checking out commit "af600cbf98ce1bf55c51ef88ddf94cd9114181c2": exit status 128 Would anyone happen to know

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-12-01 Thread Michael Klemm via cfe-commits
mjklemm wrote: Here's the reproducer on my system: ``` [2023-12-01 18:36:31 CET] iris ~/tm*/fo*/ftn_main_dupes [0:0] (main *=)> gfortran -o ftn.o -c ftn.f90 && gcc -o prg.o -c prg.c && gfortran -o ./bla ftn.o prg.o /usr/bin/ld: prg.o: in function `main': prg.c:(.text+0x0): multiple definition

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-12-01 Thread Tom Eccles via cfe-commits
tblah wrote: That example is quite different because you used `program` in the fortran source. The use case here is applications which implement `main` in C then call into fortran code https://github.com/llvm/llvm-project/pull/73124 ___ cfe-commits m

[clang] [flang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-12-01 Thread Michael Klemm via cfe-commits
mjklemm wrote: Ok, got it! I'm fione with reverting this patch and seeking a better solution. https://github.com/llvm/llvm-project/pull/73124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [clang][CodeGen] Emit atomic IR instead of libcalls for misaligned po… (PR #73176)

2023-12-01 Thread via cfe-commits
https://github.com/Logikable updated https://github.com/llvm/llvm-project/pull/73176 >From 5d4b6cac10d84bf8bf76d50730fdd5ef65261076 Mon Sep 17 00:00:00 2001 From: Sean Luchen Date: Fri, 17 Nov 2023 17:29:52 + Subject: [PATCH] [clang][CodeGen] Emit atomic IR instead of libcalls for misalign

[clang] Bug fix #69214 (PR #74105)

2023-12-01 Thread via cfe-commits
https://github.com/lwshanbd updated https://github.com/llvm/llvm-project/pull/74105 >From 8396dd8a1343451f786a2391df864636925eb11a Mon Sep 17 00:00:00 2001 From: Baodi Shan Date: Fri, 1 Dec 2023 11:57:47 -0500 Subject: [PATCH 1/2] Update test --- clang/lib/CodeGen/CGStmtOpenMP.cpp

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-12-01 Thread Michael Klemm via cfe-commits
mjklemm wrote: > That example is different because you used `program` in the fortran source. > The use case here is applications which implement `main` in C then call into > fortran code Do you have a link line for ifort? It seems that your example fails with ifort, but indeed works with gfo

[flang] [clang] Revert "[flang][Driver] Let the linker fail on multiple definitions of main()" (PR #74120)

2023-12-01 Thread Tom Eccles via cfe-commits
https://github.com/tblah created https://github.com/llvm/llvm-project/pull/74120 Reverts llvm/llvm-project#73124 This caused a regression building programs which implement `main()` in C and then call into some Fortran code, and which link using `flang-new`. reproducer: main.c ``` int main(void

[flang] [clang] Revert "[flang][Driver] Let the linker fail on multiple definitions of main()" (PR #74120)

2023-12-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-driver @llvm/pr-subscribers-clang-driver Author: Tom Eccles (tblah) Changes Reverts llvm/llvm-project#73124 This caused a regression building programs which implement `main()` in C and then call into some Fortran code, and which link using `flang

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-12-01 Thread Tom Eccles via cfe-commits
tblah wrote: > > That example is different because you used `program` in the fortran source. > > The use case here is applications which implement `main` in C then call > > into fortran code > > Do you have a link line for ifort? It seems that your example fails with > ifort, but indeed works

[clang] [Driver] Support -mcmodel= for LoongArch (PR #72514)

2023-12-01 Thread Fangrui Song via cfe-commits
MaskRay wrote: LGTM https://github.com/llvm/llvm-project/pull/72514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] Revert "[flang][Driver] Let the linker fail on multiple definitions of main()" (PR #74120)

2023-12-01 Thread Michael Klemm via cfe-commits
mjklemm wrote: The above fails with ifort/ifx: ``` [2023-12-01 19:00:56 CET] iris ~/tm*/fo*/ftn_main_dupes [0:0] (main *=)> cat > ftn.f90 function pow(a, b) real :: a, b, pow pow = a ** b end function [2023-12-01 19:01:03 CET] iris ~/tm*/fo*/ftn_main_dupes [0:0] (main *=)> !if [2023-12-01 1

[flang] [clang] Revert "[flang][Driver] Let the linker fail on multiple definitions of main()" (PR #74120)

2023-12-01 Thread Tom Eccles via cfe-commits
tblah wrote: For what it's worth, `armflang` follows gfortran's behavior. As there isn't consensus amongst fortran compilers, I'm unsure which behavior we should follow. What do other's think? https://github.com/llvm/llvm-project/pull/74120 ___ cfe-c

[clang] [flang] Revert "[flang][Driver] Let the linker fail on multiple definitions of main()" (PR #74120)

2023-12-01 Thread Michael Klemm via cfe-commits
mjklemm wrote: > For what it's worth, `armflang` follows gfortran's behavior. So does the "old legacy flang", which I guess is the basis for armflang. AOCC's flang shows the same behavior. > As there isn't consensus amongst fortran compilers, I'm unsure which behavior > we should follow. Wh

[clang] [flang] Revert "[flang][Driver] Let the linker fail on multiple definitions of main()" (PR #74120)

2023-12-01 Thread Michael Klemm via cfe-commits
mjklemm wrote: BTW, flang legacy has this: ` -fno-fortran-main Don't link in Fortran main` Adding that command line option might be the right choice. If everyone agrees, I can see if I can get this added. https://github.com/llvm/llvm-project/pull/74120 ___

[clang] [flang] Revert "[flang][Driver] Let the linker fail on multiple definitions of main()" (PR #74120)

2023-12-01 Thread Tom Eccles via cfe-commits
tblah wrote: > Could you please see if `-Wl,--allow-multiple-definition` would help to > resolve the issue in the application? Surprisingly not. ``` ld.lld: error: undefined symbol: _QQEnvironmentDefaults >>> referenced by Fortran_main.c >>> Fortran_main.c.o:(.text.main+0x8) in a

[llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-01 Thread Teresa Johnson via cfe-commits
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject &GO, GlobalValue::LinkageTypes Linkage, StringRef FileName) { SmallString<64> Name; - if (llvm::GlobalValue::isLocalLinkage(Linkage)) { -Name.appen

[clang] Bug fix #69214 (PR #74105)

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

[clang] Bug fix #69214 (PR #74105)

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

[llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-01 Thread Teresa Johnson via cfe-commits
@@ -246,11 +246,27 @@ std::string InstrProfError::message() const { char InstrProfError::ID = 0; -std::string getPGOFuncName(StringRef RawFuncName, - GlobalValue::LinkageTypes Linkage, +std::string getPGOFuncName(StringRef Name, GlobalValue::LinkageT

[clang] Bug fix #69214 (PR #74105)

2023-12-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Baodi (lwshanbd) Changes Fix #69214 In `emitOMPSimdRegion`, the `EmitOMPPrivateLoopCounters` should be after `EmitOMPPrivateClause`. --- Patch is 266.43 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/l

[clang] Bug fix #69214 (PR #74105)

2023-12-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Baodi (lwshanbd) Changes Fix #69214 In `emitOMPSimdRegion`, the `EmitOMPPrivateLoopCounters` should be after `EmitOMPPrivateClause`. --- Patch is 266.41 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-proj

[clang] [Clang][OpenMP]Bug fix #69214 (PR #74105)

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

[clang] [Clang][OpenMP] Bug fix #69214 (PR #74105)

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

[clang] [clang-tools-extra] [llvm] Report pass name when -llvm-verify-each reports breakage (PR #71447)

2023-12-01 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: thanks! https://github.com/llvm/llvm-project/pull/71447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang-tools-extra] Report pass name when -llvm-verify-each reports breakage (PR #71447)

2023-12-01 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks closed https://github.com/llvm/llvm-project/pull/71447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-01 Thread Ellis Hoag via cfe-commits
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject &GO, GlobalValue::LinkageTypes Linkage, StringRef FileName) { SmallString<64> Name; - if (llvm::GlobalValue::isLocalLinkage(Linkage)) { -Name.appen

[llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-01 Thread Ellis Hoag via cfe-commits
@@ -246,11 +246,27 @@ std::string InstrProfError::message() const { char InstrProfError::ID = 0; -std::string getPGOFuncName(StringRef RawFuncName, - GlobalValue::LinkageTypes Linkage, +std::string getPGOFuncName(StringRef Name, GlobalValue::LinkageT

[clang] [CUDA] work around more __noinline__ conflicts with libc++ (PR #74123)

2023-12-01 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B created https://github.com/llvm/llvm-project/pull/74123 https://github.com/llvm/llvm-project/pull/73838 >From 71e24fc704c82c11162313613691d09b9a653bd5 Mon Sep 17 00:00:00 2001 From: Artem Belevich Date: Fri, 1 Dec 2023 10:37:08 -0800 Subject: [PATCH] [CUDA] work arou

[clang] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-01 Thread Teresa Johnson via cfe-commits
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject &GO, GlobalValue::LinkageTypes Linkage, StringRef FileName) { SmallString<64> Name; - if (llvm::GlobalValue::isLocalLinkage(Linkage)) { -Name.appen

[clang] [CUDA] work around more __noinline__ conflicts with libc++ (PR #74123)

2023-12-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Artem Belevich (Artem-B) Changes https://github.com/llvm/llvm-project/pull/73838 --- Full diff: https://github.com/llvm/llvm-project/pull/74123.diff 3 Files Affected: - (modified) clang/lib/Headers/CMakeLists.txt (+2) - (added) clang/l

[clang] [Clang][OpenMP] Fix private variables registration (PR #74105)

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

[clang] [Clang][OpenMP] Fix private variables registration (PR #74105)

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

[clang] [Clang][OpenMP] Fix private variables registration in `simd` (PR #74105)

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

[clang] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-01 Thread Mingming Liu via cfe-commits
@@ -246,11 +246,27 @@ std::string InstrProfError::message() const { char InstrProfError::ID = 0; -std::string getPGOFuncName(StringRef RawFuncName, - GlobalValue::LinkageTypes Linkage, +std::string getPGOFuncName(StringRef Name, GlobalValue::LinkageT

[clang-tools-extra] [llvm] [clang] Report pass name when -llvm-verify-each reports breakage (PR #71447)

2023-12-01 Thread via cfe-commits
chrulski-intel wrote: @aeubanks Thanks for merging this. https://github.com/llvm/llvm-project/pull/71447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [clang-tools-extra] [clang] [llvm] [flang] [bpi] Reuse the AsmWriter's BB naming scheme (PR #73593)

2023-12-01 Thread Mircea Trofin via cfe-commits
mtrofin wrote: > I'm not an expert on branch-probability facilities, but the test changes look > highly valuable, > > It seems awkward to add an extra flag to the block-printer, as it introduces > a number of conditionals -- would it be possible to refactor as a dedicated > `printBlockName` m

[clang] [Clang][OpenMP] Fix private variables registration in `simd` (PR #74105)

2023-12-01 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG https://github.com/llvm/llvm-project/pull/74105 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-01 Thread Teresa Johnson via cfe-commits
@@ -246,11 +246,27 @@ std::string InstrProfError::message() const { char InstrProfError::ID = 0; -std::string getPGOFuncName(StringRef RawFuncName, - GlobalValue::LinkageTypes Linkage, +std::string getPGOFuncName(StringRef Name, GlobalValue::LinkageT

[llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-01 Thread Mingming Liu via cfe-commits
@@ -246,11 +246,27 @@ std::string InstrProfError::message() const { char InstrProfError::ID = 0; -std::string getPGOFuncName(StringRef RawFuncName, - GlobalValue::LinkageTypes Linkage, +std::string getPGOFuncName(StringRef Name, GlobalValue::LinkageT

[clang] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-01 Thread Teresa Johnson via cfe-commits
@@ -246,11 +246,27 @@ std::string InstrProfError::message() const { char InstrProfError::ID = 0; -std::string getPGOFuncName(StringRef RawFuncName, - GlobalValue::LinkageTypes Linkage, +std::string getPGOFuncName(StringRef Name, GlobalValue::LinkageT

[lld] [llvm] [clang] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used … (PR #74128)

2023-12-01 Thread Rahman Lavaee via cfe-commits
https://github.com/rlavaee created https://github.com/llvm/llvm-project/pull/74128 …together by decoupling the handling of the two features. Today `-split-machine-functions` (MFS) and `-fbasic-block-sections={all,list}` cannot be combined with `-basic-block-sections=labels` (the labels option

[clang] e817966 - [RISCV] Collapse fast unaligned access into a single feature [nfc-ish] (#73971)

2023-12-01 Thread via cfe-commits
Author: Philip Reames Date: 2023-12-01T11:00:59-08:00 New Revision: e81796671890b59c110f8e41adc7ca26f8484d20 URL: https://github.com/llvm/llvm-project/commit/e81796671890b59c110f8e41adc7ca26f8484d20 DIFF: https://github.com/llvm/llvm-project/commit/e81796671890b59c110f8e41adc7ca26f8484d20.diff

[llvm] [lld] [clang] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used … (PR #74128)

2023-12-01 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 ca2d79f9cad48b7165bf81a7cc24b67f277915f1 3f82059172f7e9020ff14e41063208c6d67b7cce --

[llvm] [clang] [RISCV] Collapse fast unaligned access into a single feature [nfc-ish] (PR #73971)

2023-12-01 Thread Philip Reames via cfe-commits
https://github.com/preames closed https://github.com/llvm/llvm-project/pull/73971 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Stub out gcc_struct attribute (PR #71148)

2023-12-01 Thread John McCall via cfe-commits
rjmccall wrote: It sounds like we're talking about extending the behavior of these attributes, and I'd like to make sure that whatever we do here is acceptable to GCC. That is, if we're going to start accepting these attributes on new targets which GCC doesn't currently support, we should mak

[clang] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-01 Thread Ellis Hoag via cfe-commits
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject &GO, GlobalValue::LinkageTypes Linkage, StringRef FileName) { SmallString<64> Name; - if (llvm::GlobalValue::isLocalLinkage(Linkage)) { -Name.appen

[clang] [CUDA] work around more __noinline__ conflicts with libc++ (PR #74123)

2023-12-01 Thread Dmitri Gribenko via cfe-commits
gribozavr wrote: I don't mind this, but should libc++ start using `_LIBCPP_NOINLINE`, we would be playing a catch-up game here. https://github.com/llvm/llvm-project/pull/74123 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

<    1   2   3   4   >