davidxl (David Li)
User

Projects

User does not belong to any projects.

User Details

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

Recent Activity

Yesterday

davidxl added a comment to D34471: [Inliner] Boost inlining of an indirect call to always_inline function..

Chandler's example does not involve any indirect calls so it is not related to this patch.

Thu, Jun 22, 8:50 PM

Wed, Jun 21

davidxl added inline comments to D34471: [Inliner] Boost inlining of an indirect call to always_inline function..
Wed, Jun 21, 9:21 PM

Sun, Jun 18

davidxl accepted D34293: [PATCH] [PGO] Fixed cast operation in emIntrinsicVisitor::instrumentOneMemIntrinsic..

lgtm

Sun, Jun 18, 9:25 PM

Fri, Jun 16

davidxl added inline comments to D34312: [NewPM/Inliner] Reduce threshold for cold callsites in the non-PGO case.
Fri, Jun 16, 10:40 PM
davidxl committed rL305564: Fix function name /NFC.
Fix function name /NFC
Fri, Jun 16, 9:54 AM

Thu, Jun 15

davidxl committed rL305530: [PartialInlining] Code Refactoring.
[PartialInlining] Code Refactoring
Thu, Jun 15, 4:57 PM
davidxl accepted D34248: Split PGO memory intrinsic optimization into its own source file.

lgtm

Thu, Jun 15, 1:22 PM
davidxl updated the diff for D34085: [PGO] Register promote profile counter updates.

Added another debug option.

Thu, Jun 15, 10:09 AM
davidxl accepted D34218: [Doc] Document prof metadata in LangRef.

lgtm

Thu, Jun 15, 8:50 AM

Wed, Jun 14

davidxl added inline comments to D34218: [Doc] Document prof metadata in LangRef.
Wed, Jun 14, 1:32 PM
davidxl added inline comments to D34218: [Doc] Document prof metadata in LangRef.
Wed, Jun 14, 1:12 PM

Tue, Jun 13

davidxl updated the diff for D34085: [PGO] Register promote profile counter updates.

Addressed review comments.

Tue, Jun 13, 11:10 PM
davidxl added a comment to D34085: [PGO] Register promote profile counter updates.

Added one more test case to show the merged live-in values from multiple predecessors in the loop.

Tue, Jun 13, 11:07 PM
davidxl committed rL305325: Preserve cold attribute for function decls.
Preserve cold attribute for function decls
Tue, Jun 13, 2:14 PM
davidxl closed D34133: Cold attribute on function decls are lost. Fix the problem by committing rL305325: Preserve cold attribute for function decls.
Tue, Jun 13, 2:14 PM
davidxl accepted D34134: [InstrProf] Don't take the address of alwaysinline available_externally functions.

lgtm ( The area of linkage handling has many subtle problems in the past with large C++ apps, so be prepared for any breakage introduced).

Tue, Jun 13, 1:32 PM
davidxl accepted D34164: [PGO] Update VP metadata after memory intrinsic optimization.

lgtm

Tue, Jun 13, 1:30 PM
davidxl updated the diff for D34085: [PGO] Register promote profile counter updates.

Addressed Vedant's comments.

Tue, Jun 13, 1:26 PM
davidxl added a comment to D34085: [PGO] Register promote profile counter updates.

Regarding turning this on for FE instrumentation, it can be done, but probably as a follow up (which also needs loop canonlicalization and rotation). More coverage test performance data (possibly at O0) also need to be collected.

Tue, Jun 13, 1:25 PM
davidxl added a comment to D33341: Enable vectorizer-maximize-bandwidth by default..

Any update on this patch?

Tue, Jun 13, 10:44 AM
davidxl accepted D34082: [Frontend] 'Show hotness' can be used with a sampling profile.

lgtm

Tue, Jun 13, 10:43 AM
davidxl updated the diff for D34133: Cold attribute on function decls are lost. Fix the problem.

Add a test case.

Tue, Jun 13, 9:47 AM

Mon, Jun 12

davidxl added inline comments to D34134: [InstrProf] Don't take the address of alwaysinline available_externally functions.
Mon, Jun 12, 8:00 PM
davidxl created D34133: Cold attribute on function decls are lost. Fix the problem.
Mon, Jun 12, 7:23 PM
davidxl added a comment to D34085: [PGO] Register promote profile counter updates.

See the summary for precision data. With this patch, the multi-threaded counter value is much closer to the single threaded case with very little loss.

Mon, Jun 12, 6:41 PM

Sun, Jun 11

davidxl added a comment to D33839: Prevent outlining of basicblock that uses BlockAddress.

That looks like it - it is in the indirectbr clause, so it might be a good idea to state something in the section describing 'blockaddress' ?

Sun, Jun 11, 9:53 PM
davidxl added a comment to D33839: Prevent outlining of basicblock that uses BlockAddress.

The spec probably needs update, but I remember inliner or function cloning does something to avoid this. +cc Chandler for comments.

Sun, Jun 11, 2:23 PM
davidxl updated subscribers of D33839: Prevent outlining of basicblock that uses BlockAddress.
Sun, Jun 11, 2:21 PM
davidxl committed rL305170: [PartialInlining] Support shrinkwrap life_range markers.
[PartialInlining] Support shrinkwrap life_range markers
Sun, Jun 11, 1:46 PM
davidxl closed D33847: [PartialInlining] Enhance code outliner to sink locals declared outside the outline region by committing rL305170: [PartialInlining] Support shrinkwrap life_range markers.
Sun, Jun 11, 1:46 PM
davidxl added a comment to D33839: Prevent outlining of basicblock that uses BlockAddress.

This is assuming the referencing the saved addresses is only within the extracted function, but reference to block addresses from outside the parent function is illegal. How do you prevent the original function from branch into the middle of the outlined function?

Sun, Jun 11, 10:55 AM

Sat, Jun 10

davidxl added a comment to D33839: Prevent outlining of basicblock that uses BlockAddress.

It is probably not legal to outline a BB with BB's address captured, so your previous version is better.

Sat, Jun 10, 9:34 PM
davidxl created D34085: [PGO] Register promote profile counter updates.
Sat, Jun 10, 8:42 PM
davidxl updated subscribers of D34082: [Frontend] 'Show hotness' can be used with a sampling profile.
Sat, Jun 10, 11:43 AM
davidxl added inline comments to D34082: [Frontend] 'Show hotness' can be used with a sampling profile.
Sat, Jun 10, 11:43 AM

Fri, Jun 9

davidxl committed rL305113: Minor clean up of profile rt tests.
Minor clean up of profile rt tests
Fri, Jun 9, 2:14 PM

Thu, Jun 8

davidxl added a comment to D33847: [PartialInlining] Enhance code outliner to sink locals declared outside the outline region.

Any more comments?

Thu, Jun 8, 11:09 PM

Wed, Jun 7

davidxl added a comment to D34017: Do not early-inline recursive calls in sample profile loader..

So the profile is from GCC built binary ?

Wed, Jun 7, 4:51 PM
davidxl added a comment to D34017: Do not early-inline recursive calls in sample profile loader..

Does it miss opportunities to profile annotate inline instance of indirect target?

Wed, Jun 7, 4:42 PM
davidxl updated the diff for D33847: [PartialInlining] Enhance code outliner to sink locals declared outside the outline region.

Addressed Davide's comments.

Wed, Jun 7, 1:17 PM
davidxl updated the diff for D33847: [PartialInlining] Enhance code outliner to sink locals declared outside the outline region.

Simplify test cases.

Wed, Jun 7, 11:55 AM
davidxl committed rL304933: Fix builin_expect lowering bug.
Fix builin_expect lowering bug
Wed, Jun 7, 11:32 AM
davidxl accepted D33934: [BPI] Don't assume that strcmp returning >0 is more likely than <0.

lgtm

Wed, Jun 7, 9:36 AM

Tue, Jun 6

davidxl added inline comments to D33934: [BPI] Don't assume that strcmp returning >0 is more likely than <0.
Tue, Jun 6, 9:46 AM

Mon, Jun 5

davidxl added a comment to D33577: CodeGen: BlockPlacement: Use Branching factor to choose between near equals..

Do you have performance numbers (to show it works better on average)?

Mon, Jun 5, 1:26 PM
davidxl updated the diff for D33847: [PartialInlining] Enhance code outliner to sink locals declared outside the outline region.

Addressed Wei's feedback.

Mon, Jun 5, 11:09 AM
davidxl added inline comments to D33847: [PartialInlining] Enhance code outliner to sink locals declared outside the outline region.
Mon, Jun 5, 11:09 AM

Fri, Jun 2

davidxl committed rL304600: Fix debug build test failure.
Fix debug build test failure
Fri, Jun 2, 3:39 PM
davidxl committed rL304599: [PartialInlining] Minor cost anaysis tuning.
[PartialInlining] Minor cost anaysis tuning
Fri, Jun 2, 3:08 PM
davidxl updated the diff for D33847: [PartialInlining] Enhance code outliner to sink locals declared outside the outline region.

Fix bugs in tests.

Fri, Jun 2, 3:06 PM
davidxl retitled D33847: [PartialInlining] Enhance code outliner to sink locals declared outside the outline region from [PartialInlining] Enhance partial inliner to sink wraps locals declared outside the outline region to [PartialInlining] Enhance code outliner to sink locals declared outside the outline region.
Fri, Jun 2, 12:13 PM
davidxl created D33847: [PartialInlining] Enhance code outliner to sink locals declared outside the outline region.
Fri, Jun 2, 12:11 PM

Thu, Jun 1

davidxl committed rL304517: [Profile] Enhance expect lowering to handle correlated branches.
[Profile] Enhance expect lowering to handle correlated branches
Thu, Jun 1, 7:10 PM
davidxl closed D33164: [Profile[ Enhance expect lowering to handle correlated branches by committing rL304517: [Profile] Enhance expect lowering to handle correlated branches.
Thu, Jun 1, 7:10 PM
davidxl added a comment to D33164: [Profile[ Enhance expect lowering to handle correlated branches.

thanks for the review! I am pretty happy with the final version .

Thu, Jun 1, 6:51 PM
davidxl updated the diff for D33164: [Profile[ Enhance expect lowering to handle correlated branches.

Address review feebacks.

Thu, Jun 1, 5:46 PM
davidxl added inline comments to D33164: [Profile[ Enhance expect lowering to handle correlated branches.
Thu, Jun 1, 5:45 PM
davidxl committed rL304489: Fix compiler_rt buildbot failure.
Fix compiler_rt buildbot failure
Thu, Jun 1, 4:05 PM
davidxl accepted D33798: [PGO] Adjust indirect call promotion threshold.

this looks fine.

Thu, Jun 1, 2:06 PM
davidxl updated the diff for D33164: [Profile[ Enhance expect lowering to handle correlated branches.

Added support to handle integer with any bit-width. New test cases are added to test int type other than i1.

Thu, Jun 1, 1:05 PM
davidxl committed rL304453: [Profile] Fix builtin_expect lowering bug.
[Profile] Fix builtin_expect lowering bug
Thu, Jun 1, 12:06 PM
davidxl closed D33757: [Profile] Fix builtin_expect lowering bug by committing rL304453: [Profile] Fix builtin_expect lowering bug.
Thu, Jun 1, 12:06 PM
davidxl committed rL304452: [PartialInlining] Emit branch info and profile data as remarks.
[PartialInlining] Emit branch info and profile data as remarks
Thu, Jun 1, 11:59 AM
davidxl closed D33746: [PGO] Dump branch condition type, branch probability and branch hotness as optimization remarks by committing rL304452: [PartialInlining] Emit branch info and profile data as remarks.
Thu, Jun 1, 11:59 AM
davidxl added inline comments to D33746: [PGO] Dump branch condition type, branch probability and branch hotness as optimization remarks.
Thu, Jun 1, 9:28 AM
davidxl created D33757: [Profile] Fix builtin_expect lowering bug.
Thu, Jun 1, 12:06 AM

Wed, May 31

davidxl committed rL304375: [PartialInlining] Reduce outlining overhead by removing unneeded live-out(s).
[PartialInlining] Reduce outlining overhead by removing unneeded live-out(s)
Wed, May 31, 5:13 PM
davidxl closed D33694: [PartialInlining] : Partial inlining Overhead reduction: eliminate unnecessary live-out(s) by committing rL304375: [PartialInlining] Reduce outlining overhead by removing unneeded live-out(s).
Wed, May 31, 5:13 PM
davidxl updated the diff for D33694: [PartialInlining] : Partial inlining Overhead reduction: eliminate unnecessary live-out(s).

Use all_of idiom.

Wed, May 31, 4:45 PM
davidxl created D33746: [PGO] Dump branch condition type, branch probability and branch hotness as optimization remarks.
Wed, May 31, 4:19 PM

Tue, May 30

davidxl committed rL304245: [PartialInlining] Shrinkwrap allocas with live range contained in outline….
[PartialInlining] Shrinkwrap allocas with live range contained in outline…
Tue, May 30, 2:22 PM
davidxl closed D33618: [PartialInlining] Reduce function outlining overhead by committing rL304245: [PartialInlining] Shrinkwrap allocas with live range contained in outline….
Tue, May 30, 2:22 PM
davidxl created D33694: [PartialInlining] : Partial inlining Overhead reduction: eliminate unnecessary live-out(s).
Tue, May 30, 2:14 PM

Sun, May 28

davidxl updated the diff for D33618: [PartialInlining] Reduce function outlining overhead.

Address Wei's feedback. Find alloca candidates from Entry blocks .

Sun, May 28, 11:54 PM
davidxl added a comment to D33618: [PartialInlining] Reduce function outlining overhead.

To be clear, the case handled here is
void foo()
{

...
{
     A a;
     ...
 }

}

Sun, May 28, 8:20 PM
davidxl added a comment to D33618: [PartialInlining] Reduce function outlining overhead.

yes, those cases can be and will be handled but as a follow up. This patch handles cases where locals are declared in the outlined region.

Sun, May 28, 8:18 PM
davidxl updated the diff for D33618: [PartialInlining] Reduce function outlining overhead.

addressed Davide's feedback.

Sun, May 28, 9:55 AM
davidxl added inline comments to D33618: [PartialInlining] Reduce function outlining overhead.
Sun, May 28, 9:54 AM

Sat, May 27

davidxl updated the diff for D33618: [PartialInlining] Reduce function outlining overhead.
Sat, May 27, 2:02 PM

Fri, May 26

davidxl updated the diff for D33164: [Profile[ Enhance expect lowering to handle correlated branches.

Address Chandler's feedbacks.

Fri, May 26, 9:26 PM
davidxl added inline comments to D33164: [Profile[ Enhance expect lowering to handle correlated branches.
Fri, May 26, 9:25 PM
davidxl created D33618: [PartialInlining] Reduce function outlining overhead.
Fri, May 26, 5:36 PM
davidxl accepted D33220: [PartialInlining] Replace delete with unique_ptr in computeCallsiteToProfCountMap.

The code will be simplified (with related code removed) once the new PM is the default, but I don't see harm to change this way. lgtm

Fri, May 26, 5:32 PM
davidxl added a comment to D33577: CodeGen: BlockPlacement: Use Branching factor to choose between near equals..

It is basically a choice between a layout (exiting) that has 50% chance of not taking any branches , 25% of taking one branch, and 25% of taking more than one branches vs the new layout that has only 6.25% chance of taking zero branch and 93.75% of taking only one branch.

Fri, May 26, 2:39 PM
davidxl added a comment to D33577: CodeGen: BlockPlacement: Use Branching factor to choose between near equals..

Looking at the example. Comparing two layout decisions: 1) always pick the next test as layout successor ; and 2) always pick the (else) if-then block as the layout successor.
A) the number of taken branches is the same
B) assuming 50% prob for all branches, the dynamic count of taken branches with 2) is actually smaller.

Fri, May 26, 9:26 AM

Thu, May 25

davidxl added a comment to D33540: [PM/ThinLTO] Port the ThinLTO pipeline (both components) to the new PM..

I was aware that partial inlining is available in both pre and post link thinLTO pipelines. It is just not tuned. In fact, the right thing to do for ThinLTO is only do function outlining in the prelink step -- this will shrink function size and exposes more importing. The regular inliner in the post -link phase can handle those functions properly. Post thin-link needs another round of partial inlining after the inliner.

Thu, May 25, 4:05 PM
davidxl added a comment to D33540: [PM/ThinLTO] Port the ThinLTO pipeline (both components) to the new PM..

For partial inlining, leave it consistent with old PM for now. We can introduce later an internal option to enable/disable pre-thin-link partial inlining and collect more performance number.

Thu, May 25, 2:50 PM
davidxl added inline comments to D33539: [PM/PGO] Wire up the opt driver's new PM support to be able to run PGO..
Thu, May 25, 9:48 AM

Wed, May 24

davidxl accepted D33535: [PM] Teach the PGO instrumentation pasess to run GlobalDCE before instrumenting code..

lgtm

Wed, May 24, 11:00 PM

May 24 2017

davidxl added a comment to D33164: [Profile[ Enhance expect lowering to handle correlated branches.

Any more comments?

May 24 2017, 4:23 PM

May 22 2017

davidxl committed rL303567: [PartialInlining] Add internal options to enable partial inlining in pass….
[PartialInlining] Add internal options to enable partial inlining in pass…
May 22 2017, 9:42 AM
davidxl closed D33382: [PartialInlining] introduce an internal option to add partial inlining pass in the pipeline (off by default for now) by committing rL303567: [PartialInlining] Add internal options to enable partial inlining in pass….
May 22 2017, 9:42 AM
davidxl updated the diff for D33382: [PartialInlining] introduce an internal option to add partial inlining pass in the pipeline (off by default for now).

added internal option for new PM as well.

May 22 2017, 9:20 AM

May 20 2017

davidxl created D33382: [PartialInlining] introduce an internal option to add partial inlining pass in the pipeline (off by default for now).
May 20 2017, 9:30 PM

May 19 2017

davidxl updated the diff for D33164: [Profile[ Enhance expect lowering to handle correlated branches.

Addressed review comments.

May 19 2017, 9:44 PM
davidxl added inline comments to D33164: [Profile[ Enhance expect lowering to handle correlated branches.
May 19 2017, 9:43 PM
davidxl added a comment to D33164: [Profile[ Enhance expect lowering to handle correlated branches.

Any more comments?

May 19 2017, 9:43 AM

May 16 2017

davidxl updated the diff for D33164: [Profile[ Enhance expect lowering to handle correlated branches.

Address review feedback.

May 16 2017, 8:29 PM
davidxl added inline comments to D33164: [Profile[ Enhance expect lowering to handle correlated branches.
May 16 2017, 8:28 PM
davidxl updated the diff for D33164: [Profile[ Enhance expect lowering to handle correlated branches.

Address Chandler's feedbacks.

May 16 2017, 4:00 PM