Page MenuHomePhabricator

wmi (Wei Mi)
User

Projects

User does not belong to any projects.

User Details

User Since
Feb 20 2015, 10:57 AM (204 w, 2 d)

Recent Activity

Thu, Jan 17

wmi committed rL351476: [SampleFDO] Skip profile reading when flattened profile used in ThinLTO postlink.
[SampleFDO] Skip profile reading when flattened profile used in ThinLTO postlink
Thu, Jan 17, 12:52 PM
wmi closed D54819: [SampleFDO] Skip profile reading when flatten profile is used in ThinLTO postlink phase.
Thu, Jan 17, 12:52 PM
wmi updated the diff for D54819: [SampleFDO] Skip profile reading when flatten profile is used in ThinLTO postlink phase.

Address Teresa's comments.

Thu, Jan 17, 9:31 AM

Wed, Jan 16

wmi committed rL351397: Fix a mistake in rL351392..
Fix a mistake in rL351392.
Wed, Jan 16, 3:35 PM
wmi committed rL351392: [PGO] Make pgo related options in opt more consistent..
[PGO] Make pgo related options in opt more consistent.
Wed, Jan 16, 3:23 PM
wmi closed D56749: [NFC] Make pgo related options in opt more consistent. .
Wed, Jan 16, 3:22 PM
wmi added inline comments to D56749: [NFC] Make pgo related options in opt more consistent. .
Wed, Jan 16, 3:22 PM

Tue, Jan 15

wmi created D56749: [NFC] Make pgo related options in opt more consistent. .
Tue, Jan 15, 3:23 PM
wmi added inline comments to D54819: [SampleFDO] Skip profile reading when flatten profile is used in ThinLTO postlink phase.
Tue, Jan 15, 2:52 PM
wmi added inline comments to D52845: Update entry count for cold calls.
Tue, Jan 15, 10:28 AM
wmi accepted D56491: treat invoke like call.

LGTM.

Tue, Jan 15, 9:48 AM
wmi accepted D56435: We can improve the performance (generally) by memo-izing the action to map a debug location to its function summary..

LGTM.

Tue, Jan 15, 9:13 AM

Mon, Jan 14

wmi added inline comments to D52845: Update entry count for cold calls.
Mon, Jan 14, 4:28 PM
wmi added inline comments to D52845: Update entry count for cold calls.
Mon, Jan 14, 12:12 PM
wmi added a comment to D56435: We can improve the performance (generally) by memo-izing the action to map a debug location to its function summary..

Seems the compile time saving is got mainly because there are multiple instructions sharing the same debug location, is my understanding correct?

Seems incorrect. findFunctionSamples may be called for the same instruction multiple times due to multiple iterations of hot functions inlining or profile propagation.

Mon, Jan 14, 11:58 AM
wmi accepted D55094: Ignore PhiNodes when mapping sample profile data.

LGTM.

Mon, Jan 14, 10:19 AM
wmi added a comment to D56491: treat invoke like call.

Could you have a testcase for it?

Mon, Jan 14, 10:10 AM
wmi added a comment to D56435: We can improve the performance (generally) by memo-izing the action to map a debug location to its function summary..

Seems the compile time saving is got mainly because there are multiple instructions sharing the same debug location, is my understanding correct?

Mon, Jan 14, 9:18 AM

Fri, Jan 11

wmi updated the diff for D54819: [SampleFDO] Skip profile reading when flatten profile is used in ThinLTO postlink phase.

Address Teresa's comments.

Fri, Jan 11, 6:46 PM
wmi added a comment to D54819: [SampleFDO] Skip profile reading when flatten profile is used in ThinLTO postlink phase.

Yes, the support is also helpful for old pass manager. Add some code to make it easier to enable sampleprofileloader pass in the pipeline of old pass manager through opt, mainly for testing purpose.

Fri, Jan 11, 6:44 PM

Mon, Jan 7

wmi committed rL350586: [RegisterCoalescer] dst register's live interval needs to be updated when.
[RegisterCoalescer] dst register's live interval needs to be updated when
Mon, Jan 7, 4:30 PM
wmi closed D55867: [RegisterCoalescer] dst register's live interval needs to be updated when merging a src register in ToBeUpdated set.
Mon, Jan 7, 4:30 PM
wmi added a comment to D55867: [RegisterCoalescer] dst register's live interval needs to be updated when merging a src register in ToBeUpdated set.

friendly ping. Please take another look.

Mon, Jan 7, 12:35 PM

Wed, Jan 2

wmi committed rL350223: [PowerPC] Remove SeenUse check when optimizing conditional branch in.
[PowerPC] Remove SeenUse check when optimizing conditional branch in
Wed, Jan 2, 9:11 AM
wmi closed D56041: [PowerPC] Fix a bug when optimizing conditional branch in PPCPreEmitPeephole pass.
Wed, Jan 2, 9:10 AM

Dec 21 2018

wmi created D56041: [PowerPC] Fix a bug when optimizing conditional branch in PPCPreEmitPeephole pass.
Dec 21 2018, 5:25 PM
wmi added inline comments to D55867: [RegisterCoalescer] dst register's live interval needs to be updated when merging a src register in ToBeUpdated set.
Dec 21 2018, 11:36 AM
wmi updated the diff for D55867: [RegisterCoalescer] dst register's live interval needs to be updated when merging a src register in ToBeUpdated set.

Address Quentin's comment.

Dec 21 2018, 11:34 AM

Dec 18 2018

wmi updated the diff for D55867: [RegisterCoalescer] dst register's live interval needs to be updated when merging a src register in ToBeUpdated set.

A minor update to the comment.

Dec 18 2018, 4:53 PM
wmi created D55867: [RegisterCoalescer] dst register's live interval needs to be updated when merging a src register in ToBeUpdated set.
Dec 18 2018, 4:39 PM

Dec 17 2018

wmi added a comment to D55681: [llvm] API for encoding/decoding DWARF discriminators..

LGTM from my limited knowledge on discriminator. I added dblaikie to help on the review.

Dec 17 2018, 11:22 AM
wmi added a reviewer for D55681: [llvm] API for encoding/decoding DWARF discriminators.: dblaikie.
Dec 17 2018, 9:38 AM

Dec 13 2018

wmi committed rL349088: [SampleFDO] handle ProfileSampleAccurate when initializing function entry count.
[SampleFDO] handle ProfileSampleAccurate when initializing function entry count
Dec 13 2018, 1:55 PM
wmi closed D55660: [SampleFDO] handle ProfileSampleAccurate when initializing function entry count.
Dec 13 2018, 1:54 PM
wmi updated the diff for D55660: [SampleFDO] handle ProfileSampleAccurate when initializing function entry count.

Fix test/Transforms/SampleProfile/inline-cold-callsite-samplepgo.ll which was over simplified in the last revision.

Dec 13 2018, 11:27 AM
wmi updated the diff for D55660: [SampleFDO] handle ProfileSampleAccurate when initializing function entry count.

Address Easwaran and Teresa's comments.

Dec 13 2018, 11:16 AM
wmi added a comment to D55660: [SampleFDO] handle ProfileSampleAccurate when initializing function entry count.

Could you add a test case or augment an existing test to check that the function entry count is 0 if -sample-profile and -profile-sample-accurate is specified?

Dec 13 2018, 11:14 AM
wmi created D55660: [SampleFDO] handle ProfileSampleAccurate when initializing function entry count.
Dec 13 2018, 9:35 AM
wmi added a comment to D55567: [SampleFDO] Extend profile-sample-accurate option to cover isFunctionColdInCallGraph.

Thanks to Easwaran who gave me a good suggestion offline to improve the patch. We can initialize function entry count to 0 when ProfileSampleAccurate is specified. That could save the effort to handle ProfileSampleAccurate in multiple places. I will post the updated patch in a separate review thread.

Dec 13 2018, 9:23 AM

Dec 12 2018

wmi committed rL348940: [SampleFDO] Extend profile-sample-accurate option to cover….
[SampleFDO] Extend profile-sample-accurate option to cover…
Dec 12 2018, 9:14 AM
wmi closed D55567: [SampleFDO] Extend profile-sample-accurate option to cover isFunctionColdInCallGraph.
Dec 12 2018, 9:14 AM
wmi updated the diff for D55567: [SampleFDO] Extend profile-sample-accurate option to cover isFunctionColdInCallGraph.

Address Teresa's comment.

Dec 12 2018, 8:50 AM
wmi added inline comments to D55567: [SampleFDO] Extend profile-sample-accurate option to cover isFunctionColdInCallGraph.
Dec 12 2018, 8:50 AM

Dec 11 2018

wmi created D55567: [SampleFDO] Extend profile-sample-accurate option to cover isFunctionColdInCallGraph.
Dec 11 2018, 11:58 AM

Nov 29 2018

wmi accepted D55088: Revert "Revert r347596 "Support for inserting profile-directed cache prefetches"".

LGTM.

Nov 29 2018, 5:02 PM

Nov 21 2018

wmi created D54819: [SampleFDO] Skip profile reading when flatten profile is used in ThinLTO postlink phase.
Nov 21 2018, 4:14 PM

Nov 9 2018

wmi accepted D54052: Support for inserting profile-directed cache prefetches.
Nov 9 2018, 4:20 PM

Nov 8 2018

wmi added a comment to D54052: Support for inserting profile-directed cache prefetches.

LGTM.

Nov 8 2018, 10:53 AM

Nov 7 2018

wmi added inline comments to D54052: Support for inserting profile-directed cache prefetches.
Nov 7 2018, 9:25 AM

Nov 5 2018

wmi added inline comments to D54052: Support for inserting profile-directed cache prefetches.
Nov 5 2018, 9:18 AM

Oct 23 2018

wmi committed rL345103: [PM] keeping history when original SCC split and then merge into itself.
[PM] keeping history when original SCC split and then merge into itself
Oct 23 2018, 4:32 PM
wmi closed D52915: [PM] keeping history when original SCC split and then merge into itself in the same round of SCC update ..
Oct 23 2018, 4:32 PM
wmi added a comment to D52915: [PM] keeping history when original SCC split and then merge into itself in the same round of SCC update ..

Thanks for the review!

Oct 23 2018, 4:06 PM
wmi added a comment to D52915: [PM] keeping history when original SCC split and then merge into itself in the same round of SCC update ..

Ping.

Oct 23 2018, 8:52 AM

Oct 16 2018

wmi accepted D53337: [ThinLTO] Add importing stats to thin link.
Oct 16 2018, 4:47 PM
wmi added a comment to D52915: [PM] keeping history when original SCC split and then merge into itself in the same round of SCC update ..

Chandler, could you take another look? Although like the testcase monster_scc.ll shows, current solution using inline history for SCC could reduce the inlining in a SCC, it didn't show up as a problem in performance testing, so can we use the solution for now to unblock the infinite compilation issue until we get a better idea for how to keep the inline history?

Oct 16 2018, 11:00 AM

Oct 15 2018

wmi updated the diff for D52915: [PM] keeping history when original SCC split and then merge into itself in the same round of SCC update ..

update testcase monster_scc.ll. With the patch, less inlining is happening for monster_scc.ll because we block the inlining inside of the same function in the same SCC from happening more than once.

Oct 15 2018, 9:22 AM

Oct 13 2018

wmi added a comment to D52845: Update entry count for cold calls.

This was intended to balance the function updateCalleeCount in InlineFunction.cpp which simply decrements the entry count.

Oct 13 2018, 9:42 PM

Oct 12 2018

wmi added a comment to D52845: Update entry count for cold calls.

Sorry for the late reply. I didn't notice the thread.

Oct 12 2018, 4:52 PM

Oct 11 2018

wmi committed rL344304: [SampleFDO][NFC] Remove debugging log left over in the code..
[SampleFDO][NFC] Remove debugging log left over in the code.
Oct 11 2018, 3:16 PM

Oct 10 2018

wmi updated the diff for D52915: [PM] keeping history when original SCC split and then merge into itself in the same round of SCC update ..

Address Chandler's comments.

Oct 10 2018, 9:59 PM
wmi added a comment to D52915: [PM] keeping history when original SCC split and then merge into itself in the same round of SCC update ..

Thanks for the review.

Oct 10 2018, 9:48 PM
wmi updated the diff for D52915: [PM] keeping history when original SCC split and then merge into itself in the same round of SCC update ..

FileCheck is not needed in the testcase. Removed it.

Oct 10 2018, 3:52 PM
wmi updated the diff for D52915: [PM] keeping history when original SCC split and then merge into itself in the same round of SCC update ..

Addressing Easwaran's comment by shortening the testcase.

Oct 10 2018, 3:18 PM

Oct 4 2018

wmi created D52915: [PM] keeping history when original SCC split and then merge into itself in the same round of SCC update ..
Oct 4 2018, 4:36 PM

Sep 14 2018

wmi committed rL342301: Fix filesystem race issue in SampleProfTest introduced in rL342283..
Fix filesystem race issue in SampleProfTest introduced in rL342283.
Sep 14 2018, 5:07 PM
wmi committed rL342283: [SampleFDO] Add FunctionOffsetTable in compact binary format profile..
[SampleFDO] Add FunctionOffsetTable in compact binary format profile.
Sep 14 2018, 1:54 PM
wmi closed D51863: [SampleFDO] Add FunctionOffsetTable in compact binary format profile..
Sep 14 2018, 1:54 PM

Sep 13 2018

wmi accepted D51470: Add flag to llvm-profdata to allow symbols in profile data to be remapped, andadd a tool to generate symbol remapping files..

LGTM.

Sep 13 2018, 12:06 PM

Sep 10 2018

wmi updated the diff for D51863: [SampleFDO] Add FunctionOffsetTable in compact binary format profile..

Add some cleanup, please take another look:
Add virtual function collectFuncsToUse to remove the awareness of format change in sample profile loader pass.

Sep 10 2018, 11:00 AM
wmi created D51863: [SampleFDO] Add FunctionOffsetTable in compact binary format profile..
Sep 10 2018, 9:09 AM

Sep 6 2018

wmi committed rL341591: [SampleFDO] Make sample profile loader unaware of compact format change..
[SampleFDO] Make sample profile loader unaware of compact format change.
Sep 6 2018, 3:04 PM
wmi closed D51643: [SampleFDO] Make sample profile loader unaware of compact format change.
Sep 6 2018, 3:04 PM
wmi added inline comments to D51643: [SampleFDO] Make sample profile loader unaware of compact format change.
Sep 6 2018, 10:24 AM

Sep 5 2018

wmi updated the diff for D51643: [SampleFDO] Make sample profile loader unaware of compact format change.

Add comment for substr mapping.

Sep 5 2018, 10:50 AM
wmi added inline comments to D51643: [SampleFDO] Make sample profile loader unaware of compact format change.
Sep 5 2018, 9:24 AM

Sep 4 2018

wmi created D51643: [SampleFDO] Make sample profile loader unaware of compact format change.
Sep 4 2018, 9:52 AM

Aug 31 2018

wmi accepted D51248: Support for remapping profile data, for sample-based profiling..

LGTM.

Aug 31 2018, 12:10 PM

Aug 27 2018

wmi added a comment to D51248: Support for remapping profile data, for sample-based profiling..

We do not support remapping indirect branch target information, but all other profile data should be remapped appropriately.

Aug 27 2018, 11:13 AM

Aug 21 2018

wmi accepted D50844: [RegisterCoalescer] Use substPhysReg in reMaterializeTrivialDef.

LGTM.

Aug 21 2018, 9:20 AM

Aug 7 2018

wmi committed rL339162: [SampleFDO] Fix a bug in getOrCompHotCountThreshold/getOrCompColdCountThreshold.
[SampleFDO] Fix a bug in getOrCompHotCountThreshold/getOrCompColdCountThreshold
Aug 7 2018, 11:13 AM
wmi closed D50370: [SampleFDO] Fix a bug in getOrCompHotCountThreshold/getOrCompColdCountThreshold.
Aug 7 2018, 11:13 AM

Aug 6 2018

wmi created D50370: [SampleFDO] Fix a bug in getOrCompHotCountThreshold/getOrCompColdCountThreshold.
Aug 6 2018, 4:36 PM
wmi committed rL339035: [RegisterCoalescer] Delay live interval update work until the rematerialization.
[RegisterCoalescer] Delay live interval update work until the rematerialization
Aug 6 2018, 10:31 AM
wmi closed D49519: [RegisterCoalescer] Delay live interval update work until the rematerialization for all the uses from the same def is done.
Aug 6 2018, 10:31 AM

Jul 25 2018

wmi added a comment to D49519: [RegisterCoalescer] Delay live interval update work until the rematerialization for all the uses from the same def is done.

Ping.

Jul 25 2018, 8:40 AM

Jul 20 2018

wmi added a comment to D49519: [RegisterCoalescer] Delay live interval update work until the rematerialization for all the uses from the same def is done.

Did two large server testing by setting LateRematUpdateThreshold to 0. No correctness issues found.

Jul 20 2018, 2:08 PM

Jul 19 2018

wmi added a comment to D49519: [RegisterCoalescer] Delay live interval update work until the rematerialization for all the uses from the same def is done.

Having invalid intermediate live ranges seems scary, and I'm not naturally convinced this is fine. How much have you tested this change yet?

Jul 19 2018, 8:40 AM

Jul 18 2018

wmi created D49519: [RegisterCoalescer] Delay live interval update work until the rematerialization for all the uses from the same def is done.
Jul 18 2018, 4:30 PM
wmi committed rL337402: [RegAlloc][NFC] Fix the help string of the option "huge-size-for-split"..
[RegAlloc][NFC] Fix the help string of the option "huge-size-for-split".
Jul 18 2018, 10:01 AM

Jul 16 2018

wmi added a comment to D49353: [RegAlloc] Skip global splitting if the live range is huge and its spill is trivially rematerializable .
In D49353#1163951, @wmi wrote:

For the record: The check is based on a LiveInterval::size() which gives you the number of segments. So I assume what is "huge" here is the number of basic blocks?

One segment can span multiple basicblocks. I am not sure whether one basicblock can have multiple segments inside of it theoretically, but it is uncommon. So emperically large number of segments mean large number of basicblocks, then large number of edge bundle nodes and high hopfield neural network algorithm cost.

Yes that's what I was getting at (just trying to understand the context); the description speaks about a live range being "huge", but just because you have a huge function or a huge basic block does not necessarily trigger this condition. I think right now with the connected component rule in place we can have no more than two segments of the same virtual register inside a basic block (a value living, and a value created possibly living out), any other situation must have been split up into multiple vregs previously. I had the same experience that the bad situations for register allocation compiletime (or copy coalescing for that matter) is automatically generated lexer or parser code with a big number of basic blocks. That usually leads to new value numbers being created at join points increasing the number of liverange segments...

Jul 16 2018, 3:27 PM
wmi added a comment to D49353: [RegAlloc] Skip global splitting if the live range is huge and its spill is trivially rematerializable .

For the record: The check is based on a LiveInterval::size() which gives you the number of segments. So I assume what is "huge" here is the number of basic blocks?

Jul 16 2018, 11:49 AM
wmi committed rL337186: [RegAlloc] Skip global splitting if the live range is huge and its spill is.
[RegAlloc] Skip global splitting if the live range is huge and its spill is
Jul 16 2018, 8:47 AM
wmi closed D49353: [RegAlloc] Skip global splitting if the live range is huge and its spill is trivially rematerializable .
Jul 16 2018, 8:47 AM

Jul 15 2018

wmi created D49353: [RegAlloc] Skip global splitting if the live range is huge and its spill is trivially rematerializable .
Jul 15 2018, 1:51 PM

Jun 28 2018

wmi accepted D48729: [ThinLTO] Port InlinerFunctionImportStats handling to new PM.

LGTM.

Jun 28 2018, 1:10 PM

Jun 25 2018

wmi committed rL335484: [SampleFDO] Add an option to turn on/off warning about samples unused..
[SampleFDO] Add an option to turn on/off warning about samples unused.
Jun 25 2018, 8:45 AM
wmi closed D48510: [SampleFDO] Add an option to turn on/off warning about samples unused.
Jun 25 2018, 8:45 AM

Jun 22 2018

wmi added a comment to D48510: [SampleFDO] Add an option to turn on/off warning about samples unused.

Does this happen when the code the profile is being applied to is not being built with some necessary debug options like -gmlt? Can/should it be fixed by adding that or another option?

Jun 22 2018, 7:18 PM
wmi created D48510: [SampleFDO] Add an option to turn on/off warning about samples unused.
Jun 22 2018, 5:07 PM