[PATCH] D126903: [clang] Add support for __builtin_memset_inline

2022-10-26 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet added a comment. In D126903#3885269 , @aganea wrote: > In D126903#3885114 , @gchatelet > wrote: > >> It should be fixed now @aganea . Can you check? > > Works now, thanks again for the quick response. S

[PATCH] D126903: [clang] Add support for __builtin_memset_inline

2022-10-26 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. In D126903#3885114 , @gchatelet wrote: > It should be fixed now @aganea . Can you check? Works now, thanks again for the quick response. Should D136752 be cherry-picked into the 15.0 branch? In

[PATCH] D126903: [clang] Add support for __builtin_memset_inline

2022-10-26 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet added a comment. It should be fixed now @aganea . Can you check? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126903/new/ https://reviews.llvm.org/D126903 ___ cfe-commits mailing list cfe-comm

[PATCH] D126903: [clang] Add support for __builtin_memset_inline

2022-10-26 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet added a comment. In D126903#3884873 , @courbet wrote: > I think there's a bug in the code though: > > // If this is memset, we just need to see if the offset is valid in the size > // of the memset.. > if (MI->getIntrinsicID() == Intri

[PATCH] D126903: [clang] Add support for __builtin_memset_inline

2022-10-26 Thread Clement Courbet via Phabricator via cfe-commits
courbet added a comment. I think there's a bug in the code though: // If this is memset, we just need to see if the offset is valid in the size // of the memset.. if (MI->getIntrinsicID() == Intrinsic::memset) should really be: // If this is memset, we just need to see if the offset

[PATCH] D126903: [clang] Add support for __builtin_memset_inline

2022-10-26 Thread Tobias Hieta via Phabricator via cfe-commits
thieta added a comment. We have been building a two stage clang and our internal projects with this version of rpmalloc and clang 15.x a while now and I haven't see the issue you see @aganea. I don't think this patch is the problem as @efriedma suggested, could be in rpmalloc but since I have u

[PATCH] D126903: [clang] Add support for __builtin_memset_inline

2022-10-25 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. It's not really a regression, just a bug in the feature. The rpmalloc code is checking `__has_builtin(__builtin_memset_inline)`, so older versions of clang aren't seeing the same source code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[PATCH] D126903: [clang] Add support for __builtin_memset_inline

2022-10-25 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. Hello @gchatelet! This patches introduces a regression in a two-stage build using rpmalloc on Windows. Bisection lead me here. Would you have a chance to take a look please? Thanks in advance. To reproduce, I used the following script (rename to make_llvm.bat) F25053901:

[PATCH] D126903: [clang] Add support for __builtin_memset_inline

2022-06-10 Thread Guillaume Chatelet 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 rG38637ee47754: [clang] Add support for __builtin_memset_inline (authored by gchatelet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D126903: [clang] Add support for __builtin_memset_inline

2022-06-10 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet updated this revision to Diff 435893. gchatelet added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126903/new/ https://reviews.llvm.org/D126903 Files: clang/docs/LanguageExtensions.rst clang/include/clang/Basic/Bui

[PATCH] D126903: [clang] Add support for __builtin_memset_inline

2022-06-10 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet updated this revision to Diff 435890. gchatelet added a comment. - Update assert message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126903/new/ https://reviews.llvm.org/D126903 Files: clang/docs/LanguageExtensions.rst clang/includ

[PATCH] D126903: [clang] Add support for __builtin_memset_inline

2022-06-10 Thread Clement Courbet via Phabricator via cfe-commits
courbet accepted this revision. courbet added inline comments. This revision is now accepted and ready to land. Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:7355 + isVol, true, DstPtrInfo, AAInfo); +assert(Result && "getMemset

[PATCH] D126903: [clang] Add support for __builtin_memset_inline

2022-06-10 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet updated this revision to Diff 435883. gchatelet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126903/new/ https://reviews.llvm.org/D126903 Files: clang/docs/LanguageExtensions.rst clang/include/cla

[PATCH] D126903: [clang] Add support for __builtin_memset_inline

2022-06-10 Thread Clement Courbet via Phabricator via cfe-commits
courbet added inline comments. Comment at: llvm/include/llvm/CodeGen/SelectionDAGTargetInfo.h:79 /// SDValue if the target declines to use custom code and a different /// lowering strategy should be used. virtual SDValue EmitTargetCodeForMemset(SelectionDAG &DAG, const S

[PATCH] D126903: [clang] Add support for __builtin_memset_inline

2022-06-10 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet added inline comments. Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:7334 if (TSI) { SDValue Result = TSI->EmitTargetCodeForMemset( *this, dl, Chain, Dst, Src, Size, Alignment, isVol, DstPtrInfo); courbet wrote: > There is

[PATCH] D126903: [clang] Add support for __builtin_memset_inline

2022-06-10 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet updated this revision to Diff 435877. 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/D126903/new/ https://reviews.llvm.org/D126903 Files: clang/doc

[PATCH] D126903: [clang] Add support for __builtin_memset_inline

2022-06-08 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet added a comment. Pending D127279 before making sure that all `EmitTargetCodeForMemset` implementations are enforcing `AlwaysInline`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126903/new/ https://rev

[PATCH] D126903: [clang] Add support for __builtin_memset_inline

2022-06-07 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet updated this revision to Diff 434793. gchatelet marked 8 inline comments as done. gchatelet added a comment. Herald added subscribers: pmatos, asb, aheejin, jgravelle-google, sbc100, dschuff. - Address comments, add more codegen tests, rebase Repository: rG LLVM Github Monorepo CHA

[PATCH] D126903: [clang] Add support for __builtin_memset_inline

2022-06-07 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet added inline comments. Comment at: clang/test/Sema/builtins-memcpy-inline.cpp:11 +void test_memcpy_inline_invalid_arg_types() { + __builtin_memcpy_inline(1, 2, 3); // expected-error {{cannot initialize a parameter of type 'void *' with an rvalue of type 'int'}} +} ---

[PATCH] D126903: [clang] Add support for __builtin_memset_inline

2022-06-07 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet updated this revision to Diff 434750. gchatelet marked 2 inline comments as done. gchatelet added a comment. - rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126903/new/ https://reviews.llvm.org/D126903 Files: clang/docs/Language

[PATCH] D126903: [clang] Add support for __builtin_memset_inline

2022-06-03 Thread Clement Courbet via Phabricator via cfe-commits
courbet added inline comments. Comment at: clang/test/Sema/builtins-memcpy-inline.cpp:11 +void test_memcpy_inline_invalid_arg_types() { + __builtin_memcpy_inline(1, 2, 3); // expected-error {{cannot initialize a parameter of type 'void *' with an rvalue of type 'int'}} +} -

[PATCH] D126903: [clang] Add support for __builtin_memset_inline

2022-06-03 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet marked 2 inline comments as done. gchatelet added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:2293-2315 + case Builtin::BI__builtin_memset_inline: { +if (checkArgCount(*this, TheCall, 3)) + return ExprError(); +auto ArgArrayConversionFaile

[PATCH] D126903: [clang] Add support for __builtin_memset_inline

2022-06-03 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet updated this revision to Diff 433982. gchatelet added a comment. - Fix sema checking Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126903/new/ https://reviews.llvm.org/D126903 Files: clang/docs/LanguageExtensions.rst clang/include/cl

[PATCH] D126903: [clang] Add support for __builtin_memset_inline

2022-06-03 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet updated this revision to Diff 433978. gchatelet added a comment. - Rebase over formatted CGBuilder.h Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126903/new/ https://reviews.llvm.org/D126903 Files: clang/docs/LanguageExtensions.rst

[PATCH] D126903: [clang] Add support for __builtin_memset_inline

2022-06-02 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/CodeGen/CGBuilder.h:53 + : CGBuilderBaseTy(C), TypeCache(TypeCache) {} + CGBuilderTy(const CodeGenTypeCache &TypeCache, llvm::LLVMContext &C, + const llvm::ConstantFolder &F, There are a lot o

[PATCH] D126903: [clang] Add support for __builtin_memset_inline

2022-06-02 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet updated this revision to Diff 433858. gchatelet added a comment. - remove unused variable and rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126903/new/ https://reviews.llvm.org/D126903 Files: clang/docs/LanguageExtensions.rst

[PATCH] D126903: [clang] Add support for __builtin_memset_inline

2022-06-02 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet created this revision. gchatelet added reviewers: courbet, efriedma, t.p.northover, jdoerfert. Herald added subscribers: jsji, pengfei, hiraditya. Herald added a project: All. gchatelet requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-c