Page MenuHomePhabricator

ChuanqiXu (Chuanqi Xu)
User

Projects

User does not belong to any projects.

User Details

User Since
Jun 22 2020, 11:08 PM (12 w, 6 d)

Recent Activity

Yesterday

ChuanqiXu added inline comments to D87596: [Coroutines] Reuse storage for local variables with non-overlapping lifetimes.
Sun, Sep 20, 2:17 AM · Restricted Project

Thu, Sep 17

ChuanqiXu updated the diff for D87596: [Coroutines] Reuse storage for local variables with non-overlapping lifetimes.

Gate this optimization under optimization level and put the optimization code into a helper class.

Thu, Sep 17, 12:12 AM · Restricted Project

Mon, Sep 14

ChuanqiXu added inline comments to D87596: [Coroutines] Reuse storage for local variables with non-overlapping lifetimes.
Mon, Sep 14, 9:47 PM · Restricted Project
ChuanqiXu added inline comments to D87596: [Coroutines] Reuse storage for local variables with non-overlapping lifetimes.
Mon, Sep 14, 8:55 PM · Restricted Project
ChuanqiXu added a comment to D87596: [Coroutines] Reuse storage for local variables with non-overlapping lifetimes.

Thank you for working on this optimization!

This type of optimizations is typically not enabled in O0, and we probably don't want to either. Should we gate it under the optimization level?

This optimization depends on lifetime markers, which would not be produced in O0. So this optimization won't be enabled in O0.

That's not entirely true though. lifetime markers could be enabled with ASAN in O0 for instance.

Mon, Sep 14, 8:10 PM · Restricted Project
ChuanqiXu added inline comments to D87596: [Coroutines] Reuse storage for local variables with non-overlapping lifetimes.
Mon, Sep 14, 8:06 PM · Restricted Project
ChuanqiXu added a comment to D87596: [Coroutines] Reuse storage for local variables with non-overlapping lifetimes.

Thank you for working on this optimization!

This type of optimizations is typically not enabled in O0, and we probably don't want to either. Should we gate it under the optimization level?

Mon, Sep 14, 8:02 PM · Restricted Project

Sun, Sep 13

ChuanqiXu requested review of D87596: [Coroutines] Reuse storage for local variables with non-overlapping lifetimes.
Sun, Sep 13, 11:09 PM · Restricted Project

Thu, Sep 3

ChuanqiXu added inline comments to D86859: [Coroutine] Make dealing with alloca spills more robust.
Thu, Sep 3, 6:30 PM · Restricted Project
ChuanqiXu added inline comments to D86859: [Coroutine] Make dealing with alloca spills more robust.
Thu, Sep 3, 6:28 PM · Restricted Project
ChuanqiXu added inline comments to D86859: [Coroutine] Make dealing with alloca spills more robust.
Thu, Sep 3, 1:29 AM · Restricted Project
ChuanqiXu added inline comments to D86859: [Coroutine] Make dealing with alloca spills more robust.
Thu, Sep 3, 1:14 AM · Restricted Project

Wed, Aug 26

ChuanqiXu added a comment to D86672: [StackSafety] Ignore allocas with partial lifetime markers.

isPointerOffset is not what I need

Wed, Aug 26, 10:43 PM · Restricted Project
ChuanqiXu added inline comments to D84630: [StackSafety] Skip ambiguous lifetime analysis.
Wed, Aug 26, 6:34 PM · Restricted Project
ChuanqiXu added inline comments to D84630: [StackSafety] Skip ambiguous lifetime analysis.
Wed, Aug 26, 12:12 AM · Restricted Project

Aug 18 2020

ChuanqiXu added a comment to D85399: [NFC][StackSafety] Test that StackLifetime looks through stripPointerCasts.

LGTM with some updates

Aug 18 2020, 6:33 PM · Restricted Project
ChuanqiXu added a comment to D85399: [NFC][StackSafety] Test that StackLifetime looks through stripPointerCasts.

The test is still could be useful
Maybe something like this llvm/test/Analysis/StackSafetyAnalysis/lifetime.ll ?

Aug 18 2020, 4:04 AM · Restricted Project
ChuanqiXu updated the diff for D85399: [NFC][StackSafety] Test that StackLifetime looks through stripPointerCasts.
Aug 18 2020, 4:02 AM · Restricted Project
ChuanqiXu added a comment to D85399: [NFC][StackSafety] Test that StackLifetime looks through stripPointerCasts.

This function was changed
Is this issue still relevant?
If this is still needed, could you please make this a regular lit test?

Aug 18 2020, 2:37 AM · Restricted Project

Aug 12 2020

ChuanqiXu added a comment to D85399: [NFC][StackSafety] Test that StackLifetime looks through stripPointerCasts.

@RKSimon , gentle ping~

Aug 12 2020, 11:17 PM · Restricted Project

Aug 6 2020

ChuanqiXu added a comment to D85399: [NFC][StackSafety] Test that StackLifetime looks through stripPointerCasts.

test case?

Aug 6 2020, 7:42 PM · Restricted Project
ChuanqiXu updated the diff for D85399: [NFC][StackSafety] Test that StackLifetime looks through stripPointerCasts.

Update test case

Aug 6 2020, 7:41 PM · Restricted Project
ChuanqiXu updated the diff for D85399: [NFC][StackSafety] Test that StackLifetime looks through stripPointerCasts.
Aug 6 2020, 7:38 PM · Restricted Project

Aug 5 2020

ChuanqiXu closed D85279: [Coroutines] Use `Value::stripPointerCasts` to collect lifetime marker of `alloca` in CoroFrame.
Aug 5 2020, 11:56 PM · Restricted Project
ChuanqiXu updated the summary of D85399: [NFC][StackSafety] Test that StackLifetime looks through stripPointerCasts.
Aug 5 2020, 11:56 PM · Restricted Project
ChuanqiXu requested review of D85399: [NFC][StackSafety] Test that StackLifetime looks through stripPointerCasts.
Aug 5 2020, 11:45 PM · Restricted Project
ChuanqiXu committed rG92f1f1e40d4c: [Coroutines] Use to collect lifetime marker of in CoroFrame Differential… (authored by ChuanqiXu).
[Coroutines] Use to collect lifetime marker of in CoroFrame Differential…
Aug 5 2020, 11:22 PM
ChuanqiXu updated the summary of D85279: [Coroutines] Use `Value::stripPointerCasts` to collect lifetime marker of `alloca` in CoroFrame.
Aug 5 2020, 7:24 PM · Restricted Project
ChuanqiXu added a comment to D85279: [Coroutines] Use `Value::stripPointerCasts` to collect lifetime marker of `alloca` in CoroFrame.

LGTM,Thank you, Please merge the testcases into one file.

Aug 5 2020, 7:23 PM · Restricted Project
ChuanqiXu updated the diff for D85279: [Coroutines] Use `Value::stripPointerCasts` to collect lifetime marker of `alloca` in CoroFrame.

Create BitCastInst directly instead of using IRBuilder

Aug 5 2020, 7:09 PM · Restricted Project
ChuanqiXu updated the diff for D85279: [Coroutines] Use `Value::stripPointerCasts` to collect lifetime marker of `alloca` in CoroFrame.

Due to my mistake, the diff updated before is a draft. It is terribly sorry if it confuses any one...

Aug 5 2020, 12:34 AM · Restricted Project
ChuanqiXu abandoned D85279: [Coroutines] Use `Value::stripPointerCasts` to collect lifetime marker of `alloca` in CoroFrame.
Aug 5 2020, 12:22 AM · Restricted Project
ChuanqiXu requested review of D85279: [Coroutines] Use `Value::stripPointerCasts` to collect lifetime marker of `alloca` in CoroFrame.
Aug 5 2020, 12:16 AM · Restricted Project

Aug 3 2020

ChuanqiXu abandoned D84821: [InstCombine] Don't transfer BitCastInst at InstCombine pass when the user of BitCast is lifetime marker.
Aug 3 2020, 1:50 AM · Restricted Project

Aug 2 2020

ChuanqiXu closed D84135: [NFC][IR] add comments and a unit test for User::replaceUsesOfWith.
Aug 2 2020, 8:19 PM · Restricted Project

Jul 30 2020

ChuanqiXu added a comment to D84821: [InstCombine] Don't transfer BitCastInst at InstCombine pass when the user of BitCast is lifetime marker.

I don't think this is the right approach to the problem. Can you give some more information on which places in LLVM assume that only bitcasts feed into lifetime intrinsics?

From the CodeExtractor.cpp, CoroFrame.cpp and StackLifetime.cpp, I find such assumptions. I also find that there are other methods to collect lifetime marker of an instruction. For example, in the Inline Module, it finds among all the users of the instruction I to find which is used by lifetime marker. And in the InstCombineLoadStore.cpp, I find it collects lifetime marker by calculates the users with kind BitCast, GEP and AddrSpaceCastInst (which means there are cases which are not covered by this patch). What I want to say here is that the style of collecting lifetime marker seems a little out-of-order.

I'm not sure any such assumption being made is sane. Those passes should be fixed instead.

Yes. We can fix this problem by either fixing other passes or fixing this pass. We need find out that which one is more natural. In my thought, when I want to collect lifetime marker as a newbie here, I will go to see how the lifetime marker is created. So I find CreateLifetimeStart and CreateLifetimeEnd in LLVM and CreateCall ('lifetime_start' or lifetime_end`') in clang's CodeGen` module. In all of the methods, the logic is to judge whether the type of the source value is i8*. If the type of the source value is i8*, the Create* methods will create a direct call to lifetime intrinsics. Otherwise, the Create* methods will create a BitCast to convert the type of source value to i8*. So from the process, I think it is natural for code reader who is not so familiar with LLVM to think that he can collect lifetime marker by judge the instruction itself and the users who is BitCastInst.

Jul 30 2020, 3:57 AM · Restricted Project

Jul 29 2020

ChuanqiXu added a comment to D84821: [InstCombine] Don't transfer BitCastInst at InstCombine pass when the user of BitCast is lifetime marker.

I don't think this is the right approach to the problem. Can you give some more information on which places in LLVM assume that only bitcasts feed into lifetime intrinsics?

Jul 29 2020, 10:52 PM · Restricted Project

Jul 28 2020

ChuanqiXu retitled D84821: [InstCombine] Don't transfer BitCastInst at InstCombine pass when the user of BitCast is lifetime marker from Don't transfer BitCastInst at InstCombine pass when the user of BitCast is lifetime marker to [InstCombine] Don't transfer BitCastInst at InstCombine pass when the user of BitCast is lifetime marker.
Jul 28 2020, 8:46 PM · Restricted Project
ChuanqiXu requested review of D84821: [InstCombine] Don't transfer BitCastInst at InstCombine pass when the user of BitCast is lifetime marker.
Jul 28 2020, 8:46 PM · Restricted Project
ChuanqiXu committed rGd3527052fc2a: [NFC] Edit the comment for the return type of await_suspend (authored by ChuanqiXu).
[NFC] Edit the comment for the return type of await_suspend
Jul 28 2020, 7:22 PM
ChuanqiXu committed rGdd4106d22ef6: [NFC] Edit the comment in User::replaceUsesOfWith (authored by ChuanqiXu).
[NFC] Edit the comment in User::replaceUsesOfWith
Jul 28 2020, 7:02 PM

Jul 22 2020

ChuanqiXu updated the diff for D84137: [NFC][Coroutines] Update the comment in SemaCoroutine.cpp for the return type of await_suspend().
Jul 22 2020, 8:26 PM
ChuanqiXu added a comment to D84135: [NFC][IR] add comments and a unit test for User::replaceUsesOfWith.

For NFC changes please tag so (you can find plenty of examples in the history). Please upload the full diff (arc diff or git diff 'HEAD^' -U9999).


When you commit, please drop Reviewers: Subscribers: Tags: and the text Summary: from the git commit with the following script:

arcfilter () {
        arc amend
        git log -1 --pretty=%B | awk '/Reviewers:|Subscribers:/{p=1} /Reviewed By:|Differential Revision:/{p=0} !p && !/^Summary:$/ {sub(/^Summary: /,"");print}' | git commit --amend --date=now -F -
}

Reviewed By: is considered important by some people. Please keep the tag. (--date=now is my personal preference (author dates are usually not useful. Using committer dates can make log almost monotonic in time))

llvm/utils/git/pre-push.py can validate the message does not include unneeded tags.

Jul 22 2020, 8:25 PM · Restricted Project
ChuanqiXu updated the diff for D84135: [NFC][IR] add comments and a unit test for User::replaceUsesOfWith.
Jul 22 2020, 8:22 PM · Restricted Project
ChuanqiXu retitled D84135: [NFC][IR] add comments and a unit test for User::replaceUsesOfWith from [IR] add comments and a unit test for User::replaceUsesOfWith to [NFC][IR] add comments and a unit test for User::replaceUsesOfWith.
Jul 22 2020, 8:16 PM · Restricted Project

Jul 20 2020

ChuanqiXu added a reviewer for D84137: [NFC][Coroutines] Update the comment in SemaCoroutine.cpp for the return type of await_suspend(): junparser.
Jul 20 2020, 12:10 AM
ChuanqiXu created D84137: [NFC][Coroutines] Update the comment in SemaCoroutine.cpp for the return type of await_suspend().
Jul 20 2020, 12:10 AM

Jul 19 2020

ChuanqiXu added a reviewer for D84135: [NFC][IR] add comments and a unit test for User::replaceUsesOfWith: junparser.
Jul 19 2020, 11:08 PM · Restricted Project
Herald added a project to D84135: [NFC][IR] add comments and a unit test for User::replaceUsesOfWith: Restricted Project.
Jul 19 2020, 11:07 PM · Restricted Project

Jun 28 2020

ChuanqiXu added a comment to D82442: [Coroutines] Warning if the return type of coroutine_handle::address is not void*.

Hi @modocache ,may I ask for your option about this patch?

Jun 28 2020, 7:48 PM · Restricted Project
ChuanqiXu updated subscribers of D82442: [Coroutines] Warning if the return type of coroutine_handle::address is not void*.
Jun 28 2020, 7:48 PM · Restricted Project
ChuanqiXu updated the diff for D82442: [Coroutines] Warning if the return type of coroutine_handle::address is not void*.

re-upload the patch due to previous misuse of Phabricator , sorry..

Jun 28 2020, 6:01 AM · Restricted Project
ChuanqiXu updated the diff for D82442: [Coroutines] Warning if the return type of coroutine_handle::address is not void*.

Because of D82029, the promise_type::final_suspend() should declare with noexcept specifier .

Jun 28 2020, 5:29 AM · Restricted Project

Jun 24 2020

ChuanqiXu created D82442: [Coroutines] Warning if the return type of coroutine_handle::address is not void*.
Jun 24 2020, 2:40 AM · Restricted Project