davidxl (David Li)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 13 2015, 9:48 AM (131 w, 4 d)

Recent Activity

Today

davidxl added inline comments to D39145: [PM] Add pgo-memop-opt pass to the new pass manager.
Fri, Oct 20, 3:30 PM
davidxl added inline comments to D39145: [PM] Add pgo-memop-opt pass to the new pass manager.
Fri, Oct 20, 3:14 PM

Wed, Oct 18

davidxl added inline comments to D39028: Irreducible loop metadata for more accurate block frequency under PGO..
Wed, Oct 18, 10:08 AM

Tue, Oct 17

davidxl added inline comments to D37467: Add a new pass to speculate around PHI nodes with constant (integer) operands when profitable..
Tue, Oct 17, 11:57 AM
davidxl added inline comments to D37467: Add a new pass to speculate around PHI nodes with constant (integer) operands when profitable..
Tue, Oct 17, 10:47 AM

Mon, Oct 16

davidxl added a comment to D38190: Partial Inlining with multi-region outlining based on PGO information.

please also add test cases.

Mon, Oct 16, 12:05 PM

Fri, Oct 13

davidxl added a comment to D38641: [Inline][WIP] Expose more inlining opportunities by further constraining call site arguments based on splitting an OR condition..

I see a lot of potential to make this more general. As I mentioned, this is similar to constant propagation based function cloning -- exposing specialization opportunities seems not limited to inliner though inlining could be the biggest customer.

Fri, Oct 13, 2:05 PM

Wed, Oct 11

davidxl added a comment to D38641: [Inline][WIP] Expose more inlining opportunities by further constraining call site arguments based on splitting an OR condition..

This is good stuff, but I don't feel Inliner is the right place to do such transformation.

Wed, Oct 11, 5:35 PM

Mon, Oct 9

davidxl committed rL315272: Renable r314928.
Renable r314928
Mon, Oct 9, 10:08 PM

Fri, Oct 6

davidxl added inline comments to D37467: Add a new pass to speculate around PHI nodes with constant (integer) operands when profitable..
Fri, Oct 6, 10:38 AM
davidxl added a comment to D38124: Hide some symbols to avoid a crash on shutdown when using code coverage.

Can you add a test case with shared libraries?

Fri, Oct 6, 9:51 AM · Restricted Project
davidxl added a comment to D38474: Add support for multiple prof metadata on instructions..

This does not look like backward compatible IR change. For the purpose of annotating irreducible loop headers, it might be better to introduce a new type of metadata.

Fri, Oct 6, 9:46 AM

Thu, Oct 5

davidxl committed rL315044: Roll forward r314928.
Roll forward r314928
Thu, Oct 5, 10:17 PM
davidxl added inline comments to D37467: Add a new pass to speculate around PHI nodes with constant (integer) operands when profitable..
Thu, Oct 5, 2:14 PM

Wed, Oct 4

davidxl committed rL314961: Revert r314928 to investigate thinLTO bootstrap failure.
Revert r314928 to investigate thinLTO bootstrap failure
Wed, Oct 4, 6:41 PM
davidxl added a comment to D38563: [MachineBlockPlacement] Make sure PreferredLoopExit is cleared everytime new loop is processed.

A test case?

Wed, Oct 4, 2:41 PM
davidxl committed rL314928: Recommit r314561 after fixing msan build failure.
Recommit r314561 after fixing msan build failure
Wed, Oct 4, 1:19 PM

Mon, Oct 2

davidxl added a reviewer for D38474: Add support for multiple prof metadata on instructions.: dexonsmith.
Mon, Oct 2, 9:23 PM

Fri, Sep 29

davidxl committed rL314585: Fix buildbot failure -- tighten type check for matching phi.
Fix buildbot failure -- tighten type check for matching phi
Fri, Sep 29, 10:29 PM
davidxl committed rL314579: Recommi r314561 after fixing over-debug assertion.
Recommi r314561 after fixing over-debug assertion
Fri, Sep 29, 5:48 PM
davidxl committed rL314563: Revert 314561 due to debug build assertion failure.
Revert 314561 due to debug build assertion failure
Fri, Sep 29, 3:32 PM
davidxl added a reverting commit for rL314561: Eliminate PHI (int typed) which has only one use by intptr: rL314563: Revert 314561 due to debug build assertion failure.
Fri, Sep 29, 3:32 PM
davidxl committed rL314561: Eliminate PHI (int typed) which has only one use by intptr.
Eliminate PHI (int typed) which has only one use by intptr
Fri, Sep 29, 3:12 PM
davidxl closed D37832: Eliminate PHI (int typed) which is only used by inttoptr by committing rL314561: Eliminate PHI (int typed) which has only one use by intptr.
Fri, Sep 29, 3:11 PM

Mon, Sep 25

davidxl added inline comments to D38190: Partial Inlining with multi-region outlining based on PGO information.
Mon, Sep 25, 1:49 PM

Thu, Sep 21

davidxl added inline comments to D38133: [CGP] Make optimizeMemoryInst introduce a select/phi if it improves things.
Thu, Sep 21, 9:55 AM
davidxl added a comment to D37832: Eliminate PHI (int typed) which is only used by inttoptr.

I need an explicit LGTM for the patch. thanks.

Thu, Sep 21, 8:45 AM

Sep 20 2017

davidxl updated the diff for D37832: Eliminate PHI (int typed) which is only used by inttoptr.

Addressed review feedback.

Sep 20 2017, 2:14 PM
davidxl added a comment to D37419: Teach scalar evolution to handle inttoptr/ptrtoint.

Um -- updated the wrong patch. Please ignore.

Sep 20 2017, 2:13 PM
davidxl updated the diff for D37419: Teach scalar evolution to handle inttoptr/ptrtoint.

Addressed review feedback.

Sep 20 2017, 2:11 PM

Sep 19 2017

davidxl accepted D38066: [cmake] Add an option to build llvm with IR PGO.

lgtm

Sep 19 2017, 7:28 PM
davidxl added inline comments to D38066: [cmake] Add an option to build llvm with IR PGO.
Sep 19 2017, 6:50 PM
davidxl added inline comments to D38066: [cmake] Add an option to build llvm with IR PGO.
Sep 19 2017, 6:05 PM
davidxl added a comment to D37832: Eliminate PHI (int typed) which is only used by inttoptr.

As I have mentioned, this patch itself does *not* fold any ptrtoint/inttoptr. It simply moves the intptr across the phi node. The folding you see with the test cases is done by existing optimizations, so I am not sure what the objection is about.

Sep 19 2017, 9:59 AM

Sep 15 2017

davidxl updated the diff for D37832: Eliminate PHI (int typed) which is only used by inttoptr.

Address Wei's review feedback

Sep 15 2017, 4:37 PM
davidxl added inline comments to D37940: Peel off the dominant case in switch statement.
Sep 15 2017, 4:25 PM
davidxl added inline comments to D37832: Eliminate PHI (int typed) which is only used by inttoptr.
Sep 15 2017, 3:55 PM
davidxl updated the diff for D37832: Eliminate PHI (int typed) which is only used by inttoptr.

Address review comments (fixing lower case in comments) by Hal.

Sep 15 2017, 2:26 PM
davidxl added a comment to D37832: Eliminate PHI (int typed) which is only used by inttoptr.

This patch basically just sinks ptrtoint operation from phi arguments to the phi output, but does not do any ptrtoint(inttoptr) folding itself (relies on existing rules to do that), so it should be safe to do by itself.

Sep 15 2017, 2:25 PM

Sep 14 2017

davidxl added a comment to D37832: Eliminate PHI (int typed) which is only used by inttoptr.

It does not look like related SROA -- the conversion already exists via stack memory store and load in IR. It looks like related libstdc++'s tuple implementation, though I did not have a small repro -- whether it is from sroa is also irrelevant -- user source can always produce IR like this which needs to be cleaned up or understood (by analysis).

Sep 14 2017, 9:59 PM

Sep 13 2017

davidxl accepted D37835: Add optional profile counts to block frequency dump..

lgtm

Sep 13 2017, 5:03 PM
davidxl added a comment to D37835: Add optional profile counts to block frequency dump..

Perhaps provide a simple overload getBlockProfileCount for MachineFunction?

Sep 13 2017, 4:48 PM
davidxl added inline comments to D37835: Add optional profile counts to block frequency dump..
Sep 13 2017, 4:34 PM
davidxl created D37832: Eliminate PHI (int typed) which is only used by inttoptr.
Sep 13 2017, 4:17 PM

Sep 12 2017

davidxl accepted D37776: Add options to dump PGO counts in text..

lgtm

Sep 12 2017, 6:36 PM
davidxl added inline comments to D37776: Add options to dump PGO counts in text..
Sep 12 2017, 3:53 PM

Sep 5 2017

davidxl added a comment to D37467: Add a new pass to speculate around PHI nodes with constant (integer) operands when profitable..

Just some initial comments around the test cases.

Sep 5 2017, 9:51 AM

Sep 3 2017

davidxl added inline comments to D37419: Teach scalar evolution to handle inttoptr/ptrtoint.
Sep 3 2017, 12:15 AM
davidxl added a comment to D37419: Teach scalar evolution to handle inttoptr/ptrtoint.

The class of inputs are usually generated by other optimizations such as SROA from C++ code -- the int/ptr conversions are usually not directly created by the user code. Logically speaking, handling of inttoptr/ptrtoint is no different from BitCast operation (ideally also implemented using BitCast op, but not doable due to IR spec), so there is no reason we should treat them as opaque while not doing so for BitCast.

Sep 3 2017, 12:03 AM

Sep 2 2017

davidxl created D37419: Teach scalar evolution to handle inttoptr/ptrtoint.
Sep 2 2017, 9:06 PM

Aug 28 2017

davidxl added inline comments to D37176: Create PHI node for the return value only when the return value has uses..
Aug 28 2017, 8:49 AM

Aug 25 2017

davidxl accepted D37165: Add options to dump block frequency/branch probability info in text..

looks like a useful debugging option.

Aug 25 2017, 4:23 PM

Aug 24 2017

davidxl committed rL311727: [Profile] backward propagate profile info in JumpThreading.
[Profile] backward propagate profile info in JumpThreading
Aug 24 2017, 3:55 PM
davidxl accepted D37113: Move accurate-sample-profile into the function attribute..

lgtm

Aug 24 2017, 1:54 PM
davidxl accepted D37091: Expose -mllvm -accurate-sample-profile to clang..

lgtm

Aug 24 2017, 1:49 PM
davidxl added a comment to D37113: Move accurate-sample-profile into the function attribute..

How can we test it works for ThinLTO? some end-to-end test is also desired (given that this becomes an external feature).

Aug 24 2017, 12:08 PM
davidxl added inline comments to D37113: Move accurate-sample-profile into the function attribute..
Aug 24 2017, 12:08 PM
davidxl added a comment to D37091: Expose -mllvm -accurate-sample-profile to clang..

Looks fine to me, but please wait for Richard's comment.

Aug 24 2017, 9:48 AM

Aug 23 2017

davidxl added inline comments to D37091: Expose -mllvm -accurate-sample-profile to clang..
Aug 23 2017, 8:17 PM
davidxl added a comment to D37091: Expose -mllvm -accurate-sample-profile to clang..

Documentation needs to be added to clang/docs/ClangCommandLineReference.rst .

Aug 23 2017, 7:02 PM
davidxl accepted D37084: Add test to cover accurate-sample-profile..

lgtm

Aug 23 2017, 4:17 PM
davidxl added a comment to D37084: Add test to cover accurate-sample-profile..

What happens if caller is hot, and the callee (missing profile) is unconditionally called by the caller? Will it still be treated as cold?

Aug 23 2017, 4:07 PM
davidxl committed rL311607: [Profile] create a copy of profile file name from environment.
[Profile] create a copy of profile file name from environment
Aug 23 2017, 2:40 PM
davidxl accepted D37074: [PGO] Set edge weights for indirectbr instruction with profile counts.

lgtm

Aug 23 2017, 12:59 PM
davidxl added inline comments to D37074: [PGO] Set edge weights for indirectbr instruction with profile counts.
Aug 23 2017, 11:53 AM

Aug 21 2017

davidxl updated the diff for D36864: [Profile] backward propagate profile data in jump-threading.

Addressed review feedback.

Aug 21 2017, 9:40 PM
davidxl added a comment to D36864: [Profile] backward propagate profile data in jump-threading.

Also improved test cases to cover the path that exposed the bug.

Aug 21 2017, 3:00 PM
davidxl updated the diff for D36864: [Profile] backward propagate profile data in jump-threading.

Fix an obvious bug.

Aug 21 2017, 3:00 PM
davidxl committed rL311341: Revert 311208, 311209.
Revert 311208, 311209
Aug 21 2017, 9:02 AM
davidxl added a reverting commit for rL311208: [Profile] backward propagate profile info in JumpThreading: rL311341: Revert 311208, 311209.
Aug 21 2017, 9:02 AM
davidxl added a reverting commit for rL311209: Fix comment /NFC: rL311341: Revert 311208, 311209.
Aug 21 2017, 9:02 AM

Aug 19 2017

davidxl accepted D36919: [ThinLTO] Fix ThinLTO crash.

lgtm

Aug 19 2017, 8:52 AM

Aug 18 2017

davidxl added inline comments to D36919: [ThinLTO] Fix ThinLTO crash.
Aug 18 2017, 10:53 PM
davidxl accepted D36903: [profile] Create a copy of profile filename inside of lprofCurFilename..

Please add a comment why copy is needed.

Aug 18 2017, 4:51 PM
davidxl added inline comments to D36753: [SimplifyCFG] Do not perform tail sinking if there are extra moves introduced.
Aug 18 2017, 4:25 PM
davidxl committed rL311209: Fix comment /NFC.
Fix comment /NFC
Aug 18 2017, 4:09 PM
davidxl added a comment to D36903: [profile] Create a copy of profile filename inside of lprofCurFilename..

I am not sure what you try to achieve here. Basically, there is no need to to use environment variable.

Aug 18 2017, 4:07 PM
davidxl committed rL311208: [Profile] backward propagate profile info in JumpThreading.
[Profile] backward propagate profile info in JumpThreading
Aug 18 2017, 4:03 PM
davidxl updated the diff for D36864: [Profile] backward propagate profile data in jump-threading.

Addressed Chandler's review feedbacks

Aug 18 2017, 10:34 AM
davidxl added inline comments to D36864: [Profile] backward propagate profile data in jump-threading.
Aug 18 2017, 10:32 AM

Aug 17 2017

davidxl created D36864: [Profile] backward propagate profile data in jump-threading.
Aug 17 2017, 11:16 PM
davidxl accepted D36844: [PGO] Fixed assertion due to mismatched memcpy size type..

lgtm

Aug 17 2017, 4:42 PM
davidxl added a comment to D34393: [MC] Adding code padding for performance stability - infrastructure. NFC..

Tried the two patches with our internal benchmark -- the alignment related performance issue is still there. The problem disappears with -mllvm -x86-experimental-pref-loop-alignment=5 is used.

Aug 17 2017, 10:58 AM

Aug 16 2017

davidxl added a comment to D34393: [MC] Adding code padding for performance stability - infrastructure. NFC..

Can you send the full patch so that we can help evaluate it?

Aug 16 2017, 1:31 PM
davidxl updated subscribers of D34393: [MC] Adding code padding for performance stability - infrastructure. NFC..
Aug 16 2017, 1:31 PM
davidxl added a comment to D36388: [X86][SandyBridge] Additional updates to the SNB instructions scheduling information .

We verified that the regression we saw internally is due to loop alignment.

Aug 16 2017, 1:24 PM
davidxl accepted D36775: Increase tail dup threshold for -O3 from 3 to 4.

lgtm

Aug 16 2017, 1:21 PM
davidxl added a comment to D36775: Increase tail dup threshold for -O3 from 3 to 4.

performance tests with large benchmarks showed no regression.

Aug 16 2017, 1:21 PM
davidxl committed rL311025: Add more comment.
Add more comment
Aug 16 2017, 10:35 AM
davidxl committed rL311023: [PGO] Fix ThinLTO crash .
[PGO] Fix ThinLTO crash
Aug 16 2017, 10:19 AM

Aug 15 2017

davidxl added a comment to D36775: Increase tail dup threshold for -O3 from 3 to 4.

Will test on some very large programs that are sensitive to icache pressure and get back.

Aug 15 2017, 5:10 PM
davidxl added a reviewer for D36753: [SimplifyCFG] Do not perform tail sinking if there are extra moves introduced: jmolloy.
Aug 15 2017, 10:24 AM

Aug 14 2017

davidxl accepted D36722: [InlineCost] Simplify the cold attribute handling in inline-cost..

convinced.

Aug 14 2017, 8:26 PM
davidxl committed rL310907: Revert r310857 due to internal test failure.
Revert r310857 due to internal test failure
Aug 14 2017, 8:15 PM
davidxl added inline comments to D36722: [InlineCost] Simplify the cold attribute handling in inline-cost..
Aug 14 2017, 6:36 PM
davidxl added inline comments to D36722: [InlineCost] Simplify the cold attribute handling in inline-cost..
Aug 14 2017, 6:26 PM
davidxl added a comment to D36726: [Inliner] Teach the inliner to propagate attributes that have specific effects on inlining thresholds when we happen to inline into the entry (extended) basic block..

I will provide more comments on propagating the inline hint later. However, I do think it is wrong to propagate the cold attribute in inliner -- there should be already an inter-procedural attribute propagation pass that does this.

Aug 14 2017, 6:20 PM
davidxl added inline comments to D36722: [InlineCost] Simplify the cold attribute handling in inline-cost..
Aug 14 2017, 6:16 PM
davidxl added inline comments to D36722: [InlineCost] Simplify the cold attribute handling in inline-cost..
Aug 14 2017, 5:31 PM
davidxl committed rL310857: [PGO] Add support for relocate profile dumping directory.
[PGO] Add support for relocate profile dumping directory
Aug 14 2017, 9:52 AM