[PATCH] D92436: [Time-report] Add a flag -ftime-report={per-pass,per-pass-run} to control the pass timing aggregation

2020-12-07 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: llvm/lib/IR/PassTimingInfo.cpp:47 +cl::desc("Time each pass run, printing elapsed time for each run on exit"), +cl::callback([](const bool &) { TimePassesIsEnabled = true; })); + aeubanks wrote: > is this necessary

[PATCH] D92436: [Time-report] Add a flag -ftime-report={per-pass,per-pass-run} to control the pass timing aggregation

2020-12-08 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 rG1821265db681: [Time-report] Add a flag -ftime-report={per-pass,per-pass-run} to control theā€¦ (authored by ychen). Repository: rG LLVM Github Monor

[PATCH] D90486: [NewPM] Add OptimizationLevel param to TargetMachine::registerPassBuilderCallbacks()

2020-11-04 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: llvm/lib/Target/BPF/BPFTargetMachine.cpp:129 bool DebugPassManager) { PB.registerPipelineStartEPCallback([=](ModulePassManager &MPM) { FunctionPassManager FPM(DebugPassManager);

[PATCH] D90870: [NFC][NewPM] Reuse PassBuilder callbacks with -O0

2020-11-12 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. This is NFC and looks like a nice cleaup. So LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90870/new/ https://reviews.llvm.org/D90870 _

[PATCH] D85676: [NewPM] collapsing nested pass mangers of the same type

2020-10-04 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 rG2c94d88e0769: [NewPM] collapsing nested pass mangers of the same type (authored by ychen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D92436: [Time-report] Add a flag -ftime-report={per-pass,per-pass-run} to control the pass timing aggregation

2020-12-01 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added reviewers: efriedma, philip.pfaffe, chandlerc. Herald added subscribers: llvm-commits, cfe-commits, dexonsmith, dang, hiraditya, mgorny. Herald added projects: clang, LLVM. ychen requested review of this revision. Currently, -ftime-report + new pass manage

[PATCH] D81958: [clangd] Add library to semantically strip flags by name.

2020-12-01 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang-tools-extra/clangd/CompileCommands.cpp:356 + HELP, METAVAR, VALUES) \ + if (DriverID::OPT_##ALIAS != DriverID::OPT_INVALID && ALIASARGS == nullptr) \ +AddAlias(DriverID::

[PATCH] D92436: [Time-report] Add a flag -ftime-report={per-pass,per-pass-run} to control the pass timing aggregation

2020-12-02 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 309020. ychen added a comment. - rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92436/new/ https://reviews.llvm.org/D92436 Files: clang/include/clang/Basic/CodeGenOptions.def clang/include/clang/Driver

[PATCH] D87216: [NewPM] Support --print-before/after in NPM

2020-12-03 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen accepted this revision. ychen added a comment. It is very unfortunate that we have to manage and translate between two sets of names (one pass name and one type name). This makes me wonder if we just keep the pass name as the return value of PassInfoMixin::name and get rid of class name e

[PATCH] D87216: [NewPM] Support --print-before/after in NPM

2020-12-03 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D87216#2431626 , @aeubanks wrote: > In D87216#2431508 , @ychen wrote: > >> It is very unfortunate that we have to manage and translate between two sets >> of names (one pass name and one t

[PATCH] D92436: [Time-report] Add a flag -ftime-report={per-pass,per-pass-run} to control the pass timing aggregation

2020-12-04 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 309618. ychen added a comment. - fix rebase error Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92436/new/ https://reviews.llvm.org/D92436 Files: clang/include/clang/Basic/CodeGenOptions.def clang/include/cl

[PATCH] D89158: [NewPM] Run all EP callbacks under -O0

2020-10-27 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. IIUC, this is the NPM version of EP_EarlyAsPossible in legacy PM for O0, right? Between the choice of (1) [this patch and ] reusing all existing EP callbacks and letting optnone filtering out non-required passes (which I think does not work for `-disable-O0-optnone`) and

[PATCH] D89158: [NewPM] Run all EP callbacks under -O0

2020-10-27 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: llvm/include/llvm/Passes/PassBuilder.h:626 + /// typically run at the very beginning. + void runRegisteredO0EPCallbacks(ModulePassManager &MPM, bool DebugLogging); + invokeO0EPCallbacks? I saw there is `PassBuilder::invo

[PATCH] D89158: [NewPM] Run all EP callbacks under -O0

2020-10-27 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: llvm/lib/Passes/PassBuilder.cpp:1659 + bool DebugLogging) { + for (auto &C : PipelineStartEPCallbacks) +C(MPM); asbirlea wrote: > aeubanks wrote: > > ychen wrote: > > > What

[PATCH] D89158: [NewPM] Run all EP callbacks under -O0

2020-10-27 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: llvm/lib/Passes/PassBuilder.cpp:1659 + bool DebugLogging) { + for (auto &C : PipelineStartEPCallbacks) +C(MPM); aeubanks wrote: > ychen wrote: > > asbirlea wrote: > > > aeub

[PATCH] D102244: [llvm][AsmPrinter] Restore source location to register clobber warning

2021-05-12 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. Looks good except for one suggestion and the patch need rebasing on an upstream commit. Comment at: llvm/include/llvm/IR/LLVMContext.h:300 + /// with "warning: " and should not end with a ".". + void emitWarning(unsigned LocCookie, const Twine &Warning

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-05-12 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen marked an inline comment as done. ychen added inline comments. Comment at: clang/include/clang/AST/StmtCXX.h:356-359 Expr *Allocate = nullptr; Expr *Deallocate = nullptr; +Expr *AlignedAllocate = nullptr; +Expr *AlignedDeallocate = nullptr; ---

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-05-12 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 345053. ychen marked an inline comment as done. ychen added a comment. - Address feedbacks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97915/new/ https://reviews.llvm.org/D97915 Files: clang/include/clang/A

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-05-12 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/CodeGen/CGCoroutine.cpp:528-547 CGF.EmitBlock(FreeBB); CGF.EmitStmt(Deallocate); - -auto *AfterFreeBB = CGF.createBasicBlock("after.coro.free"); -CGF.EmitBlock(AfterFreeBB); +CGF.Builder.CreateBr(AfterFreeBB

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-05-12 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/include/clang/AST/StmtCXX.h:356-359 Expr *Allocate = nullptr; Expr *Deallocate = nullptr; +Expr *AlignedAllocate = nullptr; +Expr *AlignedDeallocate = nullptr; ChuanqiXu wrote: > ychen wrote: > > Ch

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-05-12 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/CodeGen/CGCoroutine.cpp:528-547 CGF.EmitBlock(FreeBB); CGF.EmitStmt(Deallocate); - -auto *AfterFreeBB = CGF.createBasicBlock("after.coro.free"); -CGF.EmitBlock(AfterFreeBB); +CGF.Builder.CreateBr(AfterFreeBB

[PATCH] D102244: [llvm][AsmPrinter] Restore source location to register clobber warning

2021-05-13 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. LGTM. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102244/new/ https://reviews.llvm.org/D102244

[PATCH] D102531: PR45881: Properly use CXXThisOverride for templated lambda

2021-05-14 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added reviewers: rsmith, faisalv, aaron.ballman. ychen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. - `this` used in lambda expression parameter declarations needs no capture. - Set up CXXThisOverride f

[PATCH] D102531: PR45881: Properly use CXXThisOverride for templated lambda

2021-05-17 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 346010. ychen added a comment. - Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102531/new/ https://reviews.llvm.org/D102531 Files: clang/lib/Sema/SemaExprCXX.cpp clang/lib/Sema/SemaTemplate

[PATCH] D102531: PR45881: Properly use CXXThisOverride for templated lambda

2021-05-25 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/D102531/new/ https://reviews.llvm.org/D102531 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D99903: [Clang][Sema] better -Wcast-function-type diagnose for pointer parameters and parameters with cv-qualifiers

2021-05-25 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/D99903/new/ https://reviews.llvm.org/D99903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[PATCH] D103495: [static initializers] Don't put ordered dynamic initializers of static variables into global_ctors

2021-06-02 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. > The LLVM IR langref says that llvm.global_ctors are called in ascending > priority order, and the order between initializers is not defined. That's not > very helpful and often doesn't reflect reality. I wonder if we could do two > things, perhaps separately: > > 1. emi

[PATCH] D103495: [static initializers] Don't put ordered dynamic initializers of static variables into global_ctors

2021-06-02 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D103495#2794684 , @rnk wrote: > In D103495#2794667 , @ychen wrote: > >> Is there anything preventing us from using the existing priority field to >> define the order instead of introduci

[PATCH] D103938: Diagnose -Wunused-value in constant evaluation context

2021-09-16 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/D103938/new/ https://reviews.llvm.org/D103938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[PATCH] D103938: Diagnose -Wunused-value in constant evaluation context

2021-09-17 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D103938#3006540 , @aaron.ballman wrote: > There were a few behavioral changes to tests that I had questions about. > Also, can you add an additional test case that shows the behavior when the > left operand of the comma expres

[PATCH] D103938: Diagnose -Wunused-value in constant evaluation context

2021-09-17 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 373390. ychen added a comment. - Restore an useful comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103938/new/ https://reviews.llvm.org/D103938 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D103938: Diagnose -Wunused-value in constant evaluation context

2021-09-17 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. Thanks for the review. Comment at: clang/test/Sema/exprs.c:19 if (0) { -0 / (0 ? 1 : 0); // expected-warning {{expression result unused}} } ychen wrote: > aaron.ballman wrote: > > Why did we lose this diagnostic (and the above c

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-20 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 rG63e0d038fc20: Diagnose -Wunused-value based on CFG reachability (authored by ychen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-21 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. @uabelho @gulfem Thanks for the remainder. I could not reproduce the issue with my Ubuntu box. Could you please attach a reproducer? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103938/new/ https://reviews.llvm.org/D103938

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-21 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D103938#3012940 , @ychen wrote: > @uabelho @gulfem Thanks for the remainder. I could not reproduce the issue > with my Ubuntu box. Could you please attach a reproducer? Never mind, I think I need "-Werror" to reproduce these.

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-21 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen reopened this revision. ychen added a comment. This revision is now accepted and ready to land. reopen to fix tests failure. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103938/new/ https://reviews.llvm.org/D103938 _

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-21 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 374078. ychen edited the summary of this revision. ychen added a comment. Herald added a project: libc++. Herald added a subscriber: libcxx-commits. Herald added a reviewer: libc++. This revision now requires review to proceed. - Check the scope correctly: first

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-21 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 374080. ychen added a comment. - Remove accidentally included change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103938/new/ https://reviews.llvm.org/D103938 Files: clang/include/clang/Basic/DiagnosticSemaK

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-21 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen requested review of this revision. ychen added a comment. This and 45c0ebe00efb should make `-Werror` build of libcxx tests pass. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-22 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 rGcbbf2e8c8ae7: Diagnose -Wunused-value based on CFG reachability (authored by ychen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-23 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D103938#3018588 , @aaron.ballman wrote: > In D103938#3013503 , @thakis wrote: > >> This flags this code from absl: >> >> template > typename std::enable_if::value, >> int>

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-27 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D103938#3018918 , @ychen wrote: > In D103938#3018588 , @aaron.ballman > wrote: > >> In D103938#3013503 , @thakis wrote: >> >>> This flags this c

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-27 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D103938#3025265 , @aaron.ballman wrote: > In D103938#3024938 , @ychen wrote: > >> In D103938#3018918 , @ychen wrote: >> >>> In D103938#3018588 <

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-27 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 375414. ychen added a comment. - Disable comma operator diagnose in SFINAE context. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103938/new/ https://reviews.llvm.org/D103938 Files: clang/include/clang/Basic/D

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-27 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 375422. ychen added a comment. - Add a test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103938/new/ https://reviews.llvm.org/D103938 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/incl

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-28 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 375619. ychen marked an inline comment as done. ychen added a comment. - Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103938/new/ https://reviews.llvm.org/D103938 Files: clang/include/clang/

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-28 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 rG27a972a699cd: Diagnose -Wunused-value based on CFG reachability (authored by ychen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D77491: [Sema] Introduce BuiltinAttr, per-declaration builtin-ness

2021-10-02 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D77491#3038204 , @tambre wrote: > Abandoning since I don't think there's any further review/actions to be done > here. > D58531 would be the solution for the raised > `pthread_create()` issue.

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-10-03 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/include/clang/Sema/Sema.h:5120 + /// + /// \param Statement If Statement is non-null, delay reporting the + /// diagnostic until the function body is parsed, and then do a basic xbolva00 wrote: > Please adjust doc

[PATCH] D111049: [Support] Change fatal_error_handler_t to take a const char* instead of std::string

2021-10-04 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. Sounds good to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111049/new/ https://reviews.llvm.org/D111049 ___

[PATCH] D97449: [Diagnose] Unify MCContext and LLVMContext diagnosing

2021-02-24 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added reviewers: MaskRay, rnk, tejohnson, qcolombet, anemet. Herald added subscribers: dexonsmith, kerbowa, hiraditya, nhaehnle, jvesely. ychen requested review of this revision. Herald added projects: clang, LLDB, LLVM. Herald added subscribers: llvm-commits, lld

[PATCH] D103885: [clang] Suppress warnings for tautological comparison in generated macro code

2021-06-08 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. We could use a table to avoid the warning and speed the build a little bit. https://reviews.llvm.org/D98110 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103885/new/ https://reviews.llvm.org/D103885

[PATCH] D103885: [clang] Suppress warnings for tautological comparison in generated macro code

2021-06-08 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D103885#2805988 , @aaron.ballman wrote: > In D103885#2805758 , @ychen wrote: > >> We could use a table to avoid the warning and speed the build a little bit. >> https://reviews.llvm.org

[PATCH] D103938: Diagnose -Wunused-value in constant evaluation context

2021-06-08 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added reviewers: aaron.ballman, rsmith. ychen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. GCC/MSVC diagnoses in such cases, probably it makes sense to do the same for Clang. https://godbolt.org/z/7zxb8

[PATCH] D102531: PR45881: Properly use CXXThisOverride for templated lambda

2021-06-08 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/D102531/new/ https://reviews.llvm.org/D102531 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[PATCH] D103938: Diagnose -Wunused-value in constant evaluation context

2021-06-10 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 351343. ychen added a comment. - Add `DiagIfReachable` and use it in `Sema::DiagnoseUnusedExprResult`. - Update tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103938/new/ https://reviews.llvm.org/D103938 F

[PATCH] D103938: Diagnose -Wunused-value in constant evaluation context

2021-06-10 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D103938#2806885 , @rsmith wrote: > This will diagnose unused values in unreachable code in constant-evaluated > contexts; that doesn't seem quite right. For example, in: > > void f() { > new double[false ? (1, 2) : 3][fals

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-06-15 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 352189. ychen added a comment. - Merge D102145 by @ChuanqiXu's request. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97915/new/ https://reviews.llvm.org/D97915 Files: clang/

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-06-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 352617. ychen marked 3 inline comments as done. ychen added a comment. - Remove AlignedAllocator & AlignedDeallocator. - Use 'OverAllocateFrame' - Get rid of `if (HasAlignArg)` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-06-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/CodeGen/CGCoroutine.cpp:743-744 +CGM.getIntrinsic(llvm::Intrinsic::coro_align, SizeTy)); +auto *AlignedUpAddr = EmitBuiltinAlignTo(AlignedAllocateCall, CoroAlign, + S.getAli

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-06-17 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 352810. ychen added a comment. - Rebase correctly Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97915/new/ https://reviews.llvm.org/D97915 Files: clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeGen/CGCoroutine

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-06-17 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 352908. ychen marked 2 inline comments as done. ychen added a comment. - Not use `void *` in EmitBuiltinAlignTo signature. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97915/new/ https://reviews.llvm.org/D97915

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-06-17 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/CodeGen/CGCoroutine.cpp:437-475 +void emitDynamicAlignedDealloc(CodeGenFunction &CGF, + llvm::BasicBlock *AlignedFreeBB, + llvm::CallInst *CoroFree) { + llvm::CallInst

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-06-22 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen marked 5 inline comments as done. ychen added a comment. In D97915#2829581 , @ChuanqiXu wrote: > A remained question. > > - what's the semantics if user specified their allocation/deallocation > functions? > > Previously, we discussed for the ::oper

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-06-22 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 353567. ychen marked an inline comment as done. ychen added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97915/new/ https://reviews.llvm.org/D97915 Files: clang/lib/CodeGen/CGBui

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-06-23 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D97915#2832667 , @ChuanqiXu wrote: > In D97915#2832446 , @ychen wrote: > >> In D97915#2829581 , @ChuanqiXu >> wrote: >> >>> A remained question. >>

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-06-23 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 353855. ychen added a comment. - Update intrinsics documentation. - Inline `EmitBuiltinAlignTo` as `emitAlignUpTo`. - Address other comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97915/new/ https://revie

[PATCH] D103938: Diagnose -Wunused-value in constant evaluation context

2021-06-23 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/D103938/new/ https://reviews.llvm.org/D103938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[PATCH] D103938: Diagnose -Wunused-value in constant evaluation context

2021-06-28 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 355054. ychen added a comment. - Add test case for 'constexpr if' Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103938/new/ https://reviews.llvm.org/D103938 Files: clang/include/clang/Sema/Sema.h clang/lib/S

[PATCH] D103938: Diagnose -Wunused-value in constant evaluation context

2021-06-28 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D103938#2836470 , @rsmith wrote: > I've given this some more thought, and I think it's only the "constant > evaluated" check that we want to bypass in this case. It's common to use > `sizeof` or `decltype` with a comma operator

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-06-29 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. > Thanks for clarifying. Let's solve the semantics problem first. > With the introduction about 'raw frame', I think it's necessary to introduce > this concept in the section 'Switched-Resume Lowering' or even the section > 'Introduction' in the document. Add a section to

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-06-29 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 355401. ychen added a comment. - Add description of `raw frame` in `Coroutines.rst`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97915/new/ https://reviews.llvm.org/D97915 Files: clang/lib/CodeGen/CGCoroutin

[PATCH] D95807: [Coroutines] Add the newly generated SCCs back to the CGSCC work queue after CoroSplit actually happened

2021-06-30 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: llvm/lib/Transforms/Coroutines/CoroSplit.cpp:2115 + << "\n"); F.removeFnAttr(CORO_PRESPLIT_ATTR); drive-by nit: would it be better to move it up near `Coroutines.push_back(&N);`? =

[PATCH] D95807: [Coroutines] Add the newly generated SCCs back to the CGSCC work queue after CoroSplit actually happened

2021-06-30 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: llvm/lib/Transforms/Coroutines/CoroSplit.cpp:2001 -if ((Shape.ABI == coro::ABI::Async || Shape.ABI == coro::ABI::Retcon || - Shape.ABI == coro::ABI::RetconOnce) && -!Shape.CoroSuspends.empty()) { - // Run the CGS

[PATCH] D102531: PR45881: Properly use CXXThisOverride for templated lambda

2021-07-06 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 356796. ychen added a comment. - address feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102531/new/ https://reviews.llvm.org/D102531 Files: clang/lib/Sema/SemaExprCXX.cpp clang/lib/Sema/SemaTemplate.

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-07-06 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 356838. ychen marked 2 inline comments as done. ychen added a comment. - Move `raw frame` description to `Switched-Resume` section. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97915/new/ https://reviews.llvm.or

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-07-06 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D97915#2859237 , @ChuanqiXu wrote: > In D97915#2848816 , @ychen wrote: > >>> Thanks for clarifying. Let's solve the semantics problem first. >>> With the introduction about 'raw frame', I t

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-07-06 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D97915#2860984 , @ChuanqiXu wrote: > In D97915#2860916 , @ychen wrote: > >> In D97915#2859237 , @ChuanqiXu >> wrote: >> >>> In D97915#2848816

[PATCH] D103938: Diagnose -Wunused-value in constant evaluation context

2021-07-07 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/D103938/new/ https://reviews.llvm.org/D103938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-07-07 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D97915#2861178 , @ChuanqiXu wrote: > In D97915#2861036 , @ychen wrote: > >> In D97915#2860984 , @ChuanqiXu >> wrote: >> >>> In D97915#2860916

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-07-07 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D97915#2863581 , @ChuanqiXu wrote: > In D97915#2862419 , @ychen wrote: > >>> It looks not hard to implement. And we don't need to refactor the CodeGen >>> part a lot. In this way, I think

[PATCH] D113145: Remove two sema checkings as assertions introduced by D79719.

2021-11-03 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added reviewers: hubert.reinterpretcast, Xiangling_L. ychen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Sema layer should handle these already. Otherwise checking build of the compiler would crash for

[PATCH] D113146: Fix the assertion in Sema::ActOnDependentMemberExpr

2021-11-03 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added a reviewer: rsmith. ychen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. 617007240cbfb97c introduced the use of ActOnDependent

[PATCH] D113146: Fix the assertion in Sema::ActOnDependentMemberExpr

2021-11-04 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 384858. ychen added a comment. - Check that TemplateArgs maybe null. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113146/new/ https://reviews.llvm.org/D113146 Files: clang/lib/Sema/SemaExprMember.cpp clang/

[PATCH] D113145: Remove two sema checkings as assertions introduced by D79719.

2021-11-04 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. Yeah, that would be better. I just realized it earlier today. I'll attempt that instead. Thanks for the suggestion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113145/new/ https://reviews.llvm.org/D113145

[PATCH] D113145: Mark virtual method declaration in union as invalid

2021-11-05 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 384975. ychen added a comment. - Mark virtual function in union invalid. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113145/new/ https://reviews.llvm.org/D113145 Files: clang/lib/Sema/SemaDecl.cpp clang/te

[PATCH] D113245: [Sema] Mark explicit specialization declaration in a friend invalid

2021-11-05 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added reviewers: rsmith, Mordante. ychen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Down the path, if there is a implicit instantiation, this may trigger the assertion "Member specialization must be a

[PATCH] D113145: [Sema] Mark virtual method declaration in union as invalid

2021-11-09 Thread Yuanfang Chen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7562c64197ac: [Sema] Mark virtual method declaration in union as invalid (authored by ychen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113145/new/ http

[PATCH] D97449: [Diagnose] Unify MCContext and LLVMContext diagnosing

2021-02-25 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D97449#2588804 , @rnk wrote: > This still feels a bit messy and I don't totally understand how it all fits > together, but I'm super supportive of getting rid of the inline asm > diagnostic handler and standardizing on Diagnosti

[PATCH] D97449: [Diagnose] Unify MCContext and LLVMContext diagnosing

2021-02-25 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: llvm/include/llvm/MC/MCContext.h:33 #include "llvm/Support/MD5.h" +#include "llvm/Support/SourceMgr.h" #include "llvm/Support/raw_ostream.h" rnk wrote: > MCContext.h is popular, let's try not to leak SourceMgr.h as an in

[PATCH] D97449: [Diagnose] Unify MCContext and LLVMContext diagnosing

2021-02-25 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 326597. ychen added a comment. - Refrain from including SourceMgr.h in MCContext.h Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97449/new/ https://reviews.llvm.org/D97449 Files: clang/lib/CodeGen/CodeGenActio

[PATCH] D97449: [Diagnose] Unify MCContext and LLVMContext diagnosing

2021-02-26 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 326797. ychen added a comment. - Simplify MCContext changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97449/new/ https://reviews.llvm.org/D97449 Files: clang/lib/CodeGen/CodeGenAction.cpp lldb/source/Ex

[PATCH] D97449: [Diagnose] Unify MCContext and LLVMContext diagnosing

2021-03-01 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 327155. ychen added a comment. - Add clang Diagnostic Category/Group/Kinds for SourceMgr errors - Add comments in MCContext - Simplify Clang handler - Implement DiagnosticInfoSrcMgr::print - Simplify DiagnosticInfoSrcMgr ctor Repository: rG LLVM Github Monor

[PATCH] D97449: [Diagnose] Unify MCContext and LLVMContext diagnosing

2021-03-01 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/CodeGen/CodeGenAction.cpp:477 + StringRef Message = D.getMessage(); + if (Message.startswith("error: ")) +Message = Message.substr(7); MaskRay wrote: > `StringRef::consume_front` > > I know you are moving

[PATCH] D97449: [Diagnose] Unify MCContext and LLVMContext diagnosing

2021-03-01 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: llvm/lib/MC/MCContext.cpp:870 +std::function GetMessage) { + SourceMgr SM; + const SourceMgr *SMP = &SM; MaskRay wrote: > This looks a bit strange: we need to construct a fresh SourceMgr to print a > diagnostic. I'v

[PATCH] D97449: [Diagnose] Unify MCContext and LLVMContext diagnosing

2021-03-01 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 327162. ychen added a comment. - Use StringRef::consume_front Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97449/new/ https://reviews.llvm.org/D97449 Files: clang/include/clang/Basic/DiagnosticCategories.td

[PATCH] D97449: [Diagnose] Unify MCContext and LLVMContext diagnosing

2021-03-01 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D97449#2595390 , @MaskRay wrote: > Is the https://github.com/ClangBuiltLinux/linux/issues/1269 unreachable error > fixed? > > Reproduce: > > git clone https://android.googlesource.com/kernel/common.git --branch > android-4.19-

[PATCH] D97449: [Diagnose] Unify MCContext and LLVMContext diagnosing

2021-03-01 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 327256. ychen added a comment. - Use function_ref Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97449/new/ https://reviews.llvm.org/D97449 Files: clang/include/clang/Basic/DiagnosticCategories.td clang/inclu

[PATCH] D97449: [Diagnose] Unify MCContext and LLVMContext diagnosing

2021-03-01 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: llvm/lib/MC/MCContext.cpp:869 +SMLoc Loc, +std::function GetMessage) { + SourceMgr SM; MaskRay wrote: > ychen wrote: > > MaskRay wrote: > > > Use lightweight function_ref since you don't need to store the callback

[PATCH] D97449: [Diagnose] Unify MCContext and LLVMContext diagnosing

2021-03-01 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/include/clang/Basic/DiagnosticFrontendKinds.td:22 def note_fe_inline_asm_here : Note<"instantiated into assembly here">; +def err_fe_source_mgr : Error<"%0">, CatSourceMgr; +def warn_fe_source_mgr : Warning<"%0">, CatSourceMgr, InG

<    1   2   3   4   5   6   7   >