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

2023-10-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:4435-4448 struct CallEndCatch final : EHScopeStack::Cleanup { CallEndCatch(bool MightThrow) : MightThrow(MightThrow) {} bool MightThrow; vo

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

2023-10-30 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. > We need to mention this in the docs and the ReleaseNotes since we add a new > flag. > To make this self contained, we need to add a check in the frontend and emit > errors if the compiler find the throwing exception's destructor may throw. > This is not required

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

2023-10-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I'll land this patch next week if there is no objection. This seems very useful to a few parties and the current behavior is opt-in. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108905/new/ https://reviews.llvm.org/D10890

[clang] [clang][Interp] Implement dynamic memory allocation handling (PR #70306)

2023-10-30 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: tbaederr wrote: FYI, this needs https://github.com/llvm/llvm-project/pull/70763, https://github.com/llvm/llvm-project/pull/70763 and https://github.com/llvm/llvm-project

[clang] [clang][analyzer] Add 'tmpfile' as an open function to SimpleStreamChecker (PR #70539)

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

[clang] [clang][Interp] Handle std::move etc. builtins (PR #70772)

2023-10-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Only light testing here since I'm not sure how to properly test this. --- Full diff: https://github.com/llvm/llvm-project/pull/70772.diff 2 Files Affected: - (modified) clang/lib/AST/Interp/InterpBuiltin.c

[clang] [clang][Interp] Handle std::move etc. builtins (PR #70772)

2023-10-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/70772 Only light testing here since I'm not sure how to properly test this. >From b670986c19e412b3c140b610f2c26d957544b23a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 31 Oct 2023 07:17:16

[clang] [Clang][RISCV] Add vcreate intrinsics for RVV non-tuple types (PR #70355)

2023-10-30 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk edited https://github.com/llvm/llvm-project/pull/70355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Fix stack peek offset for This ptr (PR #70663)

2023-10-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/70663 >From dabbb865b01c823dba1cd532ee06e03e7e78631b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 30 Oct 2023 15:32:17 +0100 Subject: [PATCH] [clang][Interp] Fix stack peek offset for This p

[clang] [Clang][RISCV] Add vcreate intrinsics for RVV non-tuple types (PR #70355)

2023-10-30 Thread Yeting Kuo via cfe-commits
@@ -2429,15 +2455,32 @@ let HasMasked = false, HasVL = false, IRName = "" in { SupportOverloading = false, ManualCodegen = [{ { -assert(isa(ResultType)); -unsigned NF = cast(ResultType)->getNumElements(); -llvm::Value *ReturnTuple = llv

[clang] [clang] Use new interpreter in EvaluateAsConstantExpr if requested (PR #70763)

2023-10-30 Thread Timm Baeder via cfe-commits
tbaederr wrote: Bot complains about lines I haven't touched :shrug: https://github.com/llvm/llvm-project/pull/70763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RISCV] Add vcreate intrinsics for RVV non-tuple types (PR #70355)

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

[llvm] [clang-tools-extra] [clang] [DAGCombine] Fold setcc_eq infinity into is.fpclass (PR #67829)

2023-10-30 Thread Qiu Chaofan via cfe-commits
https://github.com/ecnelises edited https://github.com/llvm/llvm-project/pull/67829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Treat empty for/while loops as short loops (PR #70768)

2023-10-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes A for/while loop with only a semicolon as its body should be treated as an empty loop. Fixes #61708. --- Full diff: https://github.com/llvm/llvm-project/pull/70768.diff 2 Files Affected: - (modified) c

[clang] [clang-format] Treat empty for/while loops as short loops (PR #70768)

2023-10-30 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/70768 A for/while loop with only a semicolon as its body should be treated as an empty loop. Fixes #61708. >From 7e6030532f99b4128807631e993609ce40171043 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Mon, 30 Oct 2023

[clang-tools-extra] [clang-tidy] Fix crash in modernize-use-trailing-return-type (PR #70709)

2023-10-30 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/70709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] a396fb2 - [clang-tidy] Fix crash in modernize-use-trailing-return-type (#70709)

2023-10-30 Thread via cfe-commits
Author: Piotr Zegar Date: 2023-10-31T06:52:40+01:00 New Revision: a396fb247e0719f56a830a9e4aab0449be7f843a URL: https://github.com/llvm/llvm-project/commit/a396fb247e0719f56a830a9e4aab0449be7f843a DIFF: https://github.com/llvm/llvm-project/commit/a396fb247e0719f56a830a9e4aab0449be7f843a.diff L

[clang] [clang] Do not clear FP pragma stack when instantiating functions (PR #70646)

2023-10-30 Thread Serge Pavlov via cfe-commits
spavloff wrote: Actually the pragma stack is not saved during template instantiation. It is saved during late template parsing using class `FpPragmaStackSaveRAII`. For template instantiation the dependency on the stack can be considered as an error, because all information about FP options sho

[clang] [clang][analyzer][NFC] Add more tests of 'StreamChecker' about 'tmpfile' (PR #70540)

2023-10-30 Thread Ben Shi via cfe-commits
benshi001 wrote: > The change is good but the title is too general, better is for example > "Update CallDescription in StreamChecker for `tmpfile`", and this is not a > NFC (it fixes a problem). Thanks for your reply. I changed this PR to a pure test supplement. And I will create another PR f

[clang] [clang][analyzer][NFC] Add more tests of 'StreamChecker' about 'tmpfile' (PR #70540)

2023-10-30 Thread Ben Shi via cfe-commits
https://github.com/benshi001 edited https://github.com/llvm/llvm-project/pull/70540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer][NFC] Add more information to CallDescriptions in StreamChecker (PR #70540)

2023-10-30 Thread Ben Shi via cfe-commits
https://github.com/benshi001 updated https://github.com/llvm/llvm-project/pull/70540 >From 323da016fa4fae1254c7c3893c77a60f7d5172aa Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Tue, 31 Oct 2023 13:05:19 +0800 Subject: [PATCH] [clang][analyzer][NFC] Add more tests of 'StreamChecker' about 'tmpf

[clang] [clang] Use new interpreter in EvaluateAsConstantExpr if requested (PR #70763)

2023-10-30 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 e71ed498d0d46af26f72e08706415f21b7deb30e --

[clang] [clang] Use new interpreter in EvaluateAsConstantExpr if requested (PR #70763)

2023-10-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes EvaluateAsConstantExpr() uses ::EvaluateInPlace() directly, which does not use the new interpreter if requested. Do it here, which is the same pattern we use in EvaluateAsInitializer. --- Full diff: https:/

[clang] [clang] Use new interpreter in EvaluateAsConstantExpr if requested (PR #70763)

2023-10-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/70763 EvaluateAsConstantExpr() uses ::EvaluateInPlace() directly, which does not use the new interpreter if requested. Do it here, which is the same pattern we use in EvaluateAsInitializer. >From e71ed498d0d46af26f7

[clang] Remove malformed brief commands in comments (NFC) (PR #70746)

2023-10-30 Thread Timm Baeder via cfe-commits
@@ -1291,20 +1291,20 @@ class TargetInfo : public TransferrableTargetInfo, fillValidCPUList(Values); } - /// brief Determine whether this TargetInfo supports the given CPU name. + /// Determine whether this TargetInfo supports the given CPU name. virtual bool isVali

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

2023-10-30 Thread Timm Baeder via cfe-commits
tbaederr wrote: The other experimental flags I see start with experimental, this one ends with it. Why isn't this called `-fexerimental-bounds-safety`? https://github.com/llvm/llvm-project/pull/70480 ___ cfe-commits mailing list cfe-commits@lists.llvm

[llvm] [clang] [flang] [lldb] [libcxxabi] [mlir] [libcxx] [Clang][LoongArch] Support builtin functions for LSX and LASX (PR #70404)

2023-10-30 Thread via cfe-commits
https://github.com/yjijd closed https://github.com/llvm/llvm-project/pull/70404 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [clang-tidy] fix match for binaryOperator in ExprMutationAnalyzer for misc-const-correctness (PR #70559)

2023-10-30 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > The top-level Linux and Windows tests work, but inside the `Trigger > Build`/`clang-ci` run, the windows test step fails. I'm not sure what the > difference is between these two Windows tests. This is interesting! Generally speaking, AST of the code in Windows and Linux pla

[llvm] [clang-tools-extra] [clang] [Clang][LoongArch] Support builtin functions for LSX and LASX (PR #69313)

2023-10-30 Thread Lu Weining via cfe-commits
https://github.com/SixWeining approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/69313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] create new clang-tidy check to add namespaces to symbol references (PR #70621)

2023-10-30 Thread via cfe-commits
@@ -0,0 +1,24 @@ +.. title:: clang-tidy - readability-use-explicit-namespaces + +readability-use-explicit-namespaces +=== + +This check detects and fixes references to members of namespaces where the namespace is not explicity specified in the refe

[clang-tools-extra] create new clang-tidy check to add namespaces to symbol references (PR #70621)

2023-10-30 Thread via cfe-commits
@@ -0,0 +1,22 @@ +// RUN: %check_clang_tidy %s readability-use-explicit-namespaces %t + daltairwalter wrote: Are there tools or resources for this? I locally have done a lot more testing, but it is very clear how to turn this into test cases. https://github.co

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-30 Thread via cfe-commits
@@ -3553,6 +3553,49 @@ static unsigned getPackIndexForParam(Sema &S, llvm_unreachable("parameter index would not be produced from template"); } +// if `Specialization` is a `CXXConstructorDecl` or `CXXConversionDecl` +// we try to instantiate and update its explicit specifie

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

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

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-30 Thread Younan Zhang via cfe-commits
@@ -3553,6 +3553,49 @@ static unsigned getPackIndexForParam(Sema &S, llvm_unreachable("parameter index would not be produced from template"); } +// if `Specialization` is a `CXXConstructorDecl` or `CXXConversionDecl` +// we try to instantiate and update its explicit specifie

[clang] [clang] Do not clear FP pragma stack when instantiating functions (PR #70646)

2023-10-30 Thread John McCall via cfe-commits
rjmccall wrote: That makes sense. Out of curiosity, since presumably the instantiation path is using the RAII class, and the RAII class seems to save and restore the entire stack, what actually ends up going wrong? It doesn't look like your test case has local changes to the stack within the

[clang-tools-extra] [clang-tidy] Fix crash in modernize-use-trailing-return-type (PR #70709)

2023-10-30 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/70709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix crash in modernize-use-trailing-return-type (PR #70709)

2023-10-30 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM except release note https://github.com/llvm/llvm-project/pull/70709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [flang] [clang-tools-extra] [libcxx] [compiler-rt] [libc] [libc++] Implement ranges::iota (PR #68494)

2023-10-30 Thread James E T Smith via cfe-commits
https://github.com/jamesETsmith updated https://github.com/llvm/llvm-project/pull/68494 >From c4a3ccfbad090ad8314aa8ad53092edc8d5432bc Mon Sep 17 00:00:00 2001 From: James Smith Date: Thu, 28 Sep 2023 10:11:15 -0400 Subject: [PATCH 01/15] [libc++] Implement ranges::iota and ranges::out_value_r

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-30 Thread via cfe-commits
https://github.com/LYP951018 edited https://github.com/llvm/llvm-project/pull/70548 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

[libunwind] Implement libcxx ranges contains (PR #70258)

2023-10-30 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/70258 >From 02e9afd761228f401df4d9f8dfaaca44ffae0c6e Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Thu, 31 Aug 2023 20:08:32 + Subject: [PATCH 01/16] [libc++] Implement ranges::contains Differential Revision

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-10-30 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna created https://github.com/llvm/llvm-project/pull/70749 The document is mostly the exact copy of RFC: Enforcing Bounds Safety in C, except some minor adjustments in the tone to make it more suitable for documentation: https://discourse.llvm.org/t/rfc-enforcing-bound

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

2023-10-30 Thread Bill Wendling via cfe-commits
@@ -859,53 +859,60 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E, unsigned Type, } if (IsDynamic) { -LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel = -getLangOpts().getStrictFlexArraysLevel(); -const Expr *Base = E->IgnoreParenImpCa

[clang] Support target names containing dots in all utilities (PR #65812)

2023-10-30 Thread Dan McGregor via cfe-commits
https://github.com/dankm edited https://github.com/llvm/llvm-project/pull/65812 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support target names containing dots in all utilities (PR #65812)

2023-10-30 Thread Dan McGregor via cfe-commits
https://github.com/dankm edited https://github.com/llvm/llvm-project/pull/65812 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-10-30 Thread Bill Wendling via cfe-commits
@@ -966,9 +962,68 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } -FieldDecl *CodeGenFunction::FindCountedByField( -const Expr *Base, -LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel) { +Expr *CodeGenFunction::BuildC

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

2023-10-30 Thread Bill Wendling via cfe-commits
@@ -966,9 +962,68 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } -FieldDecl *CodeGenFunction::FindCountedByField( -const Expr *Base, -LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel) { +Expr *CodeGenFunction::BuildC

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

2023-10-30 Thread Bill Wendling via cfe-commits
@@ -859,53 +859,60 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E, unsigned Type, } if (IsDynamic) { -LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel = -getLangOpts().getStrictFlexArraysLevel(); -const Expr *Base = E->IgnoreParenImpCa

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

2023-10-30 Thread Bill Wendling via cfe-commits
@@ -966,9 +962,68 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } -FieldDecl *CodeGenFunction::FindCountedByField( -const Expr *Base, -LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel) { +Expr *CodeGenFunction::BuildC

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

2023-10-30 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/70606 >From 19dd7db8ab5f98a618c717944c96b34e604fbc30 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Sun, 29 Oct 2023 14:58:04 -0700 Subject: [PATCH 1/5] [CodeGen] Revamp counted_by calculations Break down the co

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

2023-10-30 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added inline comments. 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 example, depend on the features section for

[clang] c118339 - [clang] Remove no-op ptr-to-ptr bitcasts (NFC)

2023-10-30 Thread Youngsuk Kim via cfe-commits
Author: Youngsuk Kim Date: 2023-10-30T16:51:55-05:00 New Revision: c1183399a8205f83a418f20889776589b3b98d53 URL: https://github.com/llvm/llvm-project/commit/c1183399a8205f83a418f20889776589b3b98d53 DIFF: https://github.com/llvm/llvm-project/commit/c1183399a8205f83a418f20889776589b3b98d53.diff

[clang] Support target names with dots in more utilities (PR #65812)

2023-10-30 Thread Dan McGregor via cfe-commits
dankm wrote: Sounds good. Everything I want is in the pull request, I'm going to create a new pull request to update some tests as we discussed above. I'll update the description to be a bit more clear. Thanks for all help. https://github.com/llvm/llvm-project/pull/65812 _

[clang-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-30 Thread Sang Ik Lee via cfe-commits
silee2 wrote: @antiagainst Thanks for the detailed review and helpful comments! Updated the PR accordingly. https://github.com/llvm/llvm-project/pull/69949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-30 Thread Sang Ik Lee via cfe-commits
silee2 wrote: @antiagainst Thanks for the detailed review and helpful comments! Updated the PR accordingly. https://github.com/llvm/llvm-project/pull/69949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

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

2023-10-30 Thread Nick Desaulniers via cfe-commits
@@ -859,53 +859,60 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E, unsigned Type, } if (IsDynamic) { -LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel = -getLangOpts().getStrictFlexArraysLevel(); -const Expr *Base = E->IgnoreParenImpCa

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

2023-10-30 Thread Nick Desaulniers via cfe-commits
@@ -966,9 +962,68 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } -FieldDecl *CodeGenFunction::FindCountedByField( -const Expr *Base, -LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel) { +Expr *CodeGenFunction::BuildC

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

2023-10-30 Thread Nick Desaulniers via cfe-commits
@@ -966,9 +962,68 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } -FieldDecl *CodeGenFunction::FindCountedByField( -const Expr *Base, -LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel) { +Expr *CodeGenFunction::BuildC

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

2023-10-30 Thread Nick Desaulniers via cfe-commits
@@ -966,9 +962,68 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } -FieldDecl *CodeGenFunction::FindCountedByField( -const Expr *Base, -LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel) { +Expr *CodeGenFunction::BuildC

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

2023-10-30 Thread Nick Desaulniers via cfe-commits
@@ -966,9 +962,68 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } -FieldDecl *CodeGenFunction::FindCountedByField( -const Expr *Base, -LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel) { +Expr *CodeGenFunction::BuildC

[clang] Etiotto.lower gpu to gen.1 (PR #70728)

2023-10-30 Thread Ettore Tiotto via cfe-commits
https://github.com/etiotto closed https://github.com/llvm/llvm-project/pull/70728 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-30 Thread Sang Ik Lee via cfe-commits
@@ -188,4 +188,46 @@ def GpuROCDLAttachTarget: Pass<"rocdl-attach-target", ""> { ]; } +def GpuSPIRVAttachTarget: Pass<"spirv-attach-target", ""> { + let summary = "Attaches an SPIRV target attribute to a GPU Module."; + let description = [{ +This pass searches for all

[clang] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-30 Thread Sang Ik Lee via cfe-commits
@@ -188,4 +188,46 @@ def GpuROCDLAttachTarget: Pass<"rocdl-attach-target", ""> { ]; } +def GpuSPIRVAttachTarget: Pass<"spirv-attach-target", ""> { + let summary = "Attaches an SPIRV target attribute to a GPU Module."; + let description = [{ +This pass searches for all

[clang-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-30 Thread Sang Ik Lee via cfe-commits
@@ -188,4 +188,46 @@ def GpuROCDLAttachTarget: Pass<"rocdl-attach-target", ""> { ]; } +def GpuSPIRVAttachTarget: Pass<"spirv-attach-target", ""> { + let summary = "Attaches an SPIRV target attribute to a GPU Module."; + let description = [{ +This pass searches for all

[clang] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-30 Thread Sang Ik Lee via cfe-commits
@@ -188,4 +188,46 @@ def GpuROCDLAttachTarget: Pass<"rocdl-attach-target", ""> { ]; } +def GpuSPIRVAttachTarget: Pass<"spirv-attach-target", ""> { + let summary = "Attaches an SPIRV target attribute to a GPU Module."; + let description = [{ +This pass searches for all

[clang-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-30 Thread Sang Ik Lee via cfe-commits
@@ -0,0 +1,7 @@ +// RUN: mlir-opt %s --spirv-attach-target='module=spirv.* ver=v1.0 caps=Kernel' | FileCheck %s + +module attributes {gpu.container_module} { +// CHECK: @spirv_module_1 [#spirv.target, resource_limits = <>>] +gpu.module @spirv_module_1 { silee2 w

[clang] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-30 Thread Sang Ik Lee via cfe-commits
@@ -0,0 +1,7 @@ +// RUN: mlir-opt %s --spirv-attach-target='module=spirv.* ver=v1.0 caps=Kernel' | FileCheck %s + +module attributes {gpu.container_module} { +// CHECK: @spirv_module_1 [#spirv.target, resource_limits = <>>] +gpu.module @spirv_module_1 { silee2 w

[clang-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-30 Thread Sang Ik Lee via cfe-commits
@@ -0,0 +1,94 @@ +//===- SPIRVAttachTarget.cpp - Attach an SPIRV target -===// +// +// 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] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-30 Thread Sang Ik Lee via cfe-commits
@@ -0,0 +1,94 @@ +//===- SPIRVAttachTarget.cpp - Attach an SPIRV target -===// +// +// 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-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-30 Thread Sang Ik Lee via cfe-commits
@@ -0,0 +1,94 @@ +//===- SPIRVAttachTarget.cpp - Attach an SPIRV target -===// +// +// 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] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-30 Thread Sang Ik Lee via cfe-commits
@@ -0,0 +1,94 @@ +//===- SPIRVAttachTarget.cpp - Attach an SPIRV target -===// +// +// 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-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-30 Thread Sang Ik Lee via cfe-commits
@@ -0,0 +1,94 @@ +//===- SPIRVAttachTarget.cpp - Attach an SPIRV target -===// +// +// 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] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-30 Thread Sang Ik Lee via cfe-commits
@@ -0,0 +1,94 @@ +//===- SPIRVAttachTarget.cpp - Attach an SPIRV target -===// +// +// 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-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-30 Thread Sang Ik Lee via cfe-commits
@@ -0,0 +1,94 @@ +//===- SPIRVAttachTarget.cpp - Attach an SPIRV target -===// +// +// 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] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-30 Thread Sang Ik Lee via cfe-commits
@@ -0,0 +1,94 @@ +//===- SPIRVAttachTarget.cpp - Attach an SPIRV target -===// +// +// 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-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-30 Thread Sang Ik Lee via cfe-commits
@@ -166,4 +166,35 @@ def SPIRV_ResourceLimitsAttr : SPIRV_Attr<"ResourceLimits", "resource_limits"> { let assemblyFormat = "`<` struct(params) `>`"; } +//===--===// +// SPIRV target attribute. -

[clang] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-30 Thread Sang Ik Lee via cfe-commits
@@ -166,4 +166,35 @@ def SPIRV_ResourceLimitsAttr : SPIRV_Attr<"ResourceLimits", "resource_limits"> { let assemblyFormat = "`<` struct(params) `>`"; } +//===--===// +// SPIRV target attribute. -

[clang-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-30 Thread Sang Ik Lee via cfe-commits
@@ -0,0 +1,30 @@ +//===- Target.h - MLIR SPIRV target registration *- C++ -*-===// silee2 wrote: Done. https://github.com/llvm/llvm-project/pull/69949 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-30 Thread Sang Ik Lee via cfe-commits
@@ -166,4 +166,35 @@ def SPIRV_ResourceLimitsAttr : SPIRV_Attr<"ResourceLimits", "resource_limits"> { let assemblyFormat = "`<` struct(params) `>`"; } +//===--===// +// SPIRV target attribute. +//===---

[clang] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-30 Thread Sang Ik Lee via cfe-commits
@@ -0,0 +1,30 @@ +//===- Target.h - MLIR SPIRV target registration *- C++ -*-===// silee2 wrote: Done. https://github.com/llvm/llvm-project/pull/69949 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-30 Thread Sang Ik Lee via cfe-commits
@@ -166,4 +166,35 @@ def SPIRV_ResourceLimitsAttr : SPIRV_Attr<"ResourceLimits", "resource_limits"> { let assemblyFormat = "`<` struct(params) `>`"; } +//===--===// +// SPIRV target attribute. +//===---

[clang-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-30 Thread Sang Ik Lee via cfe-commits
@@ -188,4 +188,46 @@ def GpuROCDLAttachTarget: Pass<"rocdl-attach-target", ""> { ]; } +def GpuSPIRVAttachTarget: Pass<"spirv-attach-target", ""> { + let summary = "Attaches an SPIRV target attribute to a GPU Module."; silee2 wrote: Done. https://github.co

[clang] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-30 Thread Sang Ik Lee via cfe-commits
@@ -188,4 +188,46 @@ def GpuROCDLAttachTarget: Pass<"rocdl-attach-target", ""> { ]; } +def GpuSPIRVAttachTarget: Pass<"spirv-attach-target", ""> { + let summary = "Attaches an SPIRV target attribute to a GPU Module."; silee2 wrote: Done. https://github.co

[clang-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-30 Thread Sang Ik Lee via cfe-commits
https://github.com/silee2 updated https://github.com/llvm/llvm-project/pull/69949 >From 1a4319cff8d95d5a6a6598f94162be28e56d68a8 Mon Sep 17 00:00:00 2001 From: "Lee, Sang Ik" Date: Mon, 23 Oct 2023 17:23:54 + Subject: [PATCH 1/5] [MLIR] SPIRV Target Attribute Create SPIRV Target Attribute

[clang] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-30 Thread Sang Ik Lee via cfe-commits
https://github.com/silee2 updated https://github.com/llvm/llvm-project/pull/69949 >From 1a4319cff8d95d5a6a6598f94162be28e56d68a8 Mon Sep 17 00:00:00 2001 From: "Lee, Sang Ik" Date: Mon, 23 Oct 2023 17:23:54 + Subject: [PATCH 1/5] [MLIR] SPIRV Target Attribute Create SPIRV Target Attribute

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

2023-10-30 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/ObjCPropertyAttributeOrderFixer.cpp:184 + for (AnnotatedLine *Line : AnnotatedLines) { +if (!Line->Affected || Line->InPPDirective) + continue; Why not `InPPDirective`? CHANGES SINCE LAST ACT

[clang] [CGExprConstant] stop calling into ConstExprEmitter for Reference type destinations (PR #70366)

2023-10-30 Thread Bernhard Rosenkraenzer via cfe-commits
berolinux wrote: Might be good to backport this to 17.x, given the regression was introduced on the 17 branch after 17.0.0 https://github.com/llvm/llvm-project/pull/70366 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

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

2023-10-30 Thread Yeoul Na via cfe-commits
@@ -0,0 +1,5 @@ + +// RUN: %clang -fbounds-safety-experimental -fsyntax-only %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 -fbounds-safety-experimental -fsyntax-only %s 2>&1 | FileCheck %s + +// CHECK: warning: '-fbounds-safety' is ignored for assembly rapidsna wro

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

2023-10-30 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna updated https://github.com/llvm/llvm-project/pull/70480 >From 99ec6e055dd32a86bf6d589a6895658dcbe1d7bd Mon Sep 17 00:00:00 2001 From: Yeoul Na Date: Fri, 27 Oct 2023 08:34:37 -0700 Subject: [PATCH 1/2] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag -f

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

2023-10-30 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/70606 >From 19dd7db8ab5f98a618c717944c96b34e604fbc30 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Sun, 29 Oct 2023 14:58:04 -0700 Subject: [PATCH 1/4] [CodeGen] Revamp counted_by calculations Break down the co

[clang] [clang] Fix clang++ crash on assertions when compiling source (PR #70594)

2023-10-30 Thread Shafik Yaghmour via cfe-commits
@@ -6431,7 +6431,7 @@ static bool HandleConstructorCall(const Expr *E, const LValue &This, // Non-virtual base classes are initialized in the order in the class // definition. We have already checked for virtual base classes. assert(!BaseIt->isVirtual() && "v

[clang] [clang] Fix clang++ crash on assertions when compiling source (PR #70594)

2023-10-30 Thread Shafik Yaghmour via cfe-commits
@@ -0,0 +1,19 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -verify shafik wrote: Normally if we add a new test just for a specific bug report we name it something like `GH35603.cpp` so we can readily identify the test is linked to github issue 35603. If w

[clang] [clang] Fix clang++ crash on assertions when compiling source (PR #70594)

2023-10-30 Thread Shafik Yaghmour via cfe-commits
@@ -0,0 +1,19 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -verify +// RUN: %clang_cc1 -fsyntax-only -std=c++23 %s -verify + +// expected-no-diagnostics + +struct A {}; +using CA = const A; + +struct S1 : CA { shafik wrote: These examples: https://godbolt.o

[clang-tools-extra] [LoopPeeling] Fix weights updating of peeled off branches (PR #70094)

2023-10-30 Thread Matthias Braun via cfe-commits
@@ -636,9 +636,13 @@ static void updateBranchWeights(Instruction *Term, WeightInfo &Info) { MDB.createBranchWeights(Info.Weights)); for (auto [Idx, SubWeight] : enumerate(Info.SubWeights)) if (SubWeight != 0) - Info.Weights[Idx] = Info.Weights[Id

[clang] [LoopPeeling] Fix weights updating of peeled off branches (PR #70094)

2023-10-30 Thread Matthias Braun via cfe-commits
@@ -636,9 +636,13 @@ static void updateBranchWeights(Instruction *Term, WeightInfo &Info) { MDB.createBranchWeights(Info.Weights)); for (auto [Idx, SubWeight] : enumerate(Info.SubWeights)) if (SubWeight != 0) - Info.Weights[Idx] = Info.Weights[Id

[clang] [LoopPeeling] Fix weights updating of peeled off branches (PR #70094)

2023-10-30 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB edited https://github.com/llvm/llvm-project/pull/70094 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LoopPeeling] Fix weights updating of peeled off branches (PR #70094)

2023-10-30 Thread Matthias Braun via cfe-commits
@@ -636,9 +636,13 @@ static void updateBranchWeights(Instruction *Term, WeightInfo &Info) { MDB.createBranchWeights(Info.Weights)); for (auto [Idx, SubWeight] : enumerate(Info.SubWeights)) if (SubWeight != 0) - Info.Weights[Idx] = Info.Weights[Id

[clang-tools-extra] [LoopPeeling] Fix weights updating of peeled off branches (PR #70094)

2023-10-30 Thread Matthias Braun via cfe-commits
@@ -636,9 +636,13 @@ static void updateBranchWeights(Instruction *Term, WeightInfo &Info) { MDB.createBranchWeights(Info.Weights)); for (auto [Idx, SubWeight] : enumerate(Info.SubWeights)) if (SubWeight != 0) - Info.Weights[Idx] = Info.Weights[Id

[clang-tools-extra] [LoopPeeling] Fix weights updating of peeled off branches (PR #70094)

2023-10-30 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB approved this pull request. Seems like a sensible backstop for slightly incorrect profile data leading to extreme branch weights. Added some nitpicks, either way LGTM https://github.com/llvm/llvm-project/pull/70094 ___ cfe-co

[clang-tools-extra] [LoopPeeling] Fix weights updating of peeled off branches (PR #70094)

2023-10-30 Thread Matthias Braun via cfe-commits
@@ -636,9 +636,13 @@ static void updateBranchWeights(Instruction *Term, WeightInfo &Info) { MDB.createBranchWeights(Info.Weights)); for (auto [Idx, SubWeight] : enumerate(Info.SubWeights)) if (SubWeight != 0) - Info.Weights[Idx] = Info.Weights[Id

  1   2   3   4   5   >