[clang] 23c47eb - [Driver] Enable __float128 support on X86 on FreeBSD / NetBSD (#72788)

2023-11-19 Thread via cfe-commits
Author: Brad Smith Date: 2023-11-19T03:00:05-05:00 New Revision: 23c47eba879769a29772c999be2991201c2fe399 URL: https://github.com/llvm/llvm-project/commit/23c47eba879769a29772c999be2991201c2fe399 DIFF: https://github.com/llvm/llvm-project/commit/23c47eba879769a29772c999be2991201c2fe399.diff LO

[clang] [Driver] Enable __float128 support on X86 on FreeBSD / NetBSD (PR #72788)

2023-11-19 Thread Brad Smith via cfe-commits
https://github.com/brad0 closed https://github.com/llvm/llvm-project/pull/72788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D135171: FreeBSD: enable __float128 on x86 and powerpc64le

2023-11-19 Thread Brad Smith via Phabricator via cfe-commits
brad added a comment. You can close this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135171/new/ https://reviews.llvm.org/D135171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[PATCH] D86855: Convert __m64 intrinsics to unconditionally use SSE2 instead of MMX instructions.

2023-11-19 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. Reverse ping. Any progress or plan for this patch? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86855/new/ https://reviews.llvm.org/D86855 ___ cfe-commits mailing list cfe-commi

[clang] [NFC][Clang] Refactor code to calculate flexible array member size (PR #72790)

2023-11-19 Thread Bill Wendling via cfe-commits
https://github.com/bwendling created https://github.com/llvm/llvm-project/pull/72790 The code that calculates the flexible array member size is big enough to warrant its own method. >From fcea607665cdbae3e98f08288b165c2c1af24f95 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Sun, 19 Nov 2

[clang] [NFC][Clang] Refactor code to calculate flexible array member size (PR #72790)

2023-11-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Bill Wendling (bwendling) Changes The code that calculates the flexible array member size is big enough to warrant its own method. --- Full diff: https://github.com/llvm/llvm-project/pull/72790.diff 2 Files Affected: - (modified) clang

[clang] [NFC][Clang] Refactor code to calculate flexible array member size (PR #72790)

2023-11-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Bill Wendling (bwendling) Changes The code that calculates the flexible array member size is big enough to warrant its own method. --- Full diff: https://github.com/llvm/llvm-project/pull/72790.diff 2 Files Affected: - (modifie

[clang] [NFC][Clang] Refactor code to calculate flexible array member size (PR #72790)

2023-11-19 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 42204c94ba9fcb0b4b1335e648ce140a3eef8a9d fcea607665cdbae3e98f08288b165c2c1af24f95 --

[clang] [clang-format] Fix a bug in aligning comments above PPDirective (PR #72791)

2023-11-19 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/72791 Fixed #72785. >From 0aadd3c1e458f1137c4d45bc14dfae7db9b0446f Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 19 Nov 2023 03:41:58 -0800 Subject: [PATCH] [clang-format] Fix a bug in aligning comments above PPD

[clang] [clang-format] Fix a bug in aligning comments above PPDirective (PR #72791)

2023-11-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixed #72785. --- Full diff: https://github.com/llvm/llvm-project/pull/72791.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+2-2) - (modified) clang/unittests/Format/FormatTest

[clang] [flang] [flang] Add runtimes using --dependent-lib on MSVC targets (PR #72519)

2023-11-19 Thread Andrzej Warzyński via cfe-commits
banach-space wrote: Could you add some comments to clarify the difference between: * "msvc-dependent-lib-flags.f90", and * "linker-flags.f90" https://github.com/llvm/llvm-project/pull/72519 ___ cfe-commits mailing li

[flang] [clang] [flang] Add runtimes using --dependent-lib on MSVC targets (PR #72519)

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

[flang] [clang] [flang] Add runtimes using --dependent-lib on MSVC targets (PR #72519)

2023-11-19 Thread Andrzej Warzyński via cfe-commits
@@ -977,47 +977,10 @@ bool tools::addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC, return true; } -void tools::addFortranRuntimeLibs(const ToolChain &TC, const ArgList &Args, +void tools::addFortranRuntimeLibs(const ToolChain &TC,

[clang] [flang] [flang] Add runtimes using --dependent-lib on MSVC targets (PR #72519)

2023-11-19 Thread Andrzej Warzyński via cfe-commits
@@ -0,0 +1,36 @@ +! RUN: %flang -### --target=aarch64-windows-msvc -fuse-ld= %S/Inputs/hello.f90 -v 2>&1 | FileCheck %s --check-prefixes=MSVC banach-space wrote: Could you remind the rationale behind an empty `-fuse-ld=`? https://github.com/llvm/llvm-project/pu

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

2023-11-19 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. I see that you added [frame-pointer-codegen.f90](https://github.com/llvm/llvm-project/pull/72146/files#diff-76ca50365c8a0eb4797ce10b121021e7da52cc86523d806e1ade530a897de7e8), but

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

2023-11-19 Thread Andrzej Warzyński via cfe-commits
@@ -960,7 +1099,7 @@ bool tools::addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC, CmdArgs.push_back("-Bdynamic"); if (RTKind == Driver::OMPRT_GOMP && GompNeedsRT) - CmdArgs.push_back("-lrt"); +CmdArgs.push_back("-lrt"); banach-spac

[clang] [flang] [Flang] Add code-object-version option (PR #72638)

2023-11-19 Thread Andrzej Warzyński via cfe-commits
@@ -264,6 +263,37 @@ static void addDepdendentLibs(mlir::ModuleOp &mlirModule, } } +// Add to MLIR code target specific items which are dependent on target +// configuration specified by the user +static void addTargetSpecificMLIRItems(mlir::ModuleOp &mlirModule, +

[flang] [clang] [Flang] Add code-object-version option (PR #72638)

2023-11-19 Thread Andrzej Warzyński via cfe-commits
@@ -85,6 +85,19 @@ class CodeGenOptions : public CodeGenOptionsBase { RK_WithPattern, // Remark pattern specified via '-Rgroup=regexp'. }; + /// \brief Enumeration value for AMDGPU code object version, which is the + /// code object version times 100. + enum class Cod

[flang] [clang] [Flang] Add code-object-version option (PR #72638)

2023-11-19 Thread Andrzej Warzyński via cfe-commits
@@ -264,6 +263,37 @@ static void addDepdendentLibs(mlir::ModuleOp &mlirModule, } } +// Add to MLIR code target specific items which are dependent on target +// configuration specified by the user +static void addTargetSpecificMLIRItems(mlir::ModuleOp &mlirModule, +

[flang] [clang] [Flang] Add code-object-version option (PR #72638)

2023-11-19 Thread Andrzej Warzyński via cfe-commits
banach-space wrote: All test files in this PR use hyphen (`-`) rather than underscore (`_`) ;-) https://github.com/llvm/llvm-project/pull/72638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[libcxx] [clang-tools-extra] [flang] [libc] [llvm] [compiler-rt] [clang] [C23] Complete support for WG14 N2508 (PR #71398)

2023-11-19 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/71398 >From 1d54a5cc6b34aca0e34ab57d7ee62815707d9153 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Mon, 6 Nov 2023 08:54:40 -0500 Subject: [PATCH 1/4] [C23] Complete support for WG14 N2508 In Clang 16, we im

[PATCH] D153701: [Clang] Implement P2718R0 "Lifetime extension in range-based for loops"

2023-11-19 Thread Yurong via Phabricator via cfe-commits
yronglin added a comment. In D153701#4656920 , @Endill wrote: > @yronglin We are sorry it takes so much time to get feedback. Richard and > Hubert have little bandwidth for reviews. Others, including me, don't feel > qualified to provide good feedback.

[clang] [clang-tools-extra] [clang] Turn invented Exprs' source locations in __builtin_dump_struct to empty (PR #72750)

2023-11-19 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > The CI run shows the test > [Sema/builtin-dump-struct.c](https://searchfox.org/llvm/source/clang/test/Sema/builtin-dump-struct.c) > is failing. Oops, I didn't even realize there's such a test for C. I had only run the Sema/builtin-dump-struct.cpp locally and it passed. :( >

[clang-tools-extra] [clang] [clang] Turn invented Exprs' source locations in __builtin_dump_struct to empty (PR #72750)

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

[flang] [clang] [Flang] Add code-object-version option (PR #72638)

2023-11-19 Thread Kiran Chandramohan via cfe-commits
@@ -85,6 +85,19 @@ class CodeGenOptions : public CodeGenOptionsBase { RK_WithPattern, // Remark pattern specified via '-Rgroup=regexp'. }; + /// \brief Enumeration value for AMDGPU code object version, which is the + /// code object version times 100. + enum class Cod

[clang] [CUDA][HIP] make trivial ctor/dtor host device (PR #72394)

2023-11-19 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > We've found a problem with the patch. https://godbolt.org/z/jcKo34vzG > > ``` > template > class C { > explicit C() {}; > }; > > template <> C::C() {}; > ``` > > ``` > :6:21: error: __host__ function 'C' cannot overload __host__ > __device__ function 'C' > 6 | templ

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

2023-11-19 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 __builtin_dump_st

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

2023-11-19 Thread Younan Zhang via cfe-commits
@@ -713,6 +713,11 @@ static ExprResult SemaBuiltinDumpStruct(Sema &S, CallExpr *TheCall) { return ExprError(); } const RecordDecl *RD = PtrArgType->getPointeeType()->getAsRecordDecl(); + if (!RD->isCompleteDefinition()) { zyn0217 wrote: Thank you! Ad

[clang-tools-extra] [clangd] Don't show inlay hints for __builtin_dump_struct (PR #71366)

2023-11-19 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/71366 >From 808c141c34218dd542b00149216adc061567dd31 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Mon, 6 Nov 2023 16:50:02 +0800 Subject: [PATCH 1/4] [clangd] Don't show inlay hints for PseudoObjectExprs in C++

[clang-tools-extra] [clangd] Don't show inlay hints for __builtin_dump_struct (PR #71366)

2023-11-19 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Since the other PR turned out to be infeasible, I'm overriding `TraversePseudoObjectExpr` now. https://github.com/llvm/llvm-project/pull/71366 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [clang-format] Correctly annotate braces of empty functions (PR #72733)

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

[clang] [clang-format] Fix a bug in isStartOfName() on macro definitions (PR #72768)

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

[clang] [clang-format] Fix a bug in aligning comments above PPDirective (PR #72791)

2023-11-19 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/72791 ___ 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 modernize-use-std-numbers (PR #66583)

2023-11-19 Thread Julian Schmidt via cfe-commits
5chmidti wrote: @PiotrZSL I have implemented the changes you have requested, but because of #72536, I am not going to push those changes yet, unless you prefer it if I do. I might take a look into fixing this issue. I came across this when I checked what would happen when the big templated fun

[clang] [clang-format] Option to ignore macro definitions (PR #70338)

2023-11-19 Thread Björn Schäpers via cfe-commits
@@ -1355,6 +1362,10 @@ unsigned UnwrappedLineFormatter::format( bool FixIndentation = (FixBadIndentation || ContinueFormatting) && Indent != TheLine.First->OriginalColumn; bool ShouldFormat = TheLine.Affected || FixIndentation; + +if (Style

[clang] [clang-format] Option to ignore macro definitions (PR #70338)

2023-11-19 Thread Björn Schäpers via cfe-commits
@@ -24153,6 +24153,113 @@ TEST_F(FormatTest, WhitespaceSensitiveMacros) { verifyNoChange("FOO(String-ized&Messy+But: :Still=Intentional);", Style); } +TEST_F(FormatTest, IgnorePPDefinitions) { + FormatStyle Style = getLLVMStyle(); + Style.IgnorePPDefinitions = true; + + v

[clang] [clang-format] Option to ignore macro definitions (PR #70338)

2023-11-19 Thread Björn Schäpers via cfe-commits
@@ -1308,6 +1308,13 @@ class OptimizingLineFormatter : public LineFormatter { } // anonymous namespace +static bool lineContainsPPDefinition(const AnnotatedLine &Line) { HazardyKnusperkeks wrote: ```suggestion static bool LineContainsPPDefinition(const Annot

[clang] [clang-format] Correctly annotate braces of empty functions (PR #72733)

2023-11-19 Thread Emilia Kond via cfe-commits
https://github.com/rymiel approved this pull request. wow! https://github.com/llvm/llvm-project/pull/72733 ___ 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 modernize-use-std-numbers (PR #66583)

2023-11-19 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: > @PiotrZSL I have implemented the changes you have requested, but because of > #72536, I am not going to push those changes yet, unless you prefer it if I > do. I might take a look into fixing this issue. I came across this when I > checked what would happen when the big templ

[clang] 5603bb5 - [test] Fix misused Joined -e options

2023-11-19 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2023-11-19T10:38:49-08:00 New Revision: 5603bb5f5001e88a490b8f9c11c6e8969037183b URL: https://github.com/llvm/llvm-project/commit/5603bb5f5001e88a490b8f9c11c6e8969037183b DIFF: https://github.com/llvm/llvm-project/commit/5603bb5f5001e88a490b8f9c11c6e8969037183b.diff

[clang] [Driver] Allow -e entry but reject -eentry (PR #72804)

2023-11-19 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/72804 This short option taking an argument is unfortunate. * If a cc1-only option starts with `-e`, using it for driver will not be reported as an error (e.g. commit 6cd9886c88d16d288c74846495d89f2fe84ff827). * If

[clang] [Driver] Allow -e entry but reject -eentry (PR #72804)

2023-11-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Fangrui Song (MaskRay) Changes This short option taking an argument is unfortunate. * If a cc1-only option starts with `-e`, using it for driver will not be reported as an error (e.g. commit 6cd9886c88d16d288c74846495d89f2fe84ff827). *

[clang] [Driver] Add support for -export-dynamic which can match GCC behavior. (PR #72781)

2023-11-19 Thread Fangrui Song via cfe-commits
MaskRay wrote: GCC's default spec file for Linux does not say how `-export-dynamic` translates to ld `-export-dynamic`. I think ld `--export-dynamic` is exclusively caused by `-Wl,--export-dynamic` or `-rdynamic`. Do you have any example of `gcc -export-dynamic` uses? We probably should just

[llvm] [clang] Fix python escapes (PR #71170)

2023-11-19 Thread Nathan Sidwell via cfe-commits
https://github.com/urnathan closed https://github.com/llvm/llvm-project/pull/71170 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Refactor code to calculate flexible array member size (PR #72790)

2023-11-19 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/72790 >From fcea607665cdbae3e98f08288b165c2c1af24f95 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Sun, 19 Nov 2023 02:28:28 -0800 Subject: [PATCH 1/2] [NFC][Clang] Refactor code to calculate flexible array mem

[clang] e16a834 - [clang-format][NFC] Skip alignArrayInitializers() for 1-row matrices (#72166)

2023-11-19 Thread via cfe-commits
Author: Owen Pan Date: 2023-11-19T14:58:44-08:00 New Revision: e16a8344d0efa33caddc147f9b316ba4734c99ff URL: https://github.com/llvm/llvm-project/commit/e16a8344d0efa33caddc147f9b316ba4734c99ff DIFF: https://github.com/llvm/llvm-project/commit/e16a8344d0efa33caddc147f9b316ba4734c99ff.diff LOG:

[clang] [clang-format][NFC] Skip alignArrayInitializers() for 1-row matrices (PR #72166)

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

[clang] 5860d24 - [clang-format] Fix a bug in aligning comments above PPDirective (#72791)

2023-11-19 Thread via cfe-commits
Author: Owen Pan Date: 2023-11-19T14:59:53-08:00 New Revision: 5860d248a780aaef860db3d54184b49fc758c3c1 URL: https://github.com/llvm/llvm-project/commit/5860d248a780aaef860db3d54184b49fc758c3c1 DIFF: https://github.com/llvm/llvm-project/commit/5860d248a780aaef860db3d54184b49fc758c3c1.diff LOG:

[clang] [clang-format] Fix a bug in aligning comments above PPDirective (PR #72791)

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

[clang] cb3a605 - [clang-format] Fix a bug in isStartOfName() on macro definitions (#72768)

2023-11-19 Thread via cfe-commits
Author: Owen Pan Date: 2023-11-19T15:08:54-08:00 New Revision: cb3a605c5d453f9c6af8c44f84a11815aed7fe85 URL: https://github.com/llvm/llvm-project/commit/cb3a605c5d453f9c6af8c44f84a11815aed7fe85 DIFF: https://github.com/llvm/llvm-project/commit/cb3a605c5d453f9c6af8c44f84a11815aed7fe85.diff LOG:

[clang] [clang-format] Fix a bug in isStartOfName() on macro definitions (PR #72768)

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

[clang] edad025 - [clang-format] Correctly annotate braces of empty functions (#72733)

2023-11-19 Thread via cfe-commits
Author: Owen Pan Date: 2023-11-19T15:10:27-08:00 New Revision: edad025d1e1f8043637c65fed91060b327e85313 URL: https://github.com/llvm/llvm-project/commit/edad025d1e1f8043637c65fed91060b327e85313 DIFF: https://github.com/llvm/llvm-project/commit/edad025d1e1f8043637c65fed91060b327e85313.diff LOG:

[clang] [clang-format] Correctly annotate braces of empty functions (PR #72733)

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

[clang] [CUDA][HIP] ignore implicit host/device attr for override (PR #72815)

2023-11-19 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu created https://github.com/llvm/llvm-project/pull/72815 When deciding whether a previous function declaration is an overload or override, implicit host/device attrs should not be considered. This fixes the failure for the following code: `template class C { ex

[clang] [CUDA][HIP] make trivial ctor/dtor host device (PR #72394)

2023-11-19 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > > We've found a problem with the patch. https://godbolt.org/z/jcKo34vzG > > ``` > > template > > class C { > > explicit C() {}; > > }; > > > > template <> C::C() {}; > > ``` > > > > > > > > > > > > > > > > > > > > > > > > ``` > > :6

[clang] [CUDA][HIP] ignore implicit host/device attr for override (PR #72815)

2023-11-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yaxun (Sam) Liu (yxsamliu) Changes When deciding whether a previous function declaration is an overload or override, implicit host/device attrs should not be considered. This fixes the failure for the following code: `template

[PATCH] D135171: FreeBSD: enable __float128 on x86 and powerpc64le

2023-11-19 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D135171#4657080 , @brad wrote: > You can close this. The submitted patch https://github.com/llvm/llvm-project/commit/23c47eba879769a29772c999be2991201c2fe399 was not the same since it omitted ppc64. So I guess this shoul

[clang] [Driver] Add support for -export-dynamic which can match GCC behavior. (PR #72781)

2023-11-19 Thread dong jianqiang via cfe-commits
https://github.com/dongjianqiang2 closed https://github.com/llvm/llvm-project/pull/72781 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Add support for -export-dynamic which can match GCC behavior. (PR #72781)

2023-11-19 Thread dong jianqiang via cfe-commits
dongjianqiang2 wrote: > GCC's default spec file for Linux does not say how `-export-dynamic` > translates to ld `-export-dynamic`. > > I think ld `--export-dynamic` is exclusively caused by `-Wl,--export-dynamic` > or `-rdynamic`. Do you have any example of `gcc -export-dynamic` uses? > > > c

[clang] [Driver] Add support for -export-dynamic which can match GCC behavior. (PR #72781)

2023-11-19 Thread dong jianqiang via cfe-commits
https://github.com/dongjianqiang2 reopened https://github.com/llvm/llvm-project/pull/72781 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Add support for -export-dynamic which can match GCC behavior. (PR #72781)

2023-11-19 Thread dong jianqiang via cfe-commits
dongjianqiang2 wrote: @MaskRay the reason for adding this option is that gcc supports it. please refer to https://godbolt.org/z/54sE6zTa1 https://github.com/llvm/llvm-project/pull/72781 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [CUDA][HIP] ignore implicit host/device attr for override (PR #72815)

2023-11-19 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B edited https://github.com/llvm/llvm-project/pull/72815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA][HIP] ignore implicit host/device attr for override (PR #72815)

2023-11-19 Thread Artem Belevich via cfe-commits
@@ -1000,13 +1000,9 @@ void Sema::checkCUDATargetOverload(FunctionDecl *NewFD, // should have the same implementation on both sides. if (NewTarget != OldTarget && ((NewTarget == CFT_HostDevice && - !(LangOpts.OffloadImplicitHostDeviceTemplates && -

[clang] [CUDA][HIP] ignore implicit host/device attr for override (PR #72815)

2023-11-19 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. LGTM, with one question. https://github.com/llvm/llvm-project/pull/72815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-11-19 Thread Justin Fargnoli via cfe-commits
https://github.com/justinfargnoli edited https://github.com/llvm/llvm-project/pull/68176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

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

[PATCH] D151730: [RISCV] Support target attribute for function

2023-11-19 Thread Piyou Chen via Phabricator via cfe-commits
BeMg added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151730/new/ https://reviews.llvm.org/D151730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[PATCH] D151730: [RISCV] Support target attribute for function

2023-11-19 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/Basic/Targets/RISCV.cpp:229 +collectNonISAExtFeature(const std::vector &FeaturesVec, int XLen) { + auto I = llvm::find(FeaturesVec, "__RISCV_TargetAttrNeedOverride"); + auto FeatureNeedOveride = std::vector(FeaturesVec.

[clang] a76adfb - [NFC][Clang] Refactor code to calculate flexible array member size (#72790)

2023-11-19 Thread via cfe-commits
Author: Bill Wendling Date: 2023-11-19T19:25:10-08:00 New Revision: a76adfb992c6f5a9b05fbcc2de5889d2531607db URL: https://github.com/llvm/llvm-project/commit/a76adfb992c6f5a9b05fbcc2de5889d2531607db DIFF: https://github.com/llvm/llvm-project/commit/a76adfb992c6f5a9b05fbcc2de5889d2531607db.diff

[clang] [NFC][Clang] Refactor code to calculate flexible array member size (PR #72790)

2023-11-19 Thread Bill Wendling via cfe-commits
https://github.com/bwendling closed https://github.com/llvm/llvm-project/pull/72790 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [clang] [Clang] Correct handling of negative and out-of-bounds indices (PR #71877)

2023-11-19 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/71877 >From 721415856f1e89d8fbe48e63751a9275b25e0fb8 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Thu, 9 Nov 2023 14:15:22 -0800 Subject: [PATCH] [Clang] Correct handling of negative and out-of-bounds indices

[llvm] [clang-tools-extra] [clang] [Clang] Correct handling of negative and out-of-bounds indices (PR #71877)

2023-11-19 Thread Bill Wendling via cfe-commits
@@ -827,6 +827,165 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } +llvm::Value * +CodeGenFunction::emitFlexibleArrayMemberSize(const Expr *E, unsigned Type, +

[clang] [AVR] make the AVR ABI Swift compatible (PR #72298)

2023-11-19 Thread John McCall via cfe-commits
rjmccall wrote: This is less about the implementation weeds of LLVM and more about the actual details of your calling convention — the decisions about how arguments and results are passed that are ultimately downstream of the choices made here. Mostly, I'm encouraging you as a platform mainta

[clang-tools-extra] [clangd] Don't show inlay hints for __builtin_dump_struct (PR #71366)

2023-11-19 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/71366 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Don't show inlay hints for __builtin_dump_struct (PR #71366)

2023-11-19 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. https://github.com/llvm/llvm-project/pull/71366 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Don't show inlay hints for __builtin_dump_struct (PR #71366)

2023-11-19 Thread Nathan Ridge via cfe-commits
@@ -589,6 +589,24 @@ class InlayHintVisitor : public RecursiveASTVisitor { return true; } + bool TraversePseudoObjectExpr(PseudoObjectExpr *E) { +// Do not show inlay hints for the __builtin_dump_struct, which would +// expand to a PseudoObjectExpr that include

[clang-tools-extra] [clangd] Don't show inlay hints for __builtin_dump_struct (PR #71366)

2023-11-19 Thread Nathan Ridge via cfe-commits
@@ -1724,6 +1724,33 @@ TEST(InlayHints, RestrictRange) { ElementsAre(labelIs(": int"), labelIs(": char"))); } +TEST(ParameterHints, PseudoObjectExpr) { + Annotations Code(R"cpp( +struct S { + __declspec(property(get=GetX, put=PutX)) int x[]; + int

[clang-tools-extra] [clangd] Don't show inlay hints for __builtin_dump_struct (PR #71366)

2023-11-19 Thread Nathan Ridge via cfe-commits
@@ -1724,6 +1724,33 @@ TEST(InlayHints, RestrictRange) { ElementsAre(labelIs(": int"), labelIs(": char"))); } +TEST(ParameterHints, PseudoObjectExpr) { + Annotations Code(R"cpp( +struct S { + __declspec(property(get=GetX, put=PutX)) int x[]; + int

[clang] [clang-tools-extra] [llvm] [InstCombine] Convert or concat to fshl if opposite or concat exists (PR #68502)

2023-11-19 Thread via cfe-commits
https://github.com/HaohaiWen closed https://github.com/llvm/llvm-project/pull/68502 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Implement inc/dec for IntegralAP (PR #69597)

2023-11-19 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/69597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2023-11-19 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/71315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] IndirectMember initializers (PR #69900)

2023-11-19 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/69900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA][HIP] ignore implicit host/device attr for override (PR #72815)

2023-11-19 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/72815 >From 27f1873abd9707107c714eb3432b31ffa56235e3 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Sun, 19 Nov 2023 19:34:35 -0500 Subject: [PATCH] [CUDA][HIP] ignore implicit host/device attr for override W

[clang] [llvm] Enable OpenCL hostcall printf (WIP) (PR #72556)

2023-11-19 Thread Vikram Hegde via cfe-commits
https://github.com/vikramRH updated https://github.com/llvm/llvm-project/pull/72556 >From 6ace9d0a51064be189093ca3bb42416aafadb7f6 Mon Sep 17 00:00:00 2001 From: Vikram Date: Fri, 10 Nov 2023 09:39:41 + Subject: [PATCH 1/3] [AMDGPU] Treat printf as builtin for OpenCL --- clang/include/cla

[clang] [llvm] Enable OpenCL hostcall printf (WIP) (PR #72556)

2023-11-19 Thread Vikram Hegde via cfe-commits
@@ -170,20 +173,46 @@ static Value *appendString(IRBuilder<> &Builder, Value *Desc, Value *Arg, return callAppendStringN(Builder, Desc, Arg, Length, IsLast); } +static Value *appendVectorArg(IRBuilder<> &Builder, Value *Desc, Value *Arg, + bool

[clang] [llvm] Enable OpenCL hostcall printf (WIP) (PR #72556)

2023-11-19 Thread Vikram Hegde via cfe-commits
@@ -170,20 +173,46 @@ static Value *appendString(IRBuilder<> &Builder, Value *Desc, Value *Arg, return callAppendStringN(Builder, Desc, Arg, Length, IsLast); } +static Value *appendVectorArg(IRBuilder<> &Builder, Value *Desc, Value *Arg, + bool

[clang] [llvm] Enable OpenCL hostcall printf (WIP) (PR #72556)

2023-11-19 Thread Vikram Hegde via cfe-commits
@@ -170,20 +173,46 @@ static Value *appendString(IRBuilder<> &Builder, Value *Desc, Value *Arg, return callAppendStringN(Builder, Desc, Arg, Length, IsLast); } +static Value *appendVectorArg(IRBuilder<> &Builder, Value *Desc, Value *Arg, vikramRH wrote: Do

[clang] [llvm] Enable OpenCL hostcall printf (WIP) (PR #72556)

2023-11-19 Thread Vikram Hegde via cfe-commits
@@ -278,7 +310,13 @@ static Value *callBufferedPrintfStart( StringData(StringRef(), LenWithNull, LenWithNullAligned, false)); } } else { - int AllocSize = M->getDataLayout().getTypeAllocSize(Args[i]->getType()); + int AllocSize = 0; + if (OC

[llvm] [clang] Enable OpenCL hostcall printf (WIP) (PR #72556)

2023-11-19 Thread Vikram Hegde via cfe-commits
@@ -278,7 +310,13 @@ static Value *callBufferedPrintfStart( StringData(StringRef(), LenWithNull, LenWithNullAligned, false)); } } else { - int AllocSize = M->getDataLayout().getTypeAllocSize(Args[i]->getType()); + int AllocSize = 0; + if (OC

[clang] [clang] Enhance handling of Apple-specific '-arch'/'-target' option values (PR #72821)

2023-11-19 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 created https://github.com/llvm/llvm-project/pull/72821 The '-arch' option itself is Apple-specific, so, if '-target' is not passed explicitely, we try to construct an Apple triple. If the default triple is Apple-specific, we just update it's arch so it matches the

[clang] [clang] Enhance handling of Apple-specific '-arch'/'-target' option values (PR #72821)

2023-11-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Daniil Kovalev (kovdan01) Changes The '-arch' option itself is Apple-specific, so, if '-target' is not passed explicitely, we try to construct an Apple triple. If the default triple is Apple-specific, we just update it's arch so it matche

[clang] [clang] Enhance handling of Apple-specific '-arch'/'-target' option values (PR #72821)

2023-11-19 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/72821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clang] [InstCombine] Convert or concat to fshl if opposite or concat exists (PR #68502)

2023-11-19 Thread via cfe-commits
goldsteinn wrote: For my money this was merged prematurely. There are still outstanding concerns about whether this transform is desirable, as well there is an outstanding comment about the implementation itself. I'm fairly agnostic about this code getting in, but I think it should be reverted

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

2023-11-19 Thread Justin Fargnoli via cfe-commits
https://github.com/justinfargnoli edited https://github.com/llvm/llvm-project/pull/68176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-11-19 Thread Justin Fargnoli via cfe-commits
justinfargnoli wrote: > I would recommend trying to run this pass (with all options enabled) over all > existing tests to make sure that it doesn't cause any crashes/verifier > failures. You're moving instructions around, and it's easy to get that wrong > when invoke, callbr or catchswitch are

[llvm] [clang] Enable OpenCL hostcall printf (WIP) (PR #72556)

2023-11-19 Thread Sameer Sahasrabuddhe via cfe-commits
@@ -26,28 +26,31 @@ using namespace llvm; #define DEBUG_TYPE "amdgpu-emit-printf" -static Value *fitArgInto64Bits(IRBuilder<> &Builder, Value *Arg) { +static Value *fitArgInto64Bits(IRBuilder<> &Builder, Value *Arg, + bool IsBuffered) { + const

[llvm] [clang] Enable OpenCL hostcall printf (WIP) (PR #72556)

2023-11-19 Thread Sameer Sahasrabuddhe via cfe-commits
@@ -406,5 +410,9 @@ TARGET_BUILTIN(__builtin_amdgcn_cvt_pk_fp8_f32, "iffiIb", "nc", "fp8-insts") TARGET_BUILTIN(__builtin_amdgcn_cvt_sr_bf8_f32, "ifiiIi", "nc", "fp8-insts") TARGET_BUILTIN(__builtin_amdgcn_cvt_sr_fp8_f32, "ifiiIi", "nc", "fp8-insts") +// OpenCL +LANGBUILTIN(p

[clang] [llvm] Enable OpenCL hostcall printf (WIP) (PR #72556)

2023-11-19 Thread Sameer Sahasrabuddhe via cfe-commits
@@ -4742,6 +4742,16 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, Args.ClaimAllArgs(options::OPT_gen_cdb_fragment_path); } + if (TC.getTriple().isAMDGPU() && types::isOpenCL(Input.getType())) { +if (Args.getLastArg(options::OPT_mprintf_kind_EQ))

[clang] [llvm] Enable OpenCL hostcall printf (WIP) (PR #72556)

2023-11-19 Thread Sameer Sahasrabuddhe via cfe-commits
@@ -26,28 +26,31 @@ using namespace llvm; #define DEBUG_TYPE "amdgpu-emit-printf" -static Value *fitArgInto64Bits(IRBuilder<> &Builder, Value *Arg) { +static Value *fitArgInto64Bits(IRBuilder<> &Builder, Value *Arg, + bool IsBuffered) { + const

[clang] [llvm] Enable OpenCL hostcall printf (WIP) (PR #72556)

2023-11-19 Thread Sameer Sahasrabuddhe via cfe-commits
@@ -170,20 +173,49 @@ static Value *appendString(IRBuilder<> &Builder, Value *Desc, Value *Arg, return callAppendStringN(Builder, Desc, Arg, Length, IsLast); } +static Value *appendVectorArg(IRBuilder<> &Builder, Value *Desc, Value *Arg, + bool

  1   2   >