[PATCH] D73543: [clang] Add support for __builtin_memcpy_inline

2020-06-18 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet marked 3 inline comments as done. gchatelet added inline comments. Comment at: clang/test/Sema/builtins-memcpy-inline.c:7 +#warning defined as expected +// expected-warning@-1 {{defined as expected}} +#endif efriedma wrote: > melver wrote: > > It

[PATCH] D73543: [clang] Add support for __builtin_memcpy_inline

2020-06-18 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet marked 2 inline comments as done. gchatelet added inline comments. Comment at: clang/test/Sema/builtins-memcpy-inline.c:7 +#warning defined as expected +// expected-warning@-1 {{defined as expected}} +#endif gchatelet wrote: > efriedma wrote: > >

[PATCH] D73543: [clang] Add support for __builtin_memcpy_inline

2020-06-17 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/test/Sema/builtins-memcpy-inline.c:7 +#warning defined as expected +// expected-warning@-1 {{defined as expected}} +#endif melver wrote: > It appears that the expected-warning check here is guarded by the #if as

[PATCH] D73543: [clang] Add support for __builtin_memcpy_inline

2020-06-17 Thread Marco Elver via Phabricator via cfe-commits
melver added inline comments. Comment at: clang/test/Sema/builtins-memcpy-inline.c:7 +#warning defined as expected +// expected-warning@-1 {{defined as expected}} +#endif It appears that the expected-warning check here is guarded by the #if as well. Moving it

[PATCH] D73543: [clang] Add support for __builtin_memcpy_inline

2020-02-07 Thread Guillaume Chatelet via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd65bbf81f8be: [clang] Add support for __builtin_memcpy_inline (authored by gchatelet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73543/new/

[PATCH] D73543: [clang] Add support for __builtin_memcpy_inline

2020-02-07 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet added a comment. Thx a lot ! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73543/new/ https://reviews.llvm.org/D73543 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D73543: [clang] Add support for __builtin_memcpy_inline

2020-02-07 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma 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/D73543/new/ https://reviews.llvm.org/D73543

[PATCH] D73543: [clang] Add support for __builtin_memcpy_inline

2020-02-07 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet updated this revision to Diff 243289. gchatelet marked 3 inline comments as done. gchatelet added a comment. - Remove unrelated memcpy in documentation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73543/new/

[PATCH] D73543: [clang] Add support for __builtin_memcpy_inline

2020-02-07 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet added inline comments. Comment at: clang/docs/LanguageExtensions.rst:2229 +* ``memcpy`` * ``memchr`` efriedma wrote: > Not sure putting "memcpy" in this list makes sense. We did add support for > constant-evaluating memcpy, but it was separately

[PATCH] D73543: [clang] Add support for __builtin_memcpy_inline

2020-02-07 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Sorry about the delayed response, I was traveling. Comment at: clang/docs/LanguageExtensions.rst:2252 + + * ``__builtin_memcpy_inline`` + gchatelet wrote: > efriedma wrote: > > This is in the wrong section of the documentation. We

[PATCH] D73543: [clang] Add support for __builtin_memcpy_inline

2020-02-07 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet added a comment. Anything else @efriedma ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73543/new/ https://reviews.llvm.org/D73543 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D73543: [clang] Add support for __builtin_memcpy_inline

2020-02-03 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet added inline comments. Comment at: clang/docs/LanguageExtensions.rst:2252 + + * ``__builtin_memcpy_inline`` + efriedma wrote: > This is in the wrong section of the documentation. We could > constant-evaluate __builtin_memcpy_inline, I guess, but that

[PATCH] D73543: [clang] Add support for __builtin_memcpy_inline

2020-02-03 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet updated this revision to Diff 241988. gchatelet marked 3 inline comments as done. gchatelet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73543/new/ https://reviews.llvm.org/D73543 Files:

[PATCH] D73543: [clang] Add support for __builtin_memcpy_inline

2020-01-31 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:1655 +TheCall->getArg(2)->isIntegerConstantExpr(I, Context); +if (I.isNullValue()) + break; You can EvaluateKnownConstInt here, instead of isIntegerConstantExpr.

[PATCH] D73543: [clang] Add support for __builtin_memcpy_inline

2020-01-31 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/docs/LanguageExtensions.rst:2252 + + * ``__builtin_memcpy_inline`` + This is in the wrong section of the documentation. We could constant-evaluate __builtin_memcpy_inline, I guess, but that isn't the primary

[PATCH] D73543: [clang] Add support for __builtin_memcpy_inline

2020-01-31 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet updated this revision to Diff 241649. gchatelet marked an inline comment as done. gchatelet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73543/new/ https://reviews.llvm.org/D73543 Files:

[PATCH] D73543: [clang] Add support for __builtin_memcpy_inline

2020-01-31 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet added a comment. Thx! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73543/new/ https://reviews.llvm.org/D73543 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D73543: [clang] Add support for __builtin_memcpy_inline

2020-01-30 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:1653 +llvm::APSInt I(64); +if (!TheCall->getArg(2)->isIntegerConstantExpr(I, Context)) + Diag(TheCall->getBeginLoc(), diag::err_expr_not_ice) SemaBuiltinConstantArg. Or

[PATCH] D73543: [clang] Add support for __builtin_memcpy_inline

2020-01-30 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet added a comment. @efriedma would you mind having a look? It should be my last patch on that matter :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73543/new/ https://reviews.llvm.org/D73543

[PATCH] D73543: [clang] Add support for __builtin_memcpy_inline

2020-01-30 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet updated this revision to Diff 241356. gchatelet added a comment. rebasing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73543/new/ https://reviews.llvm.org/D73543 Files: clang/docs/LanguageExtensions.rst

[PATCH] D73543: [clang] Add support for __builtin_memcpy_inline

2020-01-29 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet added inline comments. Comment at: clang/docs/LanguageExtensions.rst:2259 +``__builtin_memcpy_inline(dst, src, size)`` is identical to +``__builtin_memcpy(dst, src, size)`` expect that the generated code is +guaranteed not to call any external functions. See [LLVM IR

[PATCH] D73543: [clang] Add support for __builtin_memcpy_inline

2020-01-29 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet updated this revision to Diff 241158. gchatelet marked 4 inline comments as done. gchatelet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73543/new/ https://reviews.llvm.org/D73543 Files:

[PATCH] D73543: [clang] Add support for __builtin_memcpy_inline

2020-01-28 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/docs/LanguageExtensions.rst:2259 +``__builtin_memcpy_inline(dst, src, size)`` is identical to +``__builtin_memcpy(dst, src, size)`` expect that the generated code is +guaranteed not to call any external functions. See [LLVM IR

[PATCH] D73543: [clang] Add support for __builtin_memcpy_inline

2020-01-28 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet created this revision. gchatelet added reviewers: efriedma, courbet, tejohnson. Herald added subscribers: llvm-commits, cfe-commits, hiraditya. Herald added projects: clang, LLVM. This is a follow up on D61634 and the last step to implement