[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

2022-08-17 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D128745#3728196 , @royjacobson wrote: > Stopping by - I assume this targets Clang 16 now, so the abi compat level > should be adjusted to 15. Sure, I'll make a new patch for that. Repository: rG LLVM Github Monorepo

[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

2022-08-17 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D128745#3728087 , @michele.scandale wrote: > I can see failures related to this change in a downstream version of clang > where the default `ClangABICompat` value is not `Latest` (after the followup >

[PATCH] D131938: [C++20] [Coroutines] Disable to take the address of labels in coroutines

2022-08-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. > Since the coroutines are going to split into pieces in the middle end so the > address of labels are ambiguous that time. Do we split in the middle or copy the whole computed goto CFG? I'd imagine the branch on a dynamic block address is like `n`-way branch which is

[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

2022-08-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D128745#3727770 , @abrachet wrote: > In D128745#3727715 , @ychen wrote: > >> In D128745#3727697 , @abrachet >> wrote: >> >>> This is breaking

[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

2022-08-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D128745#3727715 , @ychen wrote: > In D128745#3727697 , @abrachet > wrote: > >> This is breaking us. >> >> template struct S; // #1 >> >> template struct S {}; // #2 >> >> The

[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

2022-08-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D128745#3727697 , @abrachet wrote: > This is breaking us. > > template struct S; // #1 > > template struct S {}; // #2 > > The following compiled before but is now broken, (we use > `-fclang-abi-compat=13.0`). We get a

[PATCH] D127233: [CodeGen] Sort llvm.global_ctors by lexical order before emission

2022-08-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/CodeGen/CGDeclCXX.cpp:580 +I = DelayedCXXInitPosition.find(D); +unsigned LexOrder = I == DelayedCXXInitPosition.end() ? ~0U : I->second; +AddGlobalCtor(Fn, 65535, LexOrder, COMDATKey); efriedma

[PATCH] D127233: [CodeGen] Sort llvm.global_ctors by lexical order before emission

2022-08-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 453095. ychen added a comment. - rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127233/new/ https://reviews.llvm.org/D127233 Files: clang/lib/CodeGen/CGDeclCXX.cpp clang/lib/CodeGen/CodeGenModule.cpp

[PATCH] D127233: [CodeGen] Sort llvm.global_ctors by lexical order before emission

2022-08-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 453094. ychen added a comment. - use correct lexing order for non-deferred constructors. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127233/new/ https://reviews.llvm.org/D127233 Files:

[PATCH] D127233: [CodeGen] Sort llvm.global_ctors by lexical order before emission

2022-08-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/CodeGen/CGDeclCXX.cpp:580 +I = DelayedCXXInitPosition.find(D); +unsigned LexOrder = I == DelayedCXXInitPosition.end() ? ~0U : I->second; +AddGlobalCtor(Fn, 65535, LexOrder, COMDATKey); efriedma

[PATCH] D127233: [CodeGen] Sort llvm.global_ctors by lexical order before emission

2022-08-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:544 } + llvm::stable_sort(GlobalCtors, [](const Structor , const Structor ) { +return L.LexOrder < R.LexOrder; rnk wrote: > Please move this sorting into EmitCtorList and apply

[PATCH] D127233: [CodeGen] Sort llvm.global_ctors by lexical order before emission

2022-08-15 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127233/new/ https://reviews.llvm.org/D127233 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-08-14 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 452579. ychen added a comment. - rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128750/new/ https://reviews.llvm.org/D128750 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AST/DeclTemplate.h

[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

2022-08-14 Thread Yuanfang Chen 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 rG6afcc4a459ea: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering… (authored by ychen). Repository: rG LLVM Github

[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

2022-08-14 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 452564. ychen added a comment. - rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128745/new/ https://reviews.llvm.org/D128745 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/SemaTemplateDeduction.cpp

[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-08-14 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D128750#3721441 , @royjacobson wrote: > Some documentation/test nits, and one question, but otherwise LGTM. > Could you fix the merge conflict? It would be nice to see pre-commit CI > results. > > Given the complexity of the

[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-08-14 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:5183 if (!Better1 && !Better2) // Neither is better than the other -return JudgeByConstraints(); +return nullptr; + royjacobson wrote: > Previously we continued to check

[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-08-14 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 452561. ychen marked 3 inline comments as done. ychen added a comment. - address Roy's comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128750/new/ https://reviews.llvm.org/D128750 Files:

[PATCH] D131820: [PS4][driver] make -fjmc work with LTO driver linking stage

2022-08-12 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added a reviewer: probinson. Herald added a subscriber: inglorion. Herald added a project: All. ychen requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. Repository: rG LLVM Github Monorepo

[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-08-12 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D128750#3680607 , @royjacobson wrote: > In D128750#3663161 , @ychen wrote: > >> In D128750#3662898 , @royjacobson >> wrote: >> >>> but in your

[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-08-12 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 452311. ychen added a comment. - Remove code for temp.func.order p6.2.1 - Add missing handling for partial ordering of partial specialization - Add more tests - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D129954: [CodeGen][inlineasm] assume the flag output of inline asm is boolean value

2022-08-02 Thread Yuanfang Chen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. ychen marked an inline comment as done. Closed by commit rG92c1bc61586c: [CodeGen][inlineasm] assume the flag output of inline asm is boolean value (authored by ychen). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D129954: [CodeGen][inlineasm] assume the flag output of inline asm is boolean value

2022-07-29 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen marked 2 inline comments as done. ychen added a comment. In D129954#3686780 , @nikic wrote: > LGTM. After some further consideration, implementing this properly in LLVM > would probably take more effort than is worthwhile (especially as this is >

[PATCH] D129954: [CodeGen][inlineasm] assume the flag output of inline asm is boolean value

2022-07-29 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 448733. ychen added a comment. - update test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129954/new/ https://reviews.llvm.org/D129954 Files: clang/lib/CodeGen/CGStmt.cpp

[PATCH] D129954: [CodeGen][inlineasm] assume the flag output of inline asm is boolean value

2022-07-29 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 448732. ychen added a comment. - use < 2 - check multiple flag outputs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129954/new/ https://reviews.llvm.org/D129954 Files: clang/lib/CodeGen/CGStmt.cpp

[PATCH] D128750: [c++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-07-19 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D128750#3662898 , @royjacobson wrote: > but in your example with T/U/V we have 3 template parameters that we could > reorder in 6 different ways. But, any reordering of the 6 that does not have consecutive U and V is not

[PATCH] D128750: [c++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-07-18 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen marked an inline comment as done. ychen added a comment. In D128750#3627085 , @royjacobson wrote: > I'm also a bit concerned that we're deviating from the standard here w.r.t. > to the 'reordering' checks for reversed candidates. I support this -

[PATCH] D129954: [CodeGen][inlineasm] assume the flag output of inline asm is boolean value

2022-07-17 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D129954#3658139 , @nikic wrote: > Hm, might it be better to teach LLVM about this (in some > ConstantRange/KnownBits logic)? This doesn't really seem like something the > frontend should know about and encode, as that means

[PATCH] D129954: [CodeGen][inlineasm] assume the flag output of inline asm is boolean value

2022-07-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added reviewers: nikic, efriedma, lebedev.ri. Herald added subscribers: jsji, pengfei, kristof.beyls. Herald added a project: All. ychen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. GCC inline asm

[PATCH] D125291: Introduce @llvm.threadlocal.address intrinsic to access TLS variable

2022-07-14 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: llvm/docs/LangRef.rst:24541 + + declare ptr @llvm.threadlocal.address(ptr) nounwind readnone willreturn + Like @jyknight already did, any idea what it would take to change the parameter type from pointer to token?

[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

2022-07-13 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:5444 + if (Better1 && Better2) { +bool ClangABICompat14 = S.Context.getLangOpts().getClangABICompat() <= +LangOptions::ClangABI::Ver14;

[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

2022-07-13 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 444363. ychen added a comment. - add CodeGen tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128745/new/ https://reviews.llvm.org/D128745 Files: clang/docs/ReleaseNotes.rst

[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

2022-07-12 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:5423-5424 +template ::value> +static TemplateLikeDecl * aaron.ballman wrote: > Can't this be a local constexpr variable instead of an NTTP, or are there > reasons you want to

[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

2022-07-12 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 444099. ychen marked 4 inline comments as done. ychen added a comment. - add Clang ABI check - replace one NTTP with a local constexpr variable - style changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

2022-07-12 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. Thanks for the review. @aaron.ballman @erichkeane. About the non-trailing pack, I had the impression that DR692 is only about the trailing pack in practice but don't remember the exact wording, so I dig the standardese further. For partial specialization:

[PATCH] D129530: [coroutine] add nomerge function attribute to `llvm.coro.save`

2022-07-12 Thread Yuanfang Chen 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 rGfcb7d76d65e8: [coroutine] add nomerge function attribute to `llvm.coro.save` (authored by ychen). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D129530: [coroutine] add nomerge function attribute to `llvm.coro.save`

2022-07-11 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D129530#3644094 , @ChuanqiXu wrote: > In D129530#3644091 , @ychen wrote: > >> In D129530#3644074 , @ChuanqiXu >> wrote: >> >>> This looks good

[PATCH] D129530: [coroutine] add nomerge function attribute to `llvm.coro.save`

2022-07-11 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 443818. ychen added a comment. - Address Chuanqi's feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129530/new/ https://reviews.llvm.org/D129530 Files: clang/test/CodeGenCoroutines/coro-attributes.cpp

[PATCH] D129530: [coroutine] add nomerge function attribute to `llvm.coro.save`

2022-07-11 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D129530#3644074 , @ChuanqiXu wrote: > This looks good to me basically. I would love to see an example to test the > two coro.save wouldn't be merged. Yep, `hoist-skip-token.ll` is testing this. Repository: rG LLVM Github

[PATCH] D129530: [coroutine] add nomerge function attribute to `llvm.coro.save`

2022-07-11 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added reviewers: nikic, ChuanqiXu. Herald added subscribers: jdoerfert, hiraditya. Herald added a project: All. ychen requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. It is illegal to

[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

2022-07-11 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:5184 - // FIXME: This mimics what GCC implements, but doesn't match up with the - // proposed resolution for core issue 692. This area needs to be sorted out, ychen wrote: >

[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

2022-07-11 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:2488 +bool XHasMoreArg = X.pack_size() > Y.pack_size(); +if (!(XHasMoreArg && X.pack_elements().back().isPackExpansion()) && +!(!XHasMoreArg &&

[PATCH] D128745: [Sema] fix trailing parameter pack handling for function template partial ordering

2022-07-11 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 443771. ychen marked an inline comment as done. ychen added a comment. - fix a bug - update comments - check-all, check-runtimes pass Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128745/new/

[PATCH] D128745: [Sema] fix trailing parameter pack handling for function template partial ordering

2022-07-11 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 443756. ychen added a comment. - handle more cases to implement DR692, DR1395 - tentatively implement DR1432 which DR692 needs, otherwise there would be regressions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D128750: [c++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-07-06 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D128750#3627085 , @royjacobson wrote: > Thanks for working on this! I like the approach, but two comments: Thanks for the review. > I would like more tests for the different forms of template argument > deduction. Some

[PATCH] D128745: [Sema] fix trailing parameter pack handling for function template partial ordering

2022-07-06 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:5184 - // FIXME: This mimics what GCC implements, but doesn't match up with the - // proposed resolution for core issue 692. This area needs to be sorted out, aaron.ballman

[PATCH] D128745: [Sema] fix trailing parameter pack handling for function template partial ordering

2022-07-06 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D128745#3632850 , @aaron.ballman wrote: > Thank you for working on this! Can you please add more details to the patch > summary about the changes? Thanks for taking a look. This was intended to correctly implement

[PATCH] D128750: [c++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-07-06 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:5119 - while (--NumParams > 0) { -if (Function->getParamDecl(NumParams - 1)->isParameterPack()) - return false; royjacobson wrote: > Curious, why was this removed? I

[PATCH] D115844: [ubsan] Using metadata instead of prologue data for function sanitizer

2022-07-01 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D115844#3625776 , @vitalybuka wrote: > @ychen This patch causes 20% .o size increase (x86_64) Is this expected? No, it is not expected. Do you have a test case? I'll take a look. Repository: rG LLVM Github Monorepo

[PATCH] D128750: [c++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-06-28 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 440789. ychen added a comment. - add release notes - update www-status Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128750/new/ https://reviews.llvm.org/D128750 Files: clang/docs/ReleaseNotes.rst

[PATCH] D114728: [Coroutine] Remove the prologue data of `-fsanitize=function` for split functions

2022-06-28 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen abandoned this revision. ychen added a comment. Herald added a project: All. D115844 and D116130 supersede this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114728/new/

[PATCH] D128750: [c++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-06-28 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D128750#3616471 , @ychen wrote: > In D128750#3616449 , @erichkeane > wrote: > >> Is there any chance you can validate this against >> https://reviews.llvm.org/D126907 as well? We touch

[PATCH] D128750: [c++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-06-28 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D128750#3616449 , @erichkeane wrote: > Is there any chance you can validate this against > https://reviews.llvm.org/D126907 as well? We touch similar code, and I'm > intending to get that committed in the near future.

[PATCH] D128750: [c++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-06-28 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added reviewers: hubert.reinterpretcast, erichkeane, rsmith, aaron.ballman, royjacobson. Herald added a project: All. ychen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Most of the wordings are

[PATCH] D128745: [Sema] fix trailing parameter pack handling for function template partial ordering

2022-06-28 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 440703. ychen added a comment. fix typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128745/new/ https://reviews.llvm.org/D128745 Files: clang/lib/Sema/SemaTemplateDeduction.cpp

[PATCH] D128745: [Sema] fix trailing parameter pack handling for function template partial ordering

2022-06-28 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added reviewers: rsmith, aaron.ballman. Herald added a project: All. ychen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D128745 Files:

[PATCH] D127233: [CodeGen] Sort llvm.global_ctors by lexical order before emission

2022-06-27 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127233/new/ https://reviews.llvm.org/D127233 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D115844: [ubsan] Using metadata instead of prologue data for function sanitizer

2022-06-27 Thread Yuanfang Chen 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 rG6678f8e505b1: [ubsan] Using metadata instead of prologue data for function sanitizer (authored by ychen). Repository: rG LLVM Github Monorepo

[PATCH] D115844: [ubsan] Using metadata instead of prologue data for function sanitizer

2022-06-27 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 440329. ychen marked an inline comment as done. ychen added a comment. Update LangRef. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115844/new/ https://reviews.llvm.org/D115844 Files:

[PATCH] D127259: [CodeGen] guarantee templated static variables are initialized in the reverse instantiation order

2022-06-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D127259#3590127 , @rnk wrote: > I think Richard had some concerns in the other review that this may not be > enough to really guarantee initialization order within the TU. I couldn't say > either way, I shouldn't review this

[PATCH] D127259: [CodeGen] guarantee templated static variables are initialized in the reverse instantiation order

2022-06-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. gentle ping.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127259/new/ https://reviews.llvm.org/D127259 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D127233: [CodeGen] Sort llvm.global_ctors by lexical order before emission

2022-06-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. gentle ping.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127233/new/ https://reviews.llvm.org/D127233 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D115844: [ubsan] Using metadata instead of prologue data for function sanitizer

2022-06-13 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. gentle ping.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115844/new/ https://reviews.llvm.org/D115844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D119296: KCFI sanitizer

2022-06-09 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2257 + + F->setPrefixData(CreateKCFITypeId(FD->getType())); + F->addFnAttr("kcfi-target"); FYI: using prefix data may not work for the C++ coroutine.

[PATCH] D127259: [CodeGen] guarantee templated static variables are initialized in the reverse instantiation order

2022-06-07 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added reviewers: rsmith, rnk. Herald added a project: All. ychen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Based on the Richard's suggestion in D126341 : `If we can

[PATCH] D127233: [CodeGen] Sort llvm.global_ctors by lexing order before emission

2022-06-07 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 434884. ychen added a comment. lint Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127233/new/ https://reviews.llvm.org/D127233 Files: clang/lib/CodeGen/CGDeclCXX.cpp clang/lib/CodeGen/CodeGenModule.cpp

[PATCH] D127233: [CodeGen] Sort llvm.global_ctors by lexing order before emission

2022-06-07 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added reviewers: rnk, rsmith. Herald added a project: All. ychen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes https://github.com/llvm/llvm-project/issues/55804 The lexing order is already

[PATCH] D126341: Order implicitly instantiated global variable's initializer by the reverse instantiation order

2022-06-03 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D126341#3554286 , @rnk wrote: > Well, I guess we're out of luck, but that seems like a very poorly considered > requirement from the standard. If we can't use comdats for inline variables, > every time you include a header

[PATCH] D115844: [ubsan] Using metadata instead of prologue data for function sanitizer

2022-06-03 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Herald added subscribers: jsji, Enna1. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1843 + + auto *FTRTTIProxy = new llvm::GlobalVariable( + TheModule, Addr->getType(), pcc wrote: > ychen wrote: > > pcc wrote: > > > Are

[PATCH] D126341: Order implicitly instantiated global variable's initializer by the reverse instantiation order

2022-05-25 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D126341#3537947 , @rnk wrote: > I'm somewhat supportive of the goal here, but I think there are still some > underlying issues. > > First, why should these guarantees be limited to instantiations and not > inline variables?

[PATCH] D126341: Order implicitly instantiated global variable's initializer by the reverse instantiation order

2022-05-25 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D126341#3537675 , @aaron.ballman wrote: > Adding the language WG as a reviewer in case others have opinions. > >> The underlying problem is basically wg21.link/cwg362 which has no concensus >> yet. > > According to >

[PATCH] D126341: Order implicitly instantiated global variable's initializer by the reverse instantiation order

2022-05-24 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 431825. ychen added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126341/new/ https://reviews.llvm.org/D126341 Files: clang/lib/CodeGen/CGDeclCXX.cpp clang/lib/CodeGen/CodeGenModule.cpp

[PATCH] D126341: Order implicitly instantiated global variable's initializer by the reverse instantiation order

2022-05-24 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added reviewers: rnk, rsmith, aaron.ballman. Herald added a project: All. ychen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. By the standard https://eel.is/c++draft/basic.start#dynamic-1, implicitly

[PATCH] D115844: [ubsan] Using metadata instead of prologue data for function sanitizer

2022-05-12 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1843 + + auto *FTRTTIProxy = new llvm::GlobalVariable( + TheModule, Addr->getType(), pcc wrote: > Are these proxy variables necessary? I think that now that we have custom > code

[PATCH] D115844: [ubsan] Using metadata instead of prologue data for function sanitizer

2022-04-27 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. gentle ping. @pcc could we please move this forward if the direction looks good to you? It has been sitting for a while... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115844/new/ https://reviews.llvm.org/D115844

[PATCH] D115844: [ubsan] Using metadata instead of prologue data for function sanitizer

2022-04-01 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. ping.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115844/new/ https://reviews.llvm.org/D115844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D122869: [lit] Fix setup of sanitizer environment

2022-04-01 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen accepted this revision. ychen added a comment. This revision is now accepted and ready to land. I'm looking at relevant code recently. This LGTM. Comment at: clang/test/Unit/lit.cfg.py:33 -# Propagate path to symbolizer for ASan/MSan. -for symbolizer in

[PATCH] D122869: [lit] Fix setup of sanitizer environment

2022-04-01 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/test/Unit/lit.cfg.py:33 -# Propagate path to symbolizer for ASan/MSan. -for symbolizer in ['ASAN_SYMBOLIZER_PATH', 'MSAN_SYMBOLIZER_PATH']: -if symbolizer in os.environ: -config.environment[symbolizer] =

[PATCH] D115844: [ubsan] Using metadata instead of prologue data for function sanitizer

2022-03-25 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. Herald added a subscriber: MaskRay. ping ... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115844/new/ https://reviews.llvm.org/D115844 ___ cfe-commits mailing list

[PATCH] D115844: [ubsan] Using metadata instead of prologue data for function sanitizer

2022-03-17 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. Herald added a project: All. gentle ping.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115844/new/ https://reviews.llvm.org/D115844 ___ cfe-commits mailing list

[PATCH] D118850: [PS4] Make __BIGGEST_ALIGNMENT__ 32bytes

2022-03-17 Thread Yuanfang Chen 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 rG7e80976fdf3f: [PS4] Make __BIGGEST_ALIGNMENT__ 32bytes (authored by ychen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D118850: [PS4] Make __BIGGEST_ALIGNMENT__ 32bytes

2022-03-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. @probinson Thanks. No worries. I should've pinged earlier. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118850/new/ https://reviews.llvm.org/D118850 ___ cfe-commits mailing list

[PATCH] D118850: [PS4] Make __BIGGEST_ALIGNMENT__ 32bytes

2022-03-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. Herald added a project: All. @aaron.ballman Thanks for taking a look. @probinson Gentle ping.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118850/new/ https://reviews.llvm.org/D118850

[PATCH] D119910: [clang][debug] port clang-cl /JMC flag to ELF

2022-03-08 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D119910#3364920 , @ychen wrote: > In D119910#3364892 , @thakis wrote: > >> Looks like this breaks tests on mac and win: >> http://45.33.8.238/win/54551/step_7.txt >>

[PATCH] D119910: [clang][debug] port clang-cl /JMC flag to ELF

2022-03-07 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D119910#3364892 , @thakis wrote: > Looks like this breaks tests on mac and win: > http://45.33.8.238/win/54551/step_7.txt > http://45.33.8.238/macm1/29590/step_7.txt > > Please take a look, and revert for now if it takes a while

[PATCH] D119910: [clang][debug] port clang-cl /JMC flag to ELF

2022-03-07 Thread Yuanfang Chen 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 rG731347431976: [clang][debug] port clang-cl /JMC flag to ELF (authored by ychen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D119910: [clang][debug] port clang-cl /JMC flag to ELF

2022-03-04 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: llvm/test/Instrumentation/JustMyCode/jmc-instrument-elf.ll:1 -; REQUIRES: system-windows -; RUN: opt -jmc-instrument -mtriple=x86_64-pc-windows-msvc -S < %s | FileCheck %s -; RUN: opt -jmc-instrument -mtriple=aarch64-pc-windows-msvc -S

[PATCH] D119910: [clang][debug] port clang-cl /JMC flag to ELF

2022-03-04 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: llvm/test/Instrumentation/JustMyCode/jmc-instrument-elf.ll:1 -; REQUIRES: system-windows -; RUN: opt -jmc-instrument -mtriple=x86_64-pc-windows-msvc -S < %s | FileCheck %s -; RUN: opt -jmc-instrument -mtriple=aarch64-pc-windows-msvc -S

[PATCH] D119910: [clang][debug] port clang-cl /JMC flag to ELF

2022-03-04 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: llvm/test/Instrumentation/JustMyCode/jmc-instrument-elf.ll:1 -; REQUIRES: system-windows -; RUN: opt -jmc-instrument -mtriple=x86_64-pc-windows-msvc -S < %s | FileCheck %s -; RUN: opt -jmc-instrument -mtriple=aarch64-pc-windows-msvc -S

[PATCH] D119910: [clang][debug] port clang-cl /JMC flag to ELF

2022-03-04 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen marked 2 inline comments as done. ychen added a comment. @rnk, thanks for taking a look. Patch updated. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119910/new/ https://reviews.llvm.org/D119910

[PATCH] D119910: [clang][debug] port clang-cl /JMC flag to ELF

2022-03-04 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 413146. ychen added a comment. Herald added a subscriber: dang. - Address Reid's comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119910/new/ https://reviews.llvm.org/D119910 Files:

[PATCH] D119910: [clang][debug] port clang-cl /JMC flag to ELF

2022-03-04 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:5372 + // This controls whether or not we perform JustMyCode instrumentation. + if (TC.getTriple().isOSBinFormatELF() && Args.hasArg(options::OPT_fjmc)) { +if (DebugInfoKind >=

[PATCH] D119910: [clang][debug] port clang-cl /JMC flag to ELF

2022-02-28 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. Gentle ping... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119910/new/ https://reviews.llvm.org/D119910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D119910: [clang][debug] port clang-cl /JMC flag to ELF

2022-02-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. RFC sent: https://discourse.llvm.org/t/rfc-just-my-code-stepping-for-non-msvc-debuggers/60279 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119910/new/ https://reviews.llvm.org/D119910

[PATCH] D119910: [clang][debug] port clang-cl /JMC flag to ELF

2022-02-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. > - how does that work, actually? How does it differentiate between "my" code > and "code that happens to be compiled in the current CU" (e.g. the STL). > What's the significance of the funky `___x@c` symbols? The non-user code is specified by a config file

[PATCH] D119910: [clang][debug] port clang-cl /JMC flag to ELF

2022-02-15 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added reviewers: hans, rnk, aganea, JDevlieghere, labath. Herald added a subscriber: hiraditya. ychen requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. The motivation is to enable the

[PATCH] D118428: [clang-cl] Support the /JMC flag

2022-02-15 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D118428#3312621 , @ychen wrote: > In D118428#3312440 , @paulkirth > wrote: > >> Hi, >> >> We have two failing test cases on Fuchsia's clang canary builder on Windows >> x64. >> >> LLVM

[PATCH] D115844: [ubsan] Using metadata instead of prologue data for function sanitizer

2022-02-15 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 408752. ychen added a comment. Herald added subscribers: jdoerfert, pengfei. - check code model in driver - document `func_sanitizer` in Langref - add a codegen test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D115844: [ubsan] Using metadata instead of prologue data for function sanitizer

2022-02-15 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:5171 (!TargetDecl || !isa(TargetDecl))) { +assert((CGM.getCodeGenOpts().CodeModel == "default" || +CGM.getCodeGenOpts().CodeModel == "small") && pcc wrote: > What

[PATCH] D115844: [ubsan] Using metadata instead of prologue data for function sanitizer

2022-02-14 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D115844#3321190 , @pcc wrote: > On the bug you have: > > define internal fastcc void > @_Z4callIiE4taskv.resume(%_Z4callIiE4taskv.Frame* noalias nonnull > align 8 dereferenceable(24 > ) %FramePtr) #1 prologue <{ i32,

<    1   2   3   4   5   6   7   >