[PATCH] D95984: [CodeGen] Fix codegen for __attribute__((swiftasynccall)).

2021-06-23 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple abandoned this revision. varungandhi-apple added a comment. Herald added a subscriber: ormris. Combined changes into D95561 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95984/new/

[PATCH] D95984: [CodeGen] Fix codegen for __attribute__((swiftasynccall)).

2021-04-05 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple updated this revision to Diff 335293. varungandhi-apple added a comment. Herald added subscribers: llvm-commits, dexonsmith, hiraditya. Herald added a project: LLVM. 1. Remove '::' when calling static function. 2. Fix bug in function merging around missing musttail. 3. Add

[PATCH] D95984: [CodeGen] Fix codegen for __attribute__((swiftasynccall)).

2021-03-29 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:1240 + if (auto *CE = dyn_cast(RV)) +::makeTailCallIfSwiftAsync(CE, Builder, CurFnInfo); +} What's with the explicit `::` here? Repository: rG LLVM Github Monorepo

[PATCH] D95984: [CodeGen] Fix codegen for __attribute__((swiftasynccall)).

2021-03-25 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple updated this revision to Diff 333421. varungandhi-apple added a comment. Fix codegen + add tests for methods and function pointers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95984/new/ https://reviews.llvm.org/D95984 Files:

[PATCH] D95984: [CodeGen] Fix codegen for __attribute__((swiftasynccall)).

2021-03-11 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple updated this revision to Diff 329889. varungandhi-apple added a comment. Use musttail call instead of tail call. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95984/new/ https://reviews.llvm.org/D95984 Files:

[PATCH] D95984: [CodeGen] Fix codegen for __attribute__((swiftasynccall)).

2021-03-02 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple updated this revision to Diff 327510. varungandhi-apple added a comment. Add null check for callee; instead of using getFunctionType() directly. Otherwise, it leads to a crash when compiling gtest-all.cc. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D95984: [CodeGen] Fix codegen for __attribute__((swiftasynccall)).

2021-03-01 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95984/new/ https://reviews.llvm.org/D95984

[PATCH] D95984: [CodeGen] Fix codegen for __attribute__((swiftasynccall)).

2021-02-26 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple updated this revision to Diff 326762. varungandhi-apple added a comment. Added checks for C++. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95984/new/ https://reviews.llvm.org/D95984 Files: clang/lib/CodeGen/CGCall.cpp

[PATCH] D95984: [CodeGen] Fix codegen for __attribute__((swiftasynccall)).

2021-02-24 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Please add some C++ tests, just in case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95984/new/ https://reviews.llvm.org/D95984 ___ cfe-commits mailing list

[PATCH] D95984: [CodeGen] Fix codegen for __attribute__((swiftasynccall)).

2021-02-24 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Okay, seems fine to me. Comment at: clang/lib/CodeGen/CGStmt.cpp:1156 + CallingConv::CC_SwiftAsync)) { +auto CI = cast(()->back()); +CI->setTailCallKind(llvm::CallInst::TCK_Tail); Hmm. I guess this should work in any

[PATCH] D95984: [CodeGen] Fix codegen for __attribute__((swiftasynccall)).

2021-02-24 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple updated this revision to Diff 326203. varungandhi-apple added a comment. Generate tail call when doing codegen for return statement. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95984/new/ https://reviews.llvm.org/D95984 Files:

[PATCH] D95984: [CodeGen] Fix codegen for __attribute__((swiftasynccall)).

2021-02-03 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple added a comment. I am planning to add more tests, figured it is better to put up the patch sooner rather than later. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95984/new/ https://reviews.llvm.org/D95984

[PATCH] D95984: [CodeGen] Fix codegen for __attribute__((swiftasynccall)).

2021-02-03 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple created this revision. varungandhi-apple added a reviewer: rjmccall. varungandhi-apple requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. 1. It should be mapped to LLVM's swifttailcc, which is now available. 2. We should