[PATCH] D157520: [Driver] Replace a link to openradar with a comment. NFC

2023-08-10 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. It looks like the linker bug has been fixed, but we probably need extensive testing before enabling it on Darwin. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157520/new/ https://reviews.llvm.org/D157520 ___

[PATCH] D157520: [Driver] Replace a link to openradar with a comment. NFC

2023-08-10 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 549165. ahatanak added a comment. Mention that the linker bug has been fixed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157520/new/ https://reviews.llvm.org/D157520 Files: clang/lib/Driver/ToolChains/Cl

[PATCH] D157520: [Driver] Replace a link to openradar with a comment. NFC

2023-08-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: ravikandhadai. ahatanak added a project: clang. Herald added a project: All. ahatanak requested review of this revision. Herald added a subscriber: MaskRay. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D157520 Files:

[PATCH] D147283: [Sema] Search template parameter scopes before searching namespace/file scopes when performing unqualified name lookup

2023-08-02 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147283/new/ https://reviews.llvm.org/D147283 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D156728: [Sema] Ignore nullability qualifiers when deducing types for `auto` and `__auto_type`

2023-07-31 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. I think we still need to do something like what this patch is doing (i.e., drop the nullability qualifiers) when deducing types for `auto` or `__auto_type`, assuming that's the rule we want and we want to restore the previous behavior. I agree with you that we should m

[PATCH] D156728: [Sema] Ignore nullability qualifiers when deducing types for `auto` and `__auto_type`

2023-07-31 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Also, `_Atomic` has the same problem, but it's not clear whether we want to strip the qualifiers. See https://github.com/llvm/llvm-project/issues/63659 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156728/new/ https://rev

[PATCH] D156728: [Sema] Ignore nullability qualifiers when deducing types for `auto` and `__auto_type`

2023-07-31 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:3885 ParamType = ParamType.getUnqualifiedType(); +(void)AttributedType::stripOuterNullability(ParamType); + } This isn't needed to fix the test cases I added, but I thi

[PATCH] D156728: [Sema] Ignore nullability qualifiers when deducing types for `auto` and `__auto_type`

2023-07-31 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: doug.gregor, rjmccall. ahatanak added a project: clang. Herald added a project: All. ahatanak requested review of this revision. Prior to https://reviews.llvm.org/D110216, the deduced types didn't inherit the nullability qualifiers of the

[PATCH] D156576: Remove rdar links in clang/lib. NFC

2023-07-28 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGb08d358e8ac8: Remove private rdar links. NFC (authored by ahatanak). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D156576: Remove rdar links in clang/lib. NFC

2023-07-28 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 545300. ahatanak added a comment. Remove git commit hash in comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156576/new/ https://reviews.llvm.org/D156576 Files: clang/lib/CodeGen/CGObjCMac.cpp clang

[PATCH] D156576: Remove rdar links in clang/lib. NFC

2023-07-28 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: ravikandhadai. ahatanak added a project: clang. Herald added a project: All. ahatanak requested review of this revision. Herald added a subscriber: MaskRay. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D156576 Files:

[PATCH] D147283: [Sema] Search template parameter scopes before searching namespace/file scopes when performing unqualified name lookup

2023-07-26 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147283/new/ https://reviews.llvm.org/D147283 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D143109: [Sema] Push a LambdaScopeInfo before calling SubstDefaultArgument

2023-07-20 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak abandoned this revision. ahatanak added a comment. It looks like a7579b25df78a9f53d62300020d4ae3c4734 fixed the crash. Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D147283: [Sema] Search template parameter scopes before searching namespace/file scopes when performing unqualified name lookup

2023-07-19 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 542165. ahatanak added a comment. Remove unneeded code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147283/new/ https://reviews.llvm.org/D147283 Files: clang/lib/Sema/SemaLookup.cpp clang/test/SemaCXX/n

[PATCH] D147283: [Sema] Search template parameter scopes before searching namespace/file scopes when performing unqualified name lookup

2023-07-19 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/Sema/SemaLookup.cpp:1403 + // Find the innermost file scope, so we can add using directives + // from local scopes. + InnermostFileScope = S; This isn't needed as `InnermostFileScope

[PATCH] D147283: [Sema] Search template parameter scopes before searching namespace/file scopes when performing unqualified name lookup

2023-07-19 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/Sema/SemaLookup.cpp:1392 - if (!VisitedUsingDirectives) { -// Add using directives from this context up to the top level. -for (DeclContext *UCtx = Ctx; UCtx; UCtx = UCtx->getParent()) { --

[PATCH] D147283: [Sema] Search template parameter scopes before searching namespace/file scopes when performing unqualified name lookup

2023-07-19 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 542150. ahatanak added a comment. - Defer collecting using directives until lookup into local scopes is done. - Simplify the second loop. - Add more comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D14728

[PATCH] D155012: Fix types of arm64 MSVC __readx18/__writex18 intrinsics

2023-07-18 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG4ae87b3f8adc: Fix types of arm64 MSVC __readx18/__writex18 intrinsics (authored by ahatanak). Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D155408: [Driver] Also warn about -mwatchos-version-min and -mtvos-version-min

2023-07-17 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak accepted this revision. ahatanak added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155408/new/ https://reviews.llvm.org/D155408 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D155408: [Driver] Also warn about -mwatchos-version-min and -mtvos-version-min

2023-07-17 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/Driver/ToolChains/Darwin.cpp:89 +// Don't reject these -version-min= if we have the appropriate triple. if (T.isiOS()) for (Arg *A : Args.filtered(options::OPT_mios_version_min_EQ)) I just real

[PATCH] D155123: [Driver] Warn about -mios-version-min instead of erroring out when targeting MachO embedded architectures

2023-07-13 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak closed this revision. ahatanak marked 2 inline comments as done. ahatanak added a comment. Thank you for the review. 509d051606e837d1b8291743cd1683cf8c582afc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D155123: [Driver] Warn about -mios-version-min instead of erroring out when targeting MachO embedded architectures

2023-07-12 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: arphaman, t.p.northover, MaskRay. ahatanak added a project: clang. Herald added a subscriber: kristof.beyls. Herald added a project: All. ahatanak requested review of this revision. Sometimes users pass this option when targeting embedded a

[PATCH] D155012: Fix types of arm64 MSVC __readx18/__writex18 intrinsics

2023-07-11 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: ravikandhadai, Bigcheese, steplong. ahatanak added a project: clang. Herald added a subscriber: kristof.beyls. Herald added a project: All. ahatanak requested review of this revision. Herald added a subscriber: wangpc. Using `L` for type `l

[PATCH] D154388: Don't pass -ibuiltininc, which is used only by the driver, to CC1

2023-07-05 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. ahatanak marked an inline comment as done. Closed by commit rGa2b7297dff34: Don't pass -ibuiltininc, which is used only by the driver, to CC1 (authored by ahatanak). C

[PATCH] D154251: Add a flag to disable "duplicate definition of category" warnings

2023-07-03 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGcff99b76ac4f: Add a flag to disable "duplicate definition of category" warnings (authored by ahatanak). Repository: rG LLVM Github Monorepo CHANG

[PATCH] D154388: Don't pass -ibuiltininc, which is used only by the driver, to CC1

2023-07-03 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: arphaman, fahad, MaskRay. ahatanak added a project: clang. Herald added a project: All. ahatanak requested review of this revision. This fixes a fallout from 5b77e752dcd073846b89559d6c0e1a7699e58615

[PATCH] D154251: Add a flag to disable "duplicate definition of category" warnings

2023-06-30 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 536479. ahatanak added a comment. Fix clang/test/Misc/warning-flags.c Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154251/new/ https://reviews.llvm.org/D154251 Files: clang/include/clang/Basic/DiagnosticCo

[PATCH] D154251: Add a flag to disable "duplicate definition of category" warnings

2023-06-30 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: Bigcheese, vsapsai. ahatanak added a project: clang. Herald added a project: All. ahatanak requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D154251 Files: clang/include/clang/Basic/Diagno

[PATCH] D152485: Fix regex in test case so that it doesn't match "coverage" in directory names

2023-06-09 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGde3c01b06fe5: Fix regex in test case so that it doesn't match "coverage" in directory (authored by ahatanak). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D152485: Fix regex in test case so that it doesn't match "coverage" in directory names

2023-06-08 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Example of the test failing: https://green.lab.llvm.org/green/job/coverage/467/consoleText Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152485/new/ https://reviews.llvm.org/D152485 __

[PATCH] D152485: Fix regex in test case so that it doesn't match "coverage" in directory names

2023-06-08 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: tra, MaskRay. ahatanak added a project: clang. Herald added a subscriber: wenlei. Herald added a project: All. ahatanak requested review of this revision. The test case was failing because "-f{{[^"]*coverage.*}}" was matching the following

[PATCH] D152303: [ExprConstant] fix ICE from Evaluate on _Atomic structs

2023-06-08 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak accepted this revision. ahatanak added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152303/new/ https://reviews.llvm.org/D152303 ___

[PATCH] D151587: [clang][ConstantEmitter] have tryEmitPrivateForVarInit try ConstExprEmitter fast-path first

2023-06-06 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In D151587#4397499 , @nickdesaulniers wrote: > In D151587#4397446 , @efriedma > wrote: > >> The following also crashes, with no MaterializeTemporaryExpr involved. >> >> struct X { >>

[PATCH] D151523: [ASTStructuralEquivalence] Fix crash when ObjCCategoryDecl doesn't have corresponding ObjCInterfaceDecl.

2023-06-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In D151523#4374808 , @vsapsai wrote: > Kinda a follow-up to D121176 . > > One big alternative that I've considered is to store interface name in > `ObjCCategoryDecl` because when we parse `@inte

[PATCH] D151172: [CodeGen] Fix the type of the constant that is used to zero-initialize a flexible array member

2023-05-23 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6796053723a6: [CodeGen] Fix the type of the constant that is used to zero-initialize a (authored by ahatanak). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D151172: [CodeGen] Fix the type of the constant that is used to zero-initialize a flexible array member

2023-05-23 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 524746. ahatanak added a comment. Fix the desired type of incomplete arrays that is passed to `EmitArrayConstant`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151172/new/ https://reviews.llvm.org/D151172 Fi

[PATCH] D151172: [CodeGen] Fix the type of the constant that is used to zero-initialize a flexible array member

2023-05-22 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: efriedma, aaron.ballman, rjmccall. ahatanak added a project: clang. Herald added a project: All. ahatanak requested review of this revision. `EmitArrayConstant` was incorrectly returning a zeroinitializer of zero-element array type when th

[PATCH] D123649: Allow flexible array initialization in C++.

2023-05-22 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Looks like `Init`'s type is wrong. It should be `{ i32, [1 x i32] }` instead of `{ i32, [0 x i32] }` in the case where `S` has two members. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123649/new/ https://reviews.llvm.or

[PATCH] D123649: Allow flexible array initialization in C++.

2023-05-22 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. The assertion also fails when the following code is compiled: struct S { int i[]; }; S value{0}; According to C99, flexible array members have to belong to structs that have more than one named member. But clang allows that as a GNU extension although gcc seems to

[PATCH] D123649: Allow flexible array initialization in C++.

2023-05-22 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. We found another case where the assertion fails. $ cat test.cpp struct S { int len; int i[]; }; S value{0, 0}; $ clang++ -std=c++11 -c test.cpp `CstSize` is only 4 while `VarSize` is 8. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D148851: Disable llvm-symbolizer on some of the driver tests that are timing out

2023-05-19 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148851/new/ https://reviews.llvm.org/D148851 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D148851: Disable llvm-symbolizer on some of the driver tests that are timing out

2023-05-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 520861. ahatanak added a comment. Disable `llvm-symbolizer` individually. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148851/new/ https://reviews.llvm.org/D148851 Files: clang/test/Driver/crash-diagnostic

[PATCH] D148851: Disable llvm-symbolizer on some of the driver tests that are timing out

2023-05-08 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In D148851#4328345 , @shafik wrote: > In D148851#4328084 , @dblaikie > wrote: > >> In D148851#4311266 , @ahatanak >> wrote: >> >>> Disable llvm

[PATCH] D148851: Disable llvm-symbolizer on some of the driver tests that are timing out

2023-05-01 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 518630. ahatanak added a comment. Enable llvm-symbolizer when running disable-crash-reports.test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148851/new/ https://reviews.llvm.org/D148851 Files: llvm/test/

[PATCH] D148851: Disable llvm-symbolizer on some of the driver tests that are timing out

2023-05-01 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 518610. ahatanak added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Disable llvm-symbolizer when running lit tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148851/new/

[PATCH] D148851: Disable llvm-symbolizer on some of the driver tests that are timing out

2023-04-20 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. These tests are all timing out after 600 seconds. https://green.lab.llvm.org/green/job/clang-stage1-RA/34005/#showFailuresLink Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148851/new/ https://reviews.llvm.org/D148851 __

[PATCH] D148851: Disable llvm-symbolizer on some of the driver tests that are timing out

2023-04-20 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: delcypher, MaskRay, dblaikie. ahatanak added a project: clang. Herald added a project: All. ahatanak requested review of this revision. These tests don't require invoking llvm-symbolizer. Repository: rG LLVM Github Monorepo https://rev

[PATCH] D147263: Fix an assertion failure in unwrapSugar

2023-04-12 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG2ba88443b31a: Fix an assertion failure in unwrapSugar (authored by ahatanak). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D147263: Fix an assertion failure in unwrapSugar

2023-04-12 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 513010. ahatanak marked an inline comment as done. ahatanak added a comment. Simplify test case and move it to clang/test/SemaCXX/sugar-common-types.cpp. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147263/new

[PATCH] D147263: Fix an assertion failure in unwrapSugar

2023-04-11 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147263/new/ https://reviews.llvm.org/D147263 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D143813: [ClangFE] Check that __sync builtins are naturally aligned.

2023-04-11 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In D143813#4257943 , @jonpa wrote: > I don't understand the first argument - I thought it was supposed to be just > an address... It's a statement expression. https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html The value

[PATCH] D143813: [ClangFE] Check that __sync builtins are naturally aligned.

2023-04-10 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. I think this patch is causing the assertion in `CodeGenFunction::setAddrOfLocalVar` to fail when the following code is compiled: void foo(unsigned long long t) { __sync_bool_compare_and_swap(({int x = 1; &t;}), t, t); } Could you take a look? Repository: r

[PATCH] D147283: [Sema] Search template parameter scopes before searching namespace/file scopes when performing unqualified name lookup

2023-03-30 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: rsmith, aaron.ballman. ahatanak added a project: clang. Herald added a project: All. ahatanak requested review of this revision. This fixes a bug where namespace scopes were being searched before template parameter scopes. Delay searching

[PATCH] D147263: Fix an assertion failure in unwrapSugar

2023-03-30 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: mizvekov, arphaman, fahad. ahatanak added a project: clang. Herald added a project: All. ahatanak requested review of this revision. An assertion in `Qualifiers::addObjCLifetime` fails when the ObjC lifetime bits are already set. Instead

[PATCH] D144981: [Driver] Allow to collect `-save-stats` data to a file specified in the environment variable.

2023-03-13 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak accepted this revision. ahatanak added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144981/new/ https://reviews.llvm.org/D144981 ___

[PATCH] D83906: [CodeGen] Emit a call instruction instead of an invoke if the called llvm function is marked nounwind

2023-03-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. clang marks the called function `foo` in p1.cpp as nounwind here: https://github.com/llvm/llvm-project/blob/main/clang/lib/CodeGen/CodeGenFunction.cpp#L1284 clang can also mark a function declaration as nounwind based on the information in the source code, for example,

[PATCH] D144981: [Driver] Allow to collect `-save-stats` data to a file specified in the environment variable.

2023-03-07 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/test/Driver/save-stats.c:26 // CHECK-LTO: "-plugin-opt=stats-file=save-stats.stats" +// CHECK-LTO: "-plugin-opt=-stats-file-append" ahatanak wrote: > Doesn't this require `stats-file-append` to be supported by

[PATCH] D144981: [Driver] Allow to collect `-save-stats` data to a file specified in the environment variable.

2023-03-07 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/test/Driver/save-stats.c:26 // CHECK-LTO: "-plugin-opt=stats-file=save-stats.stats" +// CHECK-LTO: "-plugin-opt=-stats-file-append" Doesn't this require `stats-file-append` to be supported by the plugin just l

[PATCH] D144981: [Driver] Allow to collect `-save-stats` data to a file specified in the environment variable.

2023-02-28 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/Frontend/CompilerInstance.cpp:1093 +StatsFile, EC, +llvm::sys::fs::OF_Append | llvm::sys::fs::OF_TextWithCRLF); if (EC) { `OF_Append` is necessary when the results are written to a single

[PATCH] D144686: [CodeGen] Remove the template specialization of `Address` that stores alignment information into pointers

2023-02-24 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe419e22ff6fd: [CodeGen] Stop storing alignment information into pointers in Address (authored by ahatanak). Repository: rG LLVM Github Monorepo C

[PATCH] D144686: [CodeGen] Remove the template specialization of `Address` that stores alignment information into pointers

2023-02-24 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 500222. ahatanak added a comment. Remove AddressImpl altogether. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144686/new/ https://reviews.llvm.org/D144686 Files: clang/lib/CodeGen/Address.h Index: clang/l

[PATCH] D144686: [CodeGen] Remove the template specialization of `Address` that stores alignment information into pointers

2023-02-23 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. I don't have a test case for this change because there is a bug that prevents using the maximum allowed alignment (see https://github.com/llvm/llvm-project/issues/60752). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1446

[PATCH] D144686: [CodeGen] Remove the template specialization of `Address` that stores alignment information into pointers

2023-02-23 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: aeubanks, efriedma, rjmccall. ahatanak added a project: clang. Herald added a project: All. ahatanak requested review of this revision. This fixes a bug introduced in https://reviews.llvm.org/D142584. The patch reduced the number of bits u

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-02-17 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/CodeGen/Address.h:67 return; -// Currently the max supported alignment is much less than 1 << 63 and is +// Currently the max supported alignment is much less than 1 << 32 and is // guaranteed to be a power

[PATCH] D144016: [Sema] Relax a failing assertion in TransformBlockExpr

2023-02-16 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGcda4a0e918b5: [Sema] Relax a failing assertion in TransformBlockExpr (authored by ahatanak). Changed prior to commit: https://reviews.llvm.org/D14

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-02-16 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/CodeGen/Address.h:67 return; -// Currently the max supported alignment is much less than 1 << 63 and is +// Currently the max supported alignment is much less than 1 << 32 and is // guaranteed to be a power

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-02-16 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a subscriber: aeubanks. ahatanak added inline comments. Comment at: clang/lib/CodeGen/Address.h:67 return; -// Currently the max supported alignment is much less than 1 << 63 and is +// Currently the max supported alignment is much less than 1 << 32

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-02-15 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/CodeGen/Address.h:67 return; -// Currently the max supported alignment is much less than 1 << 63 and is +// Currently the max supported alignment is much less than 1 << 32 and is // guaranteed to be a power

[PATCH] D144016: [Sema] Relax a failing assertion in TransformBlockExpr

2023-02-15 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 497776. ahatanak added a comment. Add triple to the test and add release note for the fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144016/new/ https://reviews.llvm.org/D144016 Files: clang/docs/Releas

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-02-15 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG57865bc5ad27: [CodeGen] Add a flag to `Address` and `Lvalue` that is used to keep (authored by ahatanak). Repository: rG LLVM Github Monorepo CHA

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-02-15 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 497719. ahatanak added a comment. Fix type and add comment. Remove unnecessary cast. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142584/new/ https://reviews.llvm.org/D142584 Files: clang/lib/CodeGen/Addre

[PATCH] D143109: [Sema] Push a LambdaScopeInfo before calling SubstDefaultArgument

2023-02-15 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. @tahonermann @cor3ntin have you had a chance to take a look at the updated patch? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143109/new/ https://reviews.llvm.org/D143109 ___

[PATCH] D144016: [Sema] Relax a failing assertion in TransformBlockExpr

2023-02-14 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 497530. ahatanak added a comment. Add comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144016/new/ https://reviews.llvm.org/D144016 Files: clang/lib/Sema/TreeTransform.h clang/test/CodeGenCXX/cxx1z-

[PATCH] D144016: [Sema] Relax a failing assertion in TransformBlockExpr

2023-02-14 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: arphaman, fahad, aaron.ballman. ahatanak added a project: clang. Herald added a project: All. ahatanak requested review of this revision. The assertion fails when the expression causing the this pointer to be captured is part of a constexp

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-02-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:1723 + Addr = + Addr.withPointer(Builder.CreateThreadLocalAddress(GV), KnownNonNull); ahatanak wrote: > `KnownNonNull` is being passed here because the address of a load must

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-02-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 496305. ahatanak added a comment. - Set the `KnownNonNull` bit correctly when `Address::withAlignment` is called. - Pass `NotKnownNonNull` to the call to `Addr.withPointer` when the address of thread local storage is created. Repository: rG LLVM Github M

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-02-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:1723 + Addr = + Addr.withPointer(Builder.CreateThreadLocalAddress(GV), KnownNonNull); `KnownNonNull` is being passed here because the address of a load must be non-null. Do

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-02-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/CodeGen/Address.h:65 : Pointer(Pointer), ElementType(ElementType) { if (Alignment.isZero()) return; efriedma wrote: > Do you need to do something with IsKnownNonNull in the `Alignment.isZero

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-02-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 496132. ahatanak marked 4 inline comments as done. ahatanak added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142584/new/ https://reviews.llvm.org/D142584 Files: clang/

[PATCH] D143109: [Sema] Push a LambdaScopeInfo before calling SubstDefaultArgument

2023-02-07 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. I agree that pushing an empty scope without initializing any of its members seems wrong. Instead of doing that, the updated patch changes the decl context instead if we are trying to capture a variable in a default argument expression of a lambda call operator. I thin

[PATCH] D143109: [Sema] Push a LambdaScopeInfo before calling SubstDefaultArgument

2023-02-07 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 495619. ahatanak added a comment. Fix indentation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143109/new/ https://reviews.llvm.org/D143109 Files: clang/lib/Sema/SemaExpr.cpp clang/test/SemaCXX/lambda-d

[PATCH] D143109: [Sema] Push a LambdaScopeInfo before calling SubstDefaultArgument

2023-02-07 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 495615. ahatanak marked an inline comment as done. ahatanak added a comment. Instead of pushing an empty lambda scope, switch to the enclosing context if the variable is used in a default argument expression of a lambda call operator. Repository: rG LLV

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-02-06 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. @efriedma do you have any comments? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142584/new/ https://reviews.llvm.org/D142584 ___ cfe-commits mailing list cfe-commits@lists.llv

[PATCH] D143109: [Sema] Push a LambdaScopeInfo before calling SubstDefaultArgument

2023-02-02 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. I'm still don't understand what the problem is about cleaning up the lambda scope. `PushLambdaScope` creates a new `LambdaScopeInfo` and pushes onto `FunctionScopes`. https://github.com/llvm/llvm-project/blob/main/clang/lib/Sema/Sema.cpp#L2137 When `Sema::FunctionScop

[PATCH] D143109: [Sema] Push a LambdaScopeInfo before calling SubstDefaultArgument

2023-02-01 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Doesn't `Sema::FunctionScopeRAII` pop the lambda scope when it goes out of scope? https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Sema/Sema.h#L5042 I also tried instantiating the default arguments after the call to `BuildLambdaExpr` using `LSICopy`

[PATCH] D143109: [Sema] Push a LambdaScopeInfo before calling SubstDefaultArgument

2023-02-01 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: tahonermann, erichkeane, aaron.ballman, shafik, Bigcheese, arphaman. ahatanak added a project: clang. Herald added a project: All. ahatanak requested review of this revision. This is needed to fix https://github.com/llvm/llvm-project/issue

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-01-27 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 492940. ahatanak added a comment. Pass a `KnownNonNull_t` flag to `Address::withPointer`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142584/new/ https://reviews.llvm.org/D142584 Files: clang/lib/CodeGen/

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-01-27 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/CodeGen/Address.h:146 +return Address(NewPointer, getElementType(), getAlignment(), + isKnownNonNull()); } This isn't safe. We cannot tell whether the new pointer is non-null or not b

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-01-27 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 492860. ahatanak added a comment. Fix a few typos that were causing compile errors. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142584/new/ https://reviews.llvm.org/D142584 Files: clang/lib/CodeGen/Addres

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-01-27 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. There are more places where we know contextually the pointer can't be null and can set the bit to `KnownNonNull` or set the bit of an `LValue` or `Address` using an existing `Address`'s KnownNonNull bit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-01-27 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 492843. ahatanak added a comment. Add a bit to `Address` and `LValue` that tracks whether the pointer is known not to be null. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142584/new/ https://reviews.llvm.or

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-01-26 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/CodeGen/Address.h:97 + llvm::Value * + getPointer(KnownNonNull_t KnownNonNull = KnownNonNull_t::False) const { assert(isValid()); rjmccall wrote: > Apologies if this rehashes a conversation we had earli

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-01-25 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: rjmccall, ab, efriedma. ahatanak added a project: clang. Herald added a subscriber: kristof.beyls. Herald added a project: All. ahatanak requested review of this revision. The flag will be used for the arm64e work we plan to upstream in the

[PATCH] D137944: [ObjC][ARC] Teach the OptimizeSequences step of ObjCARCOpts about WinEH funclet tokens

2023-01-23 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak accepted this revision. ahatanak added a comment. This revision is now accepted and ready to land. I'm not familiar with the WinEH stuff, but the other parts (the code that adds bundles, etc.) LGTM. Comment at: llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp:597 + as

[PATCH] D137996: Add support for a backdoor driver option that enables emitting header usage information in JSON to a file

2023-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/tools/driver/driver.cpp:251 + std::string &OptFile) { + T OptVal = ::getenv(EnvOptSet); + if (OptVal) { SeanP wrote: > This change is not POSIX compliant. If T is char *, the next call to >

[PATCH] D127442: [Sema] Fix a bug where clang doesn't detect uses of unavailable decls in C++ base or member initializers

2023-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG143ec502e985: [Sema] Fix a bug where clang doesn't detect uses of unavailable decls (authored by ahatanak). Repository: rG LLVM Github Monorepo C

[PATCH] D136639: [CodeGen][ObjC] Fix a memory leak that occurs when a non-trivial C struct property is set using dot notation

2023-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGea0cd51a4958: [CodeGen][ObjC] Fix a memory leak that occurs when a non-trivial C (authored by ahatanak). Repository: rG LLVM Github Monorepo CHAN

[PATCH] D136639: [CodeGen][ObjC] Fix a memory leak that occurs when a non-trivial C struct property is set using dot notation

2023-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In D136639#4006953 , @rjmccall wrote: > Oh, I see. That's a really unfortunate way to end up emitting this code > pattern, since ignoring the result is so common. To fix that, we'd have to > either figure out the result was u

[PATCH] D139713: [Sema] Fix crash when evaluating nested call with value-dependent arg

2023-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak accepted this revision. ahatanak added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139713/new/ https://reviews.llvm.org/D139713 _

[PATCH] D136639: [CodeGen][ObjC] Fix a memory leak that occurs when a non-trivial C struct property is set using dot notation

2022-12-19 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/test/CodeGenObjC/nontrivial-c-struct-property.m:89 + +// CHECK: call void @__destructor_8_s0(ptr %[[AGG_TMP_ENSURED]]) + rjmccall wrote: > ahatanak wrote: > > rjmccall wrote: > > > It looks like we're copying `a`

  1   2   3   4   5   6   7   8   9   10   >