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

2023-03-03 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:19907 + if (Iter != I.end()) { +SemaRef.PendingInstantiations.push_back(*Iter); +I.erase(Iter); Doesn't this invalidate the iterators? Repository: rG LLVM

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

2023-03-03 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 rGe423885e272c: [CodeGen] guarantee templated static variables are initialized in the reverseā€¦ (authored by ychen). Repository: rG LLVM Github Monor

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

2023-03-03 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 502068. ychen added a comment. This revision is now accepted and ready to land. - rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127259/new/ https://reviews.llvm.org/D127259 Files: clang/include/clang/Se

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

2023-03-03 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D127259#4156314 , @erichkeane wrote: > I don't see much compile-time concerns myself, Indeed. http://llvm-compile-time-tracker.com/compare.php?from=54faf22f7b947464a070669711100211e87f3ea8&to=ad87d0dbd44f3a8f66c31fa9b731aea34c

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

2023-02-27 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. I don't see much compile-time concerns myself, and this seems to fix a pretty serious regression, I think this is acceptable once Aaron and the author think so as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

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

2022-08-23 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen planned changes to this revision. ychen added a comment. I'll do a compile-time impact measurement. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127259/new/ https://reviews.llvm.org/D127259 ___ cf

[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 co

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

2022-06-16 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a subscriber: aaron.ballman. rnk added a comment. 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 code. Conceptually, this change seems small en

[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 https://lists.llvm.

[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