[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

2023-11-01 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/70973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

2023-11-01 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/70973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

2023-11-01 Thread Yuxuan Chen via cfe-commits
@@ -1965,9 +1965,15 @@ bool Sema::buildCoroutineParameterMoves(SourceLocation Loc) { if (PD->getType()->isDependentType()) continue; +// Preserve the referenced state for unused parameter diagnostics. +bool DeclReferenced = PD->isReferenced();

[clang] [llvm] [PowerPC] Add an alias for -mregnames so that full register names used in assembly. (PR #70255)

2023-11-01 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers approved this pull request. LGTM; might be nice if it's possible to set this for `opt`/`llc` invocations, but for now I'm just happy to have this in clang. https://github.com/llvm/llvm-project/pull/70255 ___

[PATCH] D108905: [ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that all exception objects' destructors are non-throwing

2023-11-01 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. LGTM. Thanks. Comment at: clang/lib/Sema/SemaExprCXX.cpp:1110 +!FT->isNothrow()) + Diag(ThrowLoc, diag::err_throw_object_throwing_dtor) << Ty << 1 << 1; + } It looks like

[PATCH] D108905: [ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that all exception objects' destructors are non-throwing

2023-11-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 557975. MaskRay marked an inline comment as done. MaskRay retitled this revision from "[ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that an exception object' destructor is nothrow" to "[ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to

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

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

[clang] 51abbf9 - [InstCombine] Deduce `align` and `nonnull` return attributes for `llvm.ptrmask`

2023-11-01 Thread Noah Goldstein via cfe-commits
Author: Noah Goldstein Date: 2023-11-01T23:50:35-05:00 New Revision: 51abbf98d19cb1b89c6938811f2805bafe4b336e URL: https://github.com/llvm/llvm-project/commit/51abbf98d19cb1b89c6938811f2805bafe4b336e DIFF:

[compiler-rt] [clang] [clang-tools-extra] [llvm] [InferAddressSpaces] Fix constant replace to avoid modifying other functions (PR #70611)

2023-11-01 Thread Wenju He via cfe-commits
@@ -334,6 +335,15 @@ template<> struct simplify_type { } }; +template <> struct GraphTraits { wenju-he wrote: I measured llvm-project compile time impact of this change to llvm/IR/User.h on intel icx 8358 cpu. Build command: ` cmake -GNinja

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-11-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 4fed3d374dfca82d0cb32bb444985ece04438376 c9e4d58d1c2ecdbbbc4a518ee1698901d0b74e0d --

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-11-01 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,53 @@ +//===-- ProjectModules.h -*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-11-01 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/66462 >From 190e160868080f7d64c0c05de0fd4315a3ff2b93 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Fri, 15 Sep 2023 11:33:53 +0800 Subject: [PATCH 1/2] [clangd] [C++20] [Modules] Introduce initial support for

[clang] [flang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-01 Thread David Truby via cfe-commits
@@ -976,12 +976,46 @@ bool tools::addOpenMPRuntime(ArgStringList , const ToolChain , return true; } -void tools::addFortranRuntimeLibs(const ToolChain , +void tools::addFortranRuntimeLibs(const ToolChain , const ArgList ,

[clang] [flang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-01 Thread David Truby via cfe-commits
https://github.com/DavidTruby edited https://github.com/llvm/llvm-project/pull/70833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 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 1/3] [clang] Add support for new loop attribute

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread via cfe-commits
smanna12 wrote: Thank you @erichkeane and @AaronBallman for reviews and feedbacks. >>Please be sure to add a reasonable description to the patch summary so that >>reviewers know more about what's going on, but thank you for already having >>written docs (that helps give context). I have

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-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 ae7f7f2ef2033a48fb9db3cb70b88ad62019f40b d049dc9997bdb78ff7e7cbf9b04aa42b9274cfd9 --

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

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

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread via cfe-commits
@@ -0,0 +1,124 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,c-local %s +// RUN: %clang_cc1 -fsyntax-only -verify=expected,cpp-local -pedantic -x c++ -std=c++11 %s + +// Add diagnostics tests for Loop attribute: [[clang::code_align()]]. smanna12 wrote:

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread via cfe-commits
@@ -0,0 +1,124 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,c-local %s smanna12 wrote: Done https://github.com/llvm/llvm-project/pull/70762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread via cfe-commits
@@ -0,0 +1,124 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,c-local %s +// RUN: %clang_cc1 -fsyntax-only -verify=expected,cpp-local -pedantic -x c++ -std=c++11 %s + +// Add diagnostics tests for Loop attribute: [[clang::code_align()]]. + +void foo() { + int i; + int

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread via cfe-commits
@@ -7416,3 +7416,46 @@ that ``p->array`` must have at least ``p->count`` number of elements available: }]; } + +def CodeAlignAttrDocs : Documentation { + let Category = DocCatVariable; + let Heading = "clang::code_align"; + let Content = [{ +The ``clang::code_align(N)``

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread via cfe-commits
@@ -7416,3 +7416,46 @@ that ``p->array`` must have at least ``p->count`` number of elements available: }]; } + +def CodeAlignAttrDocs : Documentation { + let Category = DocCatVariable; + let Heading = "clang::code_align"; + let Content = [{ +The ``clang::code_align(N)``

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread via cfe-commits
@@ -4280,3 +4280,12 @@ def PreferredType: InheritableAttr { let Args = [TypeArgument<"Type", 1>]; let Documentation = [PreferredTypeDocumentation]; } + +def CodeAlign: StmtAttr { + let Spellings = [CXX11<"clang", "code_align">, + C23<"clang",

[llvm] [clang] [Coroutines] Introduce [[clang::coro_only_destroy_when_complete]] (PR #71014)

2023-11-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-coroutines Author: Chuanqi Xu (ChuanqiXu9) Changes Close https://github.com/llvm/llvm-project/issues/56980. This patch tries to introduce a light-weight optimization attribute for coroutines which are guaranteed to only be destroyed after it reached

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread via cfe-commits
@@ -7416,3 +7416,46 @@ that ``p->array`` must have at least ``p->count`` number of elements available: }]; } + +def CodeAlignAttrDocs : Documentation { + let Category = DocCatVariable; + let Heading = "clang::code_align"; + let Content = [{ +The ``clang::code_align(N)``

[llvm] [clang] [Coroutines] Introduce [[clang::coro_only_destroy_when_complete]] (PR #71014)

2023-11-01 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/71014 Close https://github.com/llvm/llvm-project/issues/56980. This patch tries to introduce a light-weight optimization attribute for coroutines which are guaranteed to only be destroyed after it reached the

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread via cfe-commits
@@ -4280,3 +4280,12 @@ def PreferredType: InheritableAttr { let Args = [TypeArgument<"Type", 1>]; let Documentation = [PreferredTypeDocumentation]; } + +def CodeAlign: StmtAttr { + let Spellings = [CXX11<"clang", "code_align">, + C23<"clang",

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread via cfe-commits
@@ -788,6 +797,20 @@ void LoopInfoStack::push(BasicBlock *Header, clang::ASTContext , } } + // Translate 'loop attributes' arguments to equivalent Attr enums. + // It's being handled separately from LoopHintAttrs not to support + // legacy GNU attributes and pragma

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread via cfe-commits
@@ -10026,6 +10026,10 @@ def err_duplicate_case_differing_expr : Error< def warn_case_empty_range : Warning<"empty case range specified">; def warn_missing_case_for_condition : Warning<"no case matching constant switch condition '%0'">; +def err_loop_attr_duplication :

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread via cfe-commits
@@ -322,6 +322,56 @@ static Attr *handleUnlikely(Sema , Stmt *St, const ParsedAttr , return ::new (S.Context) UnlikelyAttr(S.Context, A); } +CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo , +Expr *E) { + if

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 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 1/2] [clang] Add support for new loop attribute

[clang] [clang][analyzer]][NFC] Simplify method 'ensureStreamNonNull' of StreamChecker (PR #70927)

2023-11-01 Thread Ben Shi via cfe-commits
benshi001 wrote: > much, and I wonder if you have further ideas refactoring the checker; if so > we could probably bundle up similar changes into this one. Thanks for your reply. Actually I have no plan about improving this checker. Currently I am just reading its code and trying to

[PATCH] D108905: [ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that an exception object' destructor is nothrow

2023-11-01 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D108905#4655907 , @MaskRay wrote: > In D108905#4655694 , @ChuanqiXu > wrote: > >> Oh, I am not saying the legacy and old comment. I mean you need to touch >> ReleaseNotes.rst and

[PATCH] D108905: [ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that an exception object' destructor is nothrow

2023-11-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D108905#4655694 , @ChuanqiXu wrote: > Oh, I am not saying the legacy and old comment. I mean you need to touch > ReleaseNotes.rst and UserManual.rst since we add a new flag. Also we need > either add a TODO/FIXME saying we

[PATCH] D108905: [ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that an exception object' destructor is nothrow

2023-11-01 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/docs/UsersManual.rst:2145-2147 + ``catch (...) { ... }``. This option tells Clang that an exception object's + destructor does not throw, even if the destructor is annotated as + ``noexcept(false)``. I

[PATCH] D108905: [ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that an exception object' destructor is nothrow

2023-11-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 557968. MaskRay marked an inline comment as done. MaskRay edited the summary of this revision. MaskRay added a comment. Update clang/docs/UsersManual.rst and clang/docs/ReleaseNotes.rst Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] [clang] Separate bit-field padding diagnostics into -Wpadded-bitfield (PR #70978)

2023-11-01 Thread via cfe-commits
https://github.com/DanShaders updated https://github.com/llvm/llvm-project/pull/70978 >From 7906a4689d44a64ead5259f947049c862f6bf7e6 Mon Sep 17 00:00:00 2001 From: Dan Klishch Date: Wed, 1 Nov 2023 21:59:21 -0400 Subject: [PATCH] [clang] Separate bit-field padding diagnostics into

[clang] [clang][driver] Add \/../include/c++/v1 to include path on Darwin (PR #70817)

2023-11-01 Thread Jon Roelofs via cfe-commits
jroelofs wrote: > Can you clearly state why you are against this PR? You don't consider the > current behaviour of silently using the wrong headers a bug, or the proposed > solution is not correct? >> Don't consider this an objection I am not against it; I just wanted to talk through all the

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

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

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

2023-11-01 Thread Chuanqi Xu via cfe-commits
@@ -1965,9 +1965,15 @@ bool Sema::buildCoroutineParameterMoves(SourceLocation Loc) { if (PD->getType()->isDependentType()) continue; +// Preserve the referenced state for unused parameter diagnostics. +bool DeclReferenced = PD->isReferenced();

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

2023-11-01 Thread Chuanqi Xu via cfe-commits
@@ -1965,9 +1965,15 @@ bool Sema::buildCoroutineParameterMoves(SourceLocation Loc) { if (PD->getType()->isDependentType()) continue; +// Preserve the referenced state for unused parameter diagnostics. ChuanqiXu9 wrote: Readers can understand

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

2023-11-01 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: It looks much better now. Let's try to optimize it a bit futher. https://github.com/llvm/llvm-project/pull/70973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

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

[clang] [clang] Improve `_Alignas` on a `struct` declaration diagnostic (PR #65638)

2023-11-01 Thread Jerin Philip via cfe-commits
https://github.com/jerinphilip updated https://github.com/llvm/llvm-project/pull/65638 >From 947d4b418eb5b30f76ff262b1a19150aac10b9cc Mon Sep 17 00:00:00 2001 From: Jerin Philip Date: Sat, 19 Aug 2023 16:43:53 +0530 Subject: [PATCH] [clang] Improve _Alignas on declaration diagnostic Adds

[clang] [llvm] [PowerPC] Add an alias for -mregnames so that full register names used in assembly. (PR #70255)

2023-11-01 Thread Stefan Pintilie via cfe-commits
https://github.com/stefanp-ibm updated https://github.com/llvm/llvm-project/pull/70255 >From c57979d3d86362df239d3d3ff8cda124d40bb79d Mon Sep 17 00:00:00 2001 From: Stefan Pintilie Date: Wed, 25 Oct 2023 15:21:11 -0500 Subject: [PATCH 1/5] [PowerPC] Add an alias for -mregnames so that full

[clang-tools-extra] [NFC][clang-tidy]refactor isAssignmentToMemberOf in PreferMemberInitializerCheck (PR #71006)

2023-11-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Congcong Cai (HerrCai0907) Changes isAssignmentToMemberOf will return `std::make_pair(nullptr, nullptr)` when failed. Using `std::optional` can describe failed case clearly. --- Full diff:

[clang-tools-extra] [NFC][clang-tidy]refactor isAssignmentToMemberOf in PreferMemberInitializerCheck (PR #71006)

2023-11-01 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/71006 isAssignmentToMemberOf will return `std::make_pair(nullptr, nullptr)` when failed. Using `std::optional` can describe failed case clearly. >From 69b7688f56f7fe96031201eef1c3804f391c5abe Mon Sep 17 00:00:00

[clang] [flang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-01 Thread via cfe-commits
@@ -976,12 +976,46 @@ bool tools::addOpenMPRuntime(ArgStringList , const ToolChain , return true; } -void tools::addFortranRuntimeLibs(const ToolChain , +void tools::addFortranRuntimeLibs(const ToolChain , const ArgList ,

[clang] [clang-tools-extra] [llvm] [RFC] Perform lifetime bound checks for arguments to coroutine (PR #69360)

2023-11-01 Thread Bruno Cardoso Lopes via cfe-commits
@@ -7584,11 +7584,22 @@ static void visitLifetimeBoundArguments(IndirectLocalPath , Expr *Call, if (ObjectArg && implicitObjectParamIsLifetimeBound(Callee)) VisitLifetimeBoundArg(Callee, ObjectArg); - + bool checkCoroCall = false; + if (const auto *RD =

[clang] [flang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-01 Thread David Truby via cfe-commits
DavidTruby wrote: > > Do we really need to have all 4 variants of the 3 fortran runtime > > libraries? That's a lot of complexity. Can we pare it down to just > > static/dynamic? It's also sometimes possible to generate code that works in > > both the static and dynamic context, depending on

[clang] [clang][driver] Add \/../include/c++/v1 to include path on Darwin (PR #70817)

2023-11-01 Thread Liviu Ionescu via cfe-commits
ilg-ul wrote: Can you clearly state why you are against this PR? You don't consider the current behaviour of silently using the wrong headers a bug, or the proposed solution is not correct? https://github.com/llvm/llvm-project/pull/70817 ___

[clang] [clang][driver] Add \/../include/c++/v1 to include path on Darwin (PR #70817)

2023-11-01 Thread Jon Roelofs via cfe-commits
jroelofs wrote: > changing the structure of the symlinks is not possible, it is done > automatically by a tool. To be fair: tools can be changed, and in fact you're proposing to change one ;) But that said, now I see what you're up against. https://github.com/llvm/llvm-project/pull/70817

[clang] [clang][driver] Add \/../include/c++/v1 to include path on Darwin (PR #70817)

2023-11-01 Thread Liviu Ionescu via cfe-commits
ilg-ul wrote: > for your use case, can you stick symlinks in to preserve that toolchain > folder structure relative to the ~/tmp/clang++ symlink? i.e. make that > ~/tmp/bin/clang++ -> > /Users/ilg/Library/xPacks/@xpack-dev-tools/clang/15.0.7-3.1/.content/bin/clang-15 > and add ~/tmp/lib ->

[clang] [llvm] [RISCV] Support Xsfvfwmaccqqq extensions (PR #68296)

2023-11-01 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/68296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [flang] [lldb] [libcxx] [llvm] [lld] [clang-tools-extra] [OpenACC] Initial commits to support OpenACC (PR #70234)

2023-11-01 Thread Bruno Cardoso Lopes via cfe-commits
@@ -605,6 +605,17 @@ static void InitializeStandardPredefinedMacros(const TargetInfo , Builder.defineMacro("HIP_API_PER_THREAD_DEFAULT_STREAM"); } } + + if (LangOpts.OpenACC) { +// FIXME: When we have full support for OpenACC, we should set this to the +

[flang] [clang] [llvm] [libc] [lld] [libcxx] [clang-tools-extra] [lldb] [OpenACC] Initial commits to support OpenACC (PR #70234)

2023-11-01 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,14 @@ +// RUN: %clang -S -### -fopenacc %s 2>&1 | FileCheck %s --check-prefix=CHECK-DRIVER +// CHECK-DRIVER: "-cc1" {{.*}} "-fopenacc" bcardosolopes wrote: How does the interaction between using both `-fopenmp` and `-fopenacc` at the same time

[libcxx] [lld] [flang] [clang] [llvm] [lldb] [clang-tools-extra] [libc] [OpenACC] Initial commits to support OpenACC (PR #70234)

2023-11-01 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes commented: The changes in this patch looks pretty straightforward! Left some inline comments. https://github.com/llvm/llvm-project/pull/70234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[libcxx] [llvm] [lld] [clang] [libc] [flang] [lldb] [clang-tools-extra] [OpenACC] Initial commits to support OpenACC (PR #70234)

2023-11-01 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/70234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libc] [clang] [lld] [llvm] [lldb] [libcxx] [clang-tools-extra] [flang] [OpenACC] Initial commits to support OpenACC (PR #70234)

2023-11-01 Thread Bruno Cardoso Lopes via cfe-commits
@@ -1342,6 +1342,15 @@ def err_opencl_logical_exclusive_or : Error< def err_openclcxx_virtual_function : Error< "virtual functions are not supported in C++ for OpenCL">; +// OpenACC Support. +def warn_pragma_acc_ignored : Warning< + "unexpected '#pragma acc ...' in

[flang] [clang] WIP: [flang] Enable fir alias tags pass by default when optimizing for speed (PR #68597)

2023-11-01 Thread Slava Zakharin via cfe-commits
vzakhari wrote: Hi @tblah, is this ready for a merge? Let me know if you are just waiting for a review. https://github.com/llvm/llvm-project/pull/68597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [CodeGen] Revamp counted_by calculations (PR #70606)

2023-11-01 Thread Bill Wendling via cfe-commits
bwendling wrote: @kees, @nickdesaulniers, @rapidsna, and @apple-fcloutier Should this feature support a `__bdos` to an address inside the FAM? ``` #include #include struct flex { double dummy; char count; char fam[] __attribute__((counted_by(count))); }; int main()

[libcxx] [llvm] [clang] [clang-tools-extra] [libc++] Allow running the test suite with optimizations (PR #68753)

2023-11-01 Thread Alexander Richardson via cfe-commits
@@ -87,6 +87,21 @@ def getStdFlag(cfg, std): return "-std=" + fallbacks[std] return None +def getSpeedOptimizationFlag(cfg): +if _isClang(cfg) or _isAppleClang(cfg) or _isGCC(cfg): +return "-O3" +elif _isMSVC(cfg): +return "/O2" +else:

[libcxx] [llvm] [clang] [clang-tools-extra] [libc++] Allow running the test suite with optimizations (PR #68753)

2023-11-01 Thread Alexander Richardson via cfe-commits
@@ -121,6 +136,17 @@ def getStdFlag(cfg, std): AddCompileFlag(lambda cfg: getStdFlag(cfg, std)), ], ), +Parameter( +name="optimization", +choices=["none", "speed", "size"], +type=str, +help="The version of the

[llvm] [compiler-rt] [clang] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #66825)

2023-11-01 Thread Mingming Liu via cfe-commits
@@ -1,7 +1,7 @@ RUN: %clang_pgogen -O2 -fuse-ld=bfd -mllvm -disable-vp=false -mllvm -vp-static-alloc=true -DSTRESS=1 -o %t.ir.warn %S/../Inputs/instrprof-value-prof-real.c RUN: env LLVM_PROFILE_FILE=%t.ir.profraw LLVM_VP_MAX_NUM_VALS_PER_SITE=255 %run %t.ir.warn 2>&1

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

2023-11-01 Thread David Blaikie via cfe-commits
dwblaikie wrote: > 2) always put DW_AT_const_value in DW_TAG_member. My understanding is that this is not possible. Dependent initializer expressions can't be evaluated in all cases - we're only allowed to evaluate them in the places the language allows us to, otherwise we might produce the

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

2023-11-01 Thread Yuxuan Chen via cfe-commits
@@ -1965,9 +1965,15 @@ bool Sema::buildCoroutineParameterMoves(SourceLocation Loc) { if (PD->getType()->isDependentType()) continue; +// Preserve the referenced state for unused parameter diagnostics. +bool DeclReferenced = PD->isReferenced(); +

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

2023-11-01 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM. @ChuanqiXu9 should give the final blessing though. https://github.com/llvm/llvm-project/pull/70973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

2023-11-01 Thread Bruno Cardoso Lopes via cfe-commits
@@ -1965,9 +1965,15 @@ bool Sema::buildCoroutineParameterMoves(SourceLocation Loc) { if (PD->getType()->isDependentType()) continue; +// Preserve the referenced state for unused parameter diagnostics. +bool DeclReferenced = PD->isReferenced(); +

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

2023-11-01 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/70973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

2023-11-01 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/70973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

2023-11-01 Thread Bruno Cardoso Lopes via cfe-commits
@@ -1965,9 +1965,15 @@ bool Sema::buildCoroutineParameterMoves(SourceLocation Loc) { if (PD->getType()->isDependentType()) continue; +// Preserve the referenced state for unused parameter diagnostics. +bool DeclReferenced = PD->isReferenced(); +

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

2023-11-01 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes commented: Thanks for improving this! I haven't looked at your previous review of this PR, but I like the simplicity of this one. https://github.com/llvm/llvm-project/pull/70973 ___ cfe-commits mailing list

[clang] [clang][driver] Add \/../include/c++/v1 to include path on Darwin (PR #70817)

2023-11-01 Thread Jon Roelofs via cfe-commits
jroelofs wrote: > In my use case, and probably in most use cases, the location where the link > comes from is a plain folder, not a hierarchy specific to a toolchain. I would have expected the opposite. Most non-windows clang toolchains that I know of typically ship `clang` and `clang++` as

[clang] Reland "[clang][Sema] Use original template pattern when declaring implicit deduction guides for nested template classes" (PR #69676)

2023-11-01 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: thanks! I appreciate the quick response https://github.com/llvm/llvm-project/pull/69676 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Emit type metadata on vtables when IRPGO instrumentation option is on. (PR #70841)

2023-11-01 Thread Teresa Johnson via cfe-commits
@@ -0,0 +1,145 @@ +// Test that type metadata are emitted with -fprofile-generate +// +// RUN: %clang -fprofile-generate -fno-lto -target x86_64-unknown-linux -emit-llvm -S %s -o - | FileCheck %s --check-prefix=ITANIUM +// RUN: %clang -fprofile-generate -fno-lto -target

[PATCH] D149917: [lld][WebAssembly] Add --keep-section flag

2023-11-01 Thread Derek Schuff via Phabricator via cfe-commits
dschuff accepted this revision. dschuff added a comment. otherwise LGTM Comment at: lld/wasm/Options.td:196 +defm keep_section: Eq<"keep-section", + "Preserve a section even when --strip-all is given. This is useful for compiler drivers such as clang or emcc that, for

[clang] Reland "[clang][Sema] Use original template pattern when declaring implicit deduction guides for nested template classes" (PR #69676)

2023-11-01 Thread via cfe-commits
antangelo wrote: Apologies for the delay, I haven't been able to look into this until now. The patch has been reverted in https://github.com/llvm/llvm-project/commit/801c78d5b474c2319aa8ead44db7ba8cacac4714 https://github.com/llvm/llvm-project/pull/69676

[clang] 801c78d - Revert "Reland "[clang][Sema] Use original template pattern when declaring implicit deduction guides for nested template classes" (#69676)"

2023-11-01 Thread Antonio Abbatangelo via cfe-commits
Author: Antonio Abbatangelo Date: 2023-11-01T18:10:02-04:00 New Revision: 801c78d5b474c2319aa8ead44db7ba8cacac4714 URL: https://github.com/llvm/llvm-project/commit/801c78d5b474c2319aa8ead44db7ba8cacac4714 DIFF:

[flang] [compiler-rt] [llvm] [openmp] [clang] [libcxx] [lldb] [lld] [mlir] [clang-tools-extra] [AMDGPU] GCNRegPressure printing pass for testing. (PR #70031)

2023-11-01 Thread Valery Pykhtin via cfe-commits
vpykhtin wrote: I've removed live-through registers printing from this PR and will submit it separately. https://github.com/llvm/llvm-project/pull/70031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[flang] [compiler-rt] [llvm] [openmp] [clang] [libcxx] [lldb] [lld] [mlir] [clang-tools-extra] [AMDGPU] GCNRegPressure printing pass for testing. (PR #70031)

2023-11-01 Thread Valery Pykhtin via cfe-commits
https://github.com/vpykhtin closed https://github.com/llvm/llvm-project/pull/70031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Separate bit-field padding diagnostics into -Wpadded-bitfield (PR #70978)

2023-11-01 Thread via cfe-commits
https://github.com/DanShaders updated https://github.com/llvm/llvm-project/pull/70978 >From 5446542556971dfcfed097ad92925712cbe3a7a8 Mon Sep 17 00:00:00 2001 From: Dan Klishch Date: Wed, 1 Nov 2023 15:31:49 -0400 Subject: [PATCH 1/2] [clang] Separate bit-field padding diagnostics into

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

2023-11-01 Thread via cfe-commits
avl-llvm wrote: > > Or maybe we can include the DW_AT_const_value in both places? > > The ask to drop the constant off of the declaration comes from the > DWARFParallelLinker work where it was causing non-deterministic output. But > @dwblaikie @avl-llvm will know more about that I do not

[clang] [clang-repl] [test] Make an XFAIL more precise (PR #70991)

2023-11-01 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > Very interesting... See also #68092, now I understand even less what the > problem is... No idea actually, but I tested passing `-Xcc --target=x86_64-w64-mingw32` to an MSVC-built clang-repl, and then it outputs the expected things. Not sure at what level some JIT

[clang] [clang-repl] [test] Make an XFAIL more precise (PR #70991)

2023-11-01 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. Thank you. Lgtm! https://github.com/llvm/llvm-project/pull/70991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland "[clang][Sema] Use original template pattern when declaring implicit deduction guides for nested template classes" (PR #69676)

2023-11-01 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: and if not, could we revert while investigating? https://github.com/llvm/llvm-project/pull/69676 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] [test] Make an XFAIL more precise (PR #70991)

2023-11-01 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo approved this pull request. Very interesting... See also https://github.com/llvm/llvm-project/issues/68092, now I understand even less what the problem is... https://github.com/llvm/llvm-project/pull/70991 ___ cfe-commits

[clang] [clang-repl] [test] Make an XFAIL more precise (PR #70991)

2023-11-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Martin Storsjö (mstorsjo) Changes The const.cpp testcase fails when running in MSVC mode, while it does succeed in MinGW mode. In MSVC mode, there are more constructor invocations than expected, as the printout looks like this:

[clang] [clang-repl] [test] Make an XFAIL more precise (PR #70991)

2023-11-01 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo created https://github.com/llvm/llvm-project/pull/70991 The const.cpp testcase fails when running in MSVC mode, while it does succeed in MinGW mode. In MSVC mode, there are more constructor invocations than expected, as the printout looks like this: A(1),

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

2023-11-01 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna edited https://github.com/llvm/llvm-project/pull/70480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-11-01 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna edited https://github.com/llvm/llvm-project/pull/70480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-11-01 Thread Yeoul Na via cfe-commits
@@ -330,6 +330,14 @@ def warn_alias_with_section : Warning< "as the %select{aliasee|resolver}2">, InGroup; +let CategoryName = "Bounds Safety Issue" in { +def err_bounds_safety_lang_not_supported : Error< + "bounds safety is only supported for C">; +def

[clang] [Clang] Emit type metadata on vtables when IRPGO instrumentation option is on. (PR #70841)

2023-11-01 Thread Mingming Liu via cfe-commits
@@ -0,0 +1,145 @@ +// Test that type metadata are emitted with -fprofile-generate +// +// RUN: %clang -fprofile-generate -fno-lto -target x86_64-unknown-linux -emit-llvm -S %s -o - | FileCheck %s --check-prefix=ITANIUM +// RUN: %clang -fprofile-generate -fno-lto -target

[clang] [Clang] Emit type metadata on vtables when IRPGO instrumentation option is on. (PR #70841)

2023-11-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mingming Liu (minglotus-6) Changes The motivating use case is to have type metadata on vtables if IRPGO instrumentation is on (without the requirement of `-fwhole-program-vtables` or `-flto`). A related rfc is in

[clang] [AMDGPU] - Add clang builtins for tied WMMA intrinsics (PR #70669)

2023-11-01 Thread Nicolai Hähnle via cfe-commits
nhaehnle wrote: (removing myself from this PR) https://github.com/llvm/llvm-project/pull/70669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Emit type metadata on vtables when IRPGO instrumentation option is on. (PR #70841)

2023-11-01 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 ready_for_review https://github.com/llvm/llvm-project/pull/70841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-11-01 Thread Michael Buch via cfe-commits
Michael137 wrote: > The DWARFASTParserClang, with the current state of things, will automatically > add the const value initializer to the clang AST field. See > `DWARFASTParserClang::ParseSingleMember(...)` around the `// Handle static > members` around >

[clang] [Clang] Emit type metadata on vtables when IRPGO instrumentation option is on. (PR #70841)

2023-11-01 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 updated https://github.com/llvm/llvm-project/pull/70841 >From 99abebc88c09346bd4a70bbf39df13b249116c09 Mon Sep 17 00:00:00 2001 From: Mingming Liu Date: Tue, 31 Oct 2023 01:17:03 -0700 Subject: [PATCH 1/3] [Clang]Emit type metadata when -fprofile-generate is on

[clang] [Clang] Emit type metadata on vtables when IRPGO instrumentation option is on. (PR #70841)

2023-11-01 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/70841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Emit type metadata on vtables when IRPGO instrumentation option is on. (PR #70841)

2023-11-01 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/70841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   >