[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-13 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 521962. junaire added a comment. Add macro guard. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpreter.h clang/inclu

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-14 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 521981. junaire added a comment. - include to avoid incorrect lookup on Windows - Add `-Xcc -fno-delayed-template-parsing` to fix failure on Windows Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ ht

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-14 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 521985. junaire added a comment. Make and use our own std::void_t Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpreter

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-16 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 522527. junaire added a comment. Add comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/Interpreter/Interpreter.h clang/include/c

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-16 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 522530. junaire added a comment. Address comment from Vassil, thx Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/Interpreter/Interpreter

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-16 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 522545. junaire added a comment. remove whitespace Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/Interpreter/Interpreter.h clang/incl

[PATCH] D148997: [clang] Add a new annotation token: annot_repl_input_end

2023-05-16 Thread Jun Zhang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG247fa04116a6: [clang] Add a new annotation token: annot_repl_input_end (authored by junaire). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148997/new/ http

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-16 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. Because I have edited the commit messages several times so I forgot to include the revision link. Sorry. I have landed it as https://reviews.llvm.org/rGa423b7f1d7ca8b263af85944f57a69aa08fc942c Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[PATCH] D150937: [clang-repl] Disable all tests on unsupported platforms

2023-05-19 Thread Jun Zhang via Phabricator via cfe-commits
junaire created this revision. Herald added a project: All. junaire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Signed-off-by: Jun Zhang Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D150937 Files: clang/unittest

[PATCH] D150937: [clang-repl] Disable all tests on unsupported platforms

2023-05-19 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 523697. junaire added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150937/new/ https://reviews.llvm.org/D150937 Files: clang/test/Interpreter/incremental-mode.cpp clang/unittests/Interpreter/

[PATCH] D148997: [clang] Add a new annotation token: annot_repl_input_end

2023-04-22 Thread Jun Zhang via Phabricator via cfe-commits
junaire created this revision. Herald added a project: All. junaire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch is the first part of the below RFC: https://discourse.llvm.org/t/rfc-handle-execution-results-in-clang-repl/68493

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-22 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 516080. junaire added a comment. Break the IsSemiMissing/ repl_input_end parts out from the Value part Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-22 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 516081. junaire added a comment. Rebuild, please. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/Interpreter/Interpreter.h clang/inclu

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-28 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 517829. junaire added a comment. fix windows buildbots Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/Interpreter/Interpreter.h clang/

[PATCH] D148997: [clang] Add a new annotation token: annot_repl_input_end

2023-04-28 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. This patch is part of D141215 . I split it as some jit people requested. I don't know if there's a good way to test the patch, please leave a comment if you have an idea. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D148997: [clang] Add a new annotation token: annot_repl_input_end

2023-04-28 Thread Jun Zhang via Phabricator via cfe-commits
junaire added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:7219 void CodeGenModule::moveLazyEmissionStates(CodeGenModule *NewBuilder) { - assert(DeferredDeclsToEmit.empty() && - "Should have emitted all decls deferred to emit."); + // FIXME: Re-enab

[PATCH] D146809: [WIP][clang-repl] Implement Value pretty printing

2023-04-28 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 517836. junaire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpreter.h clang/include/clang/I

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-29 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518166. junaire marked 4 inline comments as done. junaire added a comment. Partially address some comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: cl

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-29 Thread Jun Zhang via Phabricator via cfe-commits
junaire added inline comments. Comment at: clang/include/clang/Interpreter/Interpreter.h:96 + + size_t getEffectivePTUSize() const; + aaron.ballman wrote: > It looks like this can be private? > > Also, just a note (not something you have to deal with in this re

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-29 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518265. junaire added a comment. Add unittests for void & member pointers types Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/Interpret

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-04-29 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518266. junaire added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpreter.h clang/include/clang/Interp

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-30 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518285. junaire marked 3 inline comments as done. junaire added a comment. Only enable __clang_Interpreter_SetValueCopyArr support in C++ mode. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://

[PATCH] D148209: Add baseline tests for D148210

2023-04-30 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518286. junaire added a comment. Herald added subscribers: cfe-commits, mstorsjo. Herald added a project: clang. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148209/new/ https://reviews.llvm.org/D148209 Fil

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-04-30 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518287. junaire added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpreter.h clang/include/clang/Interp

[PATCH] D148209: Add baseline tests for D148210

2023-04-30 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518288. junaire added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148209/new/ https://reviews.llvm.org/D148209 Files: llvm/test/Transforms/InstCombine/icmp.ll Index: llvm/test/Transforms/Inst

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-04-30 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518289. junaire added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpreter.h clang/include/clang/Interp

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-04-30 Thread Jun Zhang via Phabricator via cfe-commits
junaire added inline comments. Comment at: clang/test/Interpreter/pretty-print.cpp:107 +p2 +// CHECK-NEXT: (std::_MakeUniq::__single_object &) std::unique_ptr -> [[Addr:@0x.*]] + Hi @mizvekov, do you have a clue about why it doesn't print the correct type? So i

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-30 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518290. junaire added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/Interpreter/Interpreter.h clang/include/clang/Interp

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-30 Thread Jun Zhang via Phabricator via cfe-commits
junaire added inline comments. Comment at: clang/include/clang/Interpreter/Value.h:121 +static T cast(const Value &V) { + if (V.isPointerOrObjectType()) +return (T)(uintptr_t)V.getAs(); aaron.ballman wrote: > v.g.vassilev wrote: > > aaron.ballman

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-30 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518292. junaire added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/Interpreter/Interpreter.h clang/include/clang/Interp

[PATCH] D148997: [clang] Add a new annotation token: annot_repl_input_end

2023-05-01 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518448. junaire added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148997/new/ https://reviews.llvm.org/D148997 Files: clang/include/clang/AST/Decl.h clang/include/clang/Basic/TokenKinds.def

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-01 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518450. junaire added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/Interpreter/Interpreter.h clang/include/clang/Interp

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-01 Thread Jun Zhang via Phabricator via cfe-commits
junaire marked an inline comment as done. junaire added inline comments. Comment at: clang/lib/Interpreter/Interpreter.cpp:211 +void __clang_Interpreter_SetValueNoAlloc(void*,void*,void*,unsigned long long); +template +void __clang_Interpreter_SetValueCopyArr(T* Src

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-01 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518458. junaire added a comment. Fix AutoType sugar Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpreter.h clang/inc

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-01 Thread Jun Zhang via Phabricator via cfe-commits
junaire added inline comments. Comment at: clang/test/Interpreter/pretty-print.cpp:107 +p2 +// CHECK-NEXT: (std::_MakeUniq::__single_object &) std::unique_ptr -> [[Addr:@0x.*]] + junaire wrote: > Hi @mizvekov, do you have a clue about why it doesn't print the co

[PATCH] D148997: [clang] Add a new annotation token: annot_repl_input_end

2023-05-02 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518738. junaire marked 3 inline comments as done. junaire added a comment. Address comments, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148997/new/ https://reviews.llvm.org/D148997 Files: clang/in

[PATCH] D148997: [clang] Add a new annotation token: annot_repl_input_end

2023-05-02 Thread Jun Zhang via Phabricator via cfe-commits
junaire added inline comments. Comment at: clang/lib/Interpreter/IncrementalParser.cpp:162 + if (P->getCurToken().is(tok::annot_repl_input_end)) { +P->ConsumeAnyToken(); // FIXME: Clang does not call ExitScope on finalizing the regular TU, we rsmith wro

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-02 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518952. junaire marked 16 inline comments as done. junaire added a comment. Address comments from @aaron.ballman, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D1412

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-02 Thread Jun Zhang via Phabricator via cfe-commits
junaire added inline comments. Comment at: clang/include/clang/Interpreter/Value.h:46 + +#define REPL_BUILTIN_TYPES \ + X(bool, Bool) \ aaron.bal

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-02 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518960. junaire marked 2 inline comments as done. junaire added a comment. Add more comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/c

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-02 Thread Jun Zhang via Phabricator via cfe-commits
junaire added inline comments. Comment at: clang/include/clang/Interpreter/Interpreter.h:59 + + Value LastValue; v.g.vassilev wrote: > aaron.ballman wrote: > > I think I'm surprised to see this as a data member of `Interpreter` but > > mostly because my brain

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-02 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518961. junaire added a comment. Fix typos Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/Interpreter/Interpreter.h clang/include/clan

[PATCH] D117829: [Clang] Add integer add/mul reduction builtins

2022-01-21 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. > @junaire has been looking into this and put up D117480 > as an option to extend the intrinsic to > have a dedicated order argument. Hi @fhahn, I wonder if we should continue working on this as I remember one of the reviewers was dou

[PATCH] D119609: [Clang][Sema] Don't act on ReturnStmt when parsing the lambda declarator.

2022-02-17 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. gentle ping~ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119609/new/ https://reviews.llvm.org/D119609 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[PATCH] D119949: [Clang-tidy] Check the existence of ElaboratedType's qualifiers

2022-02-22 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. Gentle ping~ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119949/new/ https://reviews.llvm.org/D119949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[PATCH] D119609: [Clang][Sema] Don't act on ReturnStmt when parsing the lambda declarator.

2022-02-25 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. In D119609#3331257 , @junaire wrote: > gentle ping~ Gentle ping~ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119609/new/ https://reviews.llvm.org/D119609 __

[PATCH] D119949: [Clang-tidy] Check the existence of ElaboratedType's qualifiers

2022-02-28 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. In D119949#3338818 , @junaire wrote: > Gentle ping~ Gentle ping~ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119949/new/ https://reviews.llvm.org/D119949 __

[PATCH] D119949: [Clang-tidy] Check the existence of ElaboratedType's qualifiers

2022-03-01 Thread Jun Zhang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGac616fbb05b8: [Clang-tidy] Check the existence of ElaboratedType's qualifiers (authored by junaire). Changed prior to commit: https://reviews.llvm.org/D119949?vs=409511&id=412111#toc Repository: rG L

[PATCH] D119609: [Clang][Sema] Don't act on ReturnStmt when parsing the lambda declarator.

2022-03-02 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. In D119609#3355368 , @erichkeane wrote: > Does this break a case like this? https://godbolt.org/z/Tc9Ko7hWY No, after applying the patch, clang accepts the code just like gcc > it seems the problem is with the Expression statem

[PATCH] D119609: [Clang][Sema] Don't act on ReturnStmt when parsing the lambda declarator.

2022-03-02 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. Frankly speaking, this is really a randomly written patch, and I have never thought it would raise so much concern. But I believe I can handle it if you guys can give me some trust and little guidance! <3 In D119609#3355409 , @a

[PATCH] D119609: [Clang][Sema] Don't act on ReturnStmt when parsing the lambda declarator.

2022-03-04 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 413195. junaire added a comment. This update proibit any use of ({}) in the default argument. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119609/new/ https://reviews.llvm.org/D119609 Files: clang/include/c

[PATCH] D119609: [Clang][Sema] Don't act on ReturnStmt when parsing the lambda declarator.

2022-03-08 Thread Jun Zhang via Phabricator via cfe-commits
junaire added inline comments. Comment at: clang/test/Sema/err-expr-stmt-in-default-arg.cpp:19 + return bar(l); +} erichkeane wrote: > For completeness, I'd like to see an > in-function-defined-struct-member-function test here as well. > > As for the above que

[PATCH] D116161: [Clang] Extend emitUnaryBuiltin to avoid duplicate logic.

2022-01-04 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. In D116161#3219080 , @fhahn wrote: > @junaire please let me know if you want me to land this on your behalf. Yeah, thanks a lot! You can use: Jun Zhang j...@junz.org Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D115429: [Clang] Implement the rest of __builtin_elementwise_* functions.

2022-01-04 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 397260. junaire added a comment. rebase to main. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115429/new/ https://reviews.llvm.org/D115429 Files: clang/include/clang/Basic/Builtins.def clang/lib/CodeGen/C

[PATCH] D115429: [Clang] Implement the rest of __builtin_elementwise_* functions.

2022-01-04 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. In D115429#3219338 , @fhahn wrote: > This now needs a rebase after landing 5c57e6aa5777 > , then > it should be good to go. Well, I just found that you seem t

[PATCH] D116161: [Clang] Extend emitUnaryBuiltin to avoid duplicate logic.

2022-01-04 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. In D116161#3219343 , @fhahn wrote: > In D116161#3219149 , @junaire wrote: > >> In D116161#3219080 , @fhahn wrote: >> >>> @junaire please let me kn

[PATCH] D115429: [Clang] Implement the rest of __builtin_elementwise_* functions.

2022-01-05 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. In D115429#3219563 , @fhahn wrote: > LGTM, thanks! May I ask you to help me to land this patch? I plan to request commit access after this one. Thanks a lot! ;D Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D115936: [Clang] Add isInNamespace() to check if a Decl in a specific namespace

2022-01-06 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 397842. junaire added a comment. After Aarron's comments, I realize what I really want to do is add a new ASTMatcher that matches declarations what in the top level namespace like std. This update fixed previous broken one, added some comments and unit tests.

[PATCH] D116736: [Clang] Add __builtin_reduce_or and __builtin_reduce_and

2022-01-06 Thread Jun Zhang via Phabricator via cfe-commits
junaire created this revision. junaire added a reviewer: fhahn. junaire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch implements two builtins specified in D111529 . The last __builtin_reduce_a

[PATCH] D116736: [Clang] Add __builtin_reduce_or and __builtin_reduce_and

2022-01-10 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 398838. junaire added a comment. fix the comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116736/new/ https://reviews.llvm.org/D116736 Files: clang/include/clang/Basic/Builtins.def clang/lib/CodeGen/

[PATCH] D116736: [Clang] Add __builtin_reduce_or and __builtin_reduce_and

2022-01-12 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. In D116736#3230040 , @fhahn wrote: > LGTM, thanks! > >> The last __builtin_reduce_add will be separated into another one. > > Are you planning on putting up a patch for this one as well? What makes add a > bit different is that `

[PATCH] D116736: [Clang] Add __builtin_reduce_or and __builtin_reduce_and

2022-01-13 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. > @junaire did you already get commit access or should I commit this change on > your behalf? Yeah, I already have commit access, just waiting for your approval ;D Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116736/new/

[PATCH] D116736: [Clang] Add __builtin_reduce_or and __builtin_reduce_and

2022-01-14 Thread Jun Zhang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8de0c1feca28: [Clang] Add __builtin_reduce_or and __builtin_reduce_and (authored by junaire). Changed prior to commit: https://reviews.llvm.org/D116736?vs=398838&id=399966#toc Repository: rG LLVM Git

[PATCH] D115231: [Clang] Add __builtin_reduce_xor

2021-12-07 Thread Jun Zhang via Phabricator via cfe-commits
junaire created this revision. junaire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch implements __builtin_reduce_xor as specified in D111529 . Repository: rG LLVM Github Monorepo https://

[PATCH] D114688: [Clang] Add __builtin_elementwise_ceil

2021-12-07 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 392405. junaire added a comment. Fix typos CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114688/new/ https://reviews.llvm.org/D114688 Files: clang/include/clang/Basic/Builtins.def clang/include/clang/Basic/DiagnosticSemaKinds.td clang/include

[PATCH] D114688: [Clang] Add __builtin_elementwise_ceil

2021-12-07 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. In D114688#3176567 , @aaron.ballman wrote: > In D114688#3176433 , @fhahn wrote: > >> I think it might be good to split off the refactoring of >> `SemaBuiltinElementwiseMathOneArg`-> >>

[PATCH] D115231: [Clang] Add __builtin_reduce_xor

2021-12-08 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 392785. junaire added a comment. - Add extra type check to the vector elements. - Add comment about type restriction. - polish tests a little bit. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115231/new/ https://reviews.llvm.org/D115231 Files: c

[PATCH] D115429: [Clang] Implement the rest of __builtin_elementwise_* functions.

2021-12-09 Thread Jun Zhang via Phabricator via cfe-commits
junaire created this revision. junaire added reviewers: fhahn, aaron.ballman. junaire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The patch implement the rest of __builtin_elementwise_* functions specified in D111529

[PATCH] D115231: [Clang] Add __builtin_reduce_xor

2021-12-09 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 393057. junaire added a comment. Fix failing CI by running: arc diff `git merge-base HEAD origin` --update D115231 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115231/new/

[PATCH] D115231: [Clang] Add __builtin_reduce_xor

2021-12-09 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 393142. junaire added a comment. Fix wrong code logic. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115231/new/ https://reviews.llvm.org/D115231 Files: clang/include/clang/Basic/Builtins.def clang/include

[PATCH] D115231: [Clang] Add __builtin_reduce_xor

2021-12-15 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115231/new/ https://reviews.llvm.org/D115231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D115429: [Clang] Implement the rest of __builtin_elementwise_* functions.

2021-12-15 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115429/new/ https://reviews.llvm.org/D115429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D115231: [Clang] Add __builtin_reduce_xor

2021-12-15 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. In D115231#3194372 , @RKSimon wrote: > Any reason not to handle __builtin_reduce_xor + __builtin_reduce_or as well > in the same patch since they are very similar? Hi, thanks for take a look at this. Yes, you're right. The reaso

[PATCH] D115429: [Clang] Implement the rest of __builtin_elementwise_* functions.

2021-12-15 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. > The RFC does not mention this builtin. It specifies > `__builtin_elementwise_rint` and `__builtin_elementwise_round`. Is there a > reason why this uses `roundeven` instead and should there be other rounding > options provided at the same time? Well, I think there may

[PATCH] D115231: [Clang] Add __builtin_reduce_xor

2021-12-15 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 394563. junaire added a comment. Explicitly speak out types for Arg, but don't repeat the vector type name. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115231/new/ https://reviews.llvm.org/D115231 Files: c

[PATCH] D115231: [Clang] Add __builtin_reduce_xor

2021-12-15 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 394697. junaire added a comment. Rename SemaBuiltinReduceMathPreCheck to PrepareBuiltinReduceMathOneArg Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115231/new/ https://reviews.llvm.org/D115231 Files: clang

[PATCH] D115231: [Clang] Add __builtin_reduce_xor

2021-12-16 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. Thanks for accepting this patch! I would appreciate it if someone is willing to commit this for me since I don't have commit access ;D You can use: Jun Zhang j...@junz.org Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115

[PATCH] D115936: [Clang] Add isInNamespace() to check if a Decl in a specific namespace

2021-12-17 Thread Jun Zhang via Phabricator via cfe-commits
junaire created this revision. junaire added reviewers: rtrieu, ddunbar, CornedBee, gribozavr. junaire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Currently we can only check whether a Decl in namespace `std` or not. However, it will ve

[PATCH] D115936: [Clang] Add isInNamespace() to check if a Decl in a specific namespace

2021-12-17 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 395125. junaire added a comment. Format patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115936/new/ https://reviews.llvm.org/D115936 Files: clang/include/clang/AST/DeclBase.h clang/lib/AST/DeclBase.cp

[PATCH] D115429: [Clang] Implement the rest of __builtin_elementwise_* functions.

2021-12-19 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 395322. junaire added a comment. Add a helper function to resue code. I'm not good at naming functions, so I just oveloaded `emitUnaryBuiltin`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115429/new/ https://

[PATCH] D115429: [Clang] Implement the rest of __builtin_elementwise_* functions.

2021-12-19 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 395323. junaire added a comment. Format the patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115429/new/ https://reviews.llvm.org/D115429 Files: clang/include/clang/Basic/Builtins.def clang/lib/CodeGen

[PATCH] D115429: [Clang] Implement the rest of __builtin_elementwise_* functions.

2021-12-19 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. Hi, @aaron.ballman I'm sorry for not updating the patch in time because I'm preparing for my school final exam :-( One thing I want to mention is that `__builtin_elementwise_roundeven` is actually been added in the RFC during the code review. You can find it in D111529

[PATCH] D115231: [Clang] Add __builtin_reduce_xor

2021-12-21 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 395791. junaire added a comment. - rebase to main. - rename `PrepareBuiltinReduceMathOneArg` to `prepareBuiltinReduceMathOneArgCall`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115231/new/ https://reviews.l

[PATCH] D116161: [Clang] Add an overload for emitUnaryBuiltin.

2021-12-22 Thread Jun Zhang via Phabricator via cfe-commits
junaire created this revision. junaire added reviewers: fhahn, arsenm. junaire requested review of this revision. Herald added subscribers: cfe-commits, wdng. Herald added a project: clang. This patch adds an overload for emitUnaryBuiltin, which is addressed in D115429

[PATCH] D115429: [Clang] Implement the rest of __builtin_elementwise_* functions.

2021-12-22 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. > Sounds good! Might be good to split the emitUnaryBuiltin changes off into a > separate change? Thanks for your suggestion! I just sent another patch: D116161 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D116161: [Clang] Add an overload for emitUnaryBuiltin.

2021-12-22 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 395852. junaire added a comment. Update the existing place that can use `emitUnaryBuiltin`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116161/new/ https://reviews.llvm.org/D116161 Files: clang/include/cla

[PATCH] D116161: [Clang] Add an overload for emitUnaryBuiltin.

2021-12-22 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 395853. junaire added a comment. Sorry, It seems that the base branch is wrong, reupdate it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116161/new/ https://reviews.llvm.org/D116161 Files: clang/lib/CodeGe

[PATCH] D116161: [Clang] Add an overload for emitUnaryBuiltin.

2021-12-22 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. In D116161#3206447 , @fhahn wrote: > In D116161#3206442 , @junaire wrote: > >> Update the existing place that can use `emitUnaryBuiltin`. > > I meant just update the existing uses *without

[PATCH] D116161: [Clang] Add an overload for emitUnaryBuiltin.

2021-12-22 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 395863. junaire added a comment. Update the existing place that can use emitUnaryBuiltin. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116161/new/ https://reviews.llvm.org/D116161 Files: clang/lib/CodeGen/C

[PATCH] D116161: [Clang] Add an overload for emitUnaryBuiltin.

2021-12-22 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 395864. junaire added a comment. Update the existing place that can use emitUnaryBuiltin. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116161/new/ https://reviews.llvm.org/D116161 Files: clang/lib/CodeGen/C

[PATCH] D116161: [Clang] Add an overload for emitUnaryBuiltin.

2021-12-24 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 396140. junaire added a comment. Fix wrong usage. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116161/new/ https://reviews.llvm.org/D116161 Files: clang/lib/CodeGen/CGBuiltin.cpp Index: clang/lib/CodeGen/

[PATCH] D116161: [Clang] Add an overload for emitUnaryBuiltin.

2021-12-24 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. I don't know why but these will cause tests to fail. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116161/new/ https://reviews.llvm.org/D116161 ___ cfe-commits mailing list cfe-c

[PATCH] D116161: [Clang] Add an overload for emitUnaryBuiltin.

2021-12-24 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. I confirmed that we can use `emitUnaryBuiltin` in the cases you pointed out. Please see the logs below: $ path/to/llvm-project/build/bin/clang -cc1 -internal-isystem /path/to/llvm-project/build/lib/clang/14.0.0/include -nostdsysteminc -triple x86_64-apple-darwin /pa

[PATCH] D116161: [Clang] Add an overload for emitUnaryBuiltin.

2021-12-24 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. In D116161#3209292 , @fhahn wrote: > In D116161#3209286 , @junaire wrote: > >> 35: %0 = load float, float* %f1.addr, align 4 >> 36: %1 = load float, float* %f1.addr, align 4 >> 3

[PATCH] D116161: [Clang] Add an overload for emitUnaryBuiltin.

2021-12-28 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 396380. junaire added a comment. In order to use `emitUnaryBuiltin` in other cases, I changed the function interface. This allows us to use it in all `Builder.CreateUnaryIntrinsic()` cases, but will make the function body very small. Repository: rG LLVM

[PATCH] D116161: [Clang] Add an overload for emitUnaryBuiltin.

2021-12-28 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 396490. junaire added a comment. Extend emitUnaryBuiltin instead of adding a new overload, also apply it to __builtin_elementwise_abs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116161/new/ https://reviews.

[PATCH] D116161: [Clang] Extend emitUnaryBuiltin to avoid duplicate logic.

2021-12-28 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 396492. junaire edited the summary of this revision. junaire added a comment. Refactor code a little bit and fix wrong names. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116161/new/ https://reviews.llvm.org/D

<    1   2   3   4