davidxl (David Li)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 13 2015, 9:48 AM (149 w, 2 d)

Recent Activity

Yesterday

davidxl accepted D43605: [SampleProf] NFC. Expose reusable functionality in SampleProfile..

lgtm

Wed, Feb 21, 9:30 PM
davidxl accepted D43520: [ThinLTO] Represent relative BF using a scaled representation ..

LGTM

Wed, Feb 21, 12:45 PM

Tue, Feb 20

davidxl added inline comments to D43520: [ThinLTO] Represent relative BF using a scaled representation ..
Tue, Feb 20, 9:30 PM
davidxl added inline comments to D43520: [ThinLTO] Represent relative BF using a scaled representation ..
Tue, Feb 20, 1:20 PM

Thu, Feb 15

davidxl added inline comments to D43256: [MBP] Move a latch block with conditional exit and multi predecessors to top of loop.
Thu, Feb 15, 9:52 AM

Wed, Feb 14

davidxl added a comment to D43256: [MBP] Move a latch block with conditional exit and multi predecessors to top of loop.

Please add a few new test cases first.

Wed, Feb 14, 11:39 AM

Fri, Feb 9

davidxl accepted D43064: [LV] Fix analyzeInterleaving when -pass-remarks enabled.

lgtm

Fri, Feb 9, 9:11 AM

Thu, Feb 8

davidxl added a comment to D35804: [BPI] Detect branches in loops that make themselves not taken.

The branch probability depends on other factors which is not considered here.

Thu, Feb 8, 2:12 PM
davidxl added inline comments to D43064: [LV] Fix analyzeInterleaving when -pass-remarks enabled.
Thu, Feb 8, 9:21 AM

Tue, Feb 6

davidxl accepted D42946: Verify profile data confirms large loop trip counts..

LGTM + incorporating Ben's suggestion to use 'ult' if it can simplify the condition.

Tue, Feb 6, 10:41 AM

Mon, Feb 5

davidxl added inline comments to D42946: Verify profile data confirms large loop trip counts..
Mon, Feb 5, 11:15 PM
davidxl added inline comments to D42946: Verify profile data confirms large loop trip counts..
Mon, Feb 5, 10:12 PM

Wed, Jan 31

davidxl accepted D42703: Remove CallGraphTraits and use equivalent methods in GraphTraits.

lgtm

Wed, Jan 31, 11:58 AM
davidxl accepted D42698: [GraphTraits] Add support for iterating over children edges..

looks like the naming follows the node iteration interfaces. lgtm.

Wed, Jan 31, 11:58 AM

Tue, Jan 30

davidxl added inline comments to D42698: [GraphTraits] Add support for iterating over children edges..
Tue, Jan 30, 11:21 PM

Thu, Jan 25

davidxl accepted D42311: [SyntheticCounts] Rewrite the code using only graph traits..

lgtm

Thu, Jan 25, 11:34 AM

Jan 22 2018

davidxl added inline comments to D42311: [SyntheticCounts] Rewrite the code using only graph traits..
Jan 22 2018, 11:48 AM
davidxl added inline comments to D42311: [SyntheticCounts] Rewrite the code using only graph traits..
Jan 22 2018, 10:00 AM

Jan 18 2018

davidxl added a comment to D39869: [Inliner] Inline through indirect call sites having !callees metadata.

I actually mean the former.

Jan 18 2018, 10:24 AM

Jan 11 2018

davidxl accepted D41883: Add a ProfileCount class to represent entry counts..

lgtm

Jan 11 2018, 8:52 AM

Jan 10 2018

davidxl added inline comments to D41883: Add a ProfileCount class to represent entry counts..
Jan 10 2018, 3:39 PM
davidxl added inline comments to D41883: Add a ProfileCount class to represent entry counts..
Jan 10 2018, 1:55 PM

Jan 8 2018

davidxl accepted D40425: Extending CFGPrinter and CallPrinter with Heat Colors.

Add a minimal option test (new heat-color option) in test/Other/2007-06-05-PassID.ll ?

Jan 8 2018, 10:28 AM
davidxl added a comment to D39869: [Inliner] Inline through indirect call sites having !callees metadata.

I think 'tryToPromote' method should be moved to the indirect call promotion pass so that the callback to inline cost/benefit is exposed there (a more general cost/benefit model needs to be developed for indirect call promotion). Initially, I think we can limit the use of the getInlineCost callback to cases where profile data is not available, this will achieve what this patch is doing without affecting existing promotion heuristics.

Jan 8 2018, 10:05 AM
davidxl updated subscribers of D39869: [Inliner] Inline through indirect call sites having !callees metadata.
Jan 8 2018, 10:00 AM
davidxl accepted D41604: Add a pass to generate synthetic function entry counts..

lgtm

Jan 8 2018, 9:39 AM

Jan 4 2018

davidxl added inline comments to D41723: Introduce the "retpoline" x86 mitigation technique for variant #2 of the speculative execution vulnerabilities disclosed today, specifically identified by CVE-2017-5715, "Branch Target Injection", and is one of the two halves to Spectre...
Jan 4 2018, 4:02 PM
davidxl added inline comments to D41604: Add a pass to generate synthetic function entry counts..
Jan 4 2018, 11:50 AM

Jan 3 2018

davidxl added inline comments to D41604: Add a pass to generate synthetic function entry counts..
Jan 3 2018, 2:21 PM

Dec 21 2017

davidxl accepted D41461: Add hasProfileData() to check if a function has profile data. NFC..

Perhaps change the new interface documentation slightly to reflect that it is for real profile data.

Dec 21 2017, 9:55 AM

Dec 20 2017

davidxl added a comment to D41461: Add hasProfileData() to check if a function has profile data. NFC..

I prefer hasProfileData to be hasRealProfileData -- unless we want to make hasProfileData to mean has real profile data and ignores synthetic entry count later.

Dec 20 2017, 2:17 PM
davidxl accepted D41395: [PGO] Function section hotness prefix should look at all blocks.

lgtm

Dec 20 2017, 9:51 AM

Dec 18 2017

davidxl committed rL320999: [PGO] Test case changes for D41059.
[PGO] Test case changes for D41059
Dec 18 2017, 9:57 AM
davidxl committed rCRT320999: [PGO] Test case changes for D41059.
[PGO] Test case changes for D41059
Dec 18 2017, 9:57 AM
davidxl committed rL320998: [PGO] add MST min edge selection heuristic to ensure non-zero entry count.
[PGO] add MST min edge selection heuristic to ensure non-zero entry count
Dec 18 2017, 9:57 AM
davidxl closed D41059: [PGO] MST min edge selection heuristic to ensure non-zero entry count.
Dec 18 2017, 9:57 AM

Dec 15 2017

davidxl added a comment to D41059: [PGO] MST min edge selection heuristic to ensure non-zero entry count.

The instrumentation point will be before the no-return call, so there is probably no issue with instrumenting direct successor of the entry.

Dec 15 2017, 3:23 PM
davidxl updated the diff for D41059: [PGO] MST min edge selection heuristic to ensure non-zero entry count.

address comment: remove unnecessary early return check.

Dec 15 2017, 3:20 PM
davidxl accepted D41307: [PGO] Fix handling of cold entry count for instrumented PGO.

lgtm

Dec 15 2017, 3:19 PM
davidxl added inline comments to D41059: [PGO] MST min edge selection heuristic to ensure non-zero entry count.
Dec 15 2017, 2:48 PM
davidxl added inline comments to D41307: [PGO] Fix handling of cold entry count for instrumented PGO.
Dec 15 2017, 1:16 PM

Dec 14 2017

davidxl added a comment to D41059: [PGO] MST min edge selection heuristic to ensure non-zero entry count.

Ping ..

Dec 14 2017, 8:12 PM
davidxl accepted D40751: [ICP] Expose unconditional call promotion interface.

there are two small suggestions. otherwise LGTM

Dec 14 2017, 3:14 PM
davidxl added a comment to D41152: Use a custom container to reduce AFDO's memory usage by ~60%.

I suggest making this a multiple stage change.

Dec 14 2017, 2:10 PM
davidxl added inline comments to D40751: [ICP] Expose unconditional call promotion interface.
Dec 14 2017, 11:09 AM

Dec 12 2017

davidxl added a comment to D41152: Use a custom container to reduce AFDO's memory usage by ~60%.

Is it enough to simply replace StringMap with std::map<std::string, ..> for small maps? Do you have memory data with that?

Dec 12 2017, 8:27 PM

Dec 11 2017

davidxl accepted D40699: Split IndirectBr critical edges before PGO gen/use passes..

lgtm

Dec 11 2017, 6:55 PM
davidxl added inline comments to D40751: [ICP] Expose unconditional call promotion interface.
Dec 11 2017, 4:35 PM

Dec 10 2017

davidxl created D41059: [PGO] MST min edge selection heuristic to ensure non-zero entry count.
Dec 10 2017, 3:20 PM
davidxl created D41058: [PGO] New test case.
Dec 10 2017, 3:14 PM

Dec 9 2017

davidxl committed rL320285: [PGO] change arg type to uint64_t to match member field type.
[PGO] change arg type to uint64_t to match member field type
Dec 9 2017, 11:40 PM

Dec 8 2017

davidxl committed rCRT320181: Update test case for r320180.
Update test case for r320180
Dec 8 2017, 11:39 AM
davidxl committed rL320181: Update test case for r320180.
Update test case for r320180
Dec 8 2017, 11:39 AM
davidxl committed rL320180: Revert r320104: infinite loop profiling bug fix.
Revert r320104: infinite loop profiling bug fix
Dec 8 2017, 11:38 AM
davidxl added inline comments to D40699: Split IndirectBr critical edges before PGO gen/use passes..
Dec 8 2017, 9:30 AM

Dec 7 2017

davidxl added inline comments to D40699: Split IndirectBr critical edges before PGO gen/use passes..
Dec 7 2017, 5:21 PM
davidxl committed rCRT320105: Test case update for D40873.
Test case update for D40873
Dec 7 2017, 2:25 PM
davidxl committed rL320105: Test case update for D40873.
Test case update for D40873
Dec 7 2017, 2:24 PM
davidxl committed rL320104: [PGO] detect infinite loop and form MST properly.
[PGO] detect infinite loop and form MST properly
Dec 7 2017, 2:24 PM
davidxl closed D40873: [PGO] handle infinite loop properly in pgo instrumention by committing rL320104: [PGO] detect infinite loop and form MST properly.
Dec 7 2017, 2:24 PM

Dec 6 2017

davidxl added a comment to D40873: [PGO] handle infinite loop properly in pgo instrumention.

What happens is that the call of getAnalysis<LoopInfoWrapperPass>() is invoked after getAnalysis<BlockFrequencyInfoWrapperPass>(). The legacy pass manager in this case will do the analysis run to compute LoopInfo on the fly. Before running the analysis, it will also invoke the 'release' memory method of the analysis passes contained in, in this case is BPI and BFI. After that we basically have use-after free problem. The leaking is probably just a side effect.

Dec 6 2017, 11:29 AM

Dec 5 2017

davidxl created D40873: [PGO] handle infinite loop properly in pgo instrumention.
Dec 5 2017, 4:34 PM
davidxl committed rL319842: Revert test case change for r319794.
Revert test case change for r319794
Dec 5 2017, 1:54 PM
davidxl committed rCRT319842: Revert test case change for r319794.
Revert test case change for r319794
Dec 5 2017, 1:54 PM
davidxl committed rL319841: Revert r319794: [PGO] detect infinite loop and form MST properly: memory leak….
Revert r319794: [PGO] detect infinite loop and form MST properly: memory leak…
Dec 5 2017, 1:54 PM
davidxl committed rCRT319795: [PGO] fix test case for D40702.
[PGO] fix test case for D40702
Dec 5 2017, 9:20 AM
davidxl committed rL319795: [PGO] fix test case for D40702.
[PGO] fix test case for D40702
Dec 5 2017, 9:20 AM
davidxl committed rL319794: [PGO] detect infinite loop and form MST properly.
[PGO] detect infinite loop and form MST properly
Dec 5 2017, 9:20 AM
davidxl closed D40702: [PGO] More fix to infinite loop profiling by committing rL319794: [PGO] detect infinite loop and form MST properly.
Dec 5 2017, 9:20 AM
davidxl added a comment to D40699: Split IndirectBr critical edges before PGO gen/use passes..

This can be done in the PGO pass itself before the MST is formed. BFI has update interface such as setBlockFreq. The update can use simple heuristic to distribute the frequency.

Dec 5 2017, 9:02 AM

Dec 4 2017

davidxl added inline comments to D40425: Extending CFGPrinter and CallPrinter with Heat Colors.
Dec 4 2017, 10:52 AM
davidxl accepted D40750: Move splitIndirectCriticalEdges() to BasicBlockUtils.h..

lgtm

Dec 4 2017, 10:46 AM

Dec 1 2017

davidxl accepted D40658: [PGO] Make indirect call promotion a utility.

lgtm

Dec 1 2017, 1:29 PM
davidxl added inline comments to D40425: Extending CFGPrinter and CallPrinter with Heat Colors.
Dec 1 2017, 10:54 AM
davidxl added a comment to D40699: Split IndirectBr critical edges before PGO gen/use passes..
  1. As Eli pointed out, findIBRpredecessor may return null when there are multiple such predecessors, so perhaps create a new interface to return all such predecessors?
Dec 1 2017, 10:28 AM

Nov 30 2017

davidxl created D40702: [PGO] More fix to infinite loop profiling.
Nov 30 2017, 11:00 PM
davidxl committed rL319463: [PGO] Add a test case for infinite loops.
[PGO] Add a test case for infinite loops
Nov 30 2017, 11:38 AM
davidxl committed rCRT319463: [PGO] Add a test case for infinite loops.
[PGO] Add a test case for infinite loops
Nov 30 2017, 11:38 AM
davidxl closed D40663: Add a test that infinite loop has profile properly collected. by committing rCRT319463: [PGO] Add a test case for infinite loops.
Nov 30 2017, 11:38 AM
davidxl closed D40663: Add a test that infinite loop has profile properly collected. by committing rL319463: [PGO] Add a test case for infinite loops.
Nov 30 2017, 11:38 AM
davidxl committed rL319462: [PGO] Skip counter promotion for infinite loops.
[PGO] Skip counter promotion for infinite loops
Nov 30 2017, 11:16 AM
davidxl closed D40662: [PGO] Do not do counter promotion for loops without exit blocks ('infinite loops') by committing rL319462: [PGO] Skip counter promotion for infinite loops.
Nov 30 2017, 11:16 AM
davidxl created D40663: Add a test that infinite loop has profile properly collected..
Nov 30 2017, 10:42 AM
davidxl created D40662: [PGO] Do not do counter promotion for loops without exit blocks ('infinite loops').
Nov 30 2017, 10:41 AM
davidxl added a comment to D40658: [PGO] Make indirect call promotion a utility.

Can you make this patch a pure NFC one and split out the enhancement part into another patch?

Nov 30 2017, 9:56 AM

Nov 28 2017

davidxl added inline comments to D40568: design document for a hardware-assisted memory safety (HWAMS) tool, similar to AddressSanitizer.
Nov 28 2017, 5:21 PM

Nov 27 2017

davidxl added a comment to D39869: [Inliner] Inline through indirect call sites having !callees metadata.

Yes, I think it is good to do the necessary refactoring work first.

Nov 27 2017, 11:06 AM
davidxl added a comment to D39869: [Inliner] Inline through indirect call sites having !callees metadata.

A high level comment: I think the right direction is to share the implementation with the existing IndirectCallPromotion.cpp pass. The analyzer can synthesize the MD_prof profile data for the indirect targets, though the actual target count can be synthesized with some heuristics.

Nov 27 2017, 9:52 AM
davidxl added inline comments to D40425: Extending CFGPrinter and CallPrinter with Heat Colors.
Nov 27 2017, 9:45 AM
davidxl accepted D38190: Partial Inlining with multi-region outlining based on PGO information.

lgtm

Nov 27 2017, 9:23 AM

Nov 22 2017

davidxl added a comment to D40097: [Inliner][NewPM] Inline functions outside of current SCC first.

Using heuristic like this for inline order decision is like tossing a coin. It is very likely that doing this can hurt some cases where inlining of inner edges are important but gets blocked.

Nov 22 2017, 10:00 AM

Nov 20 2017

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

lgtm

Nov 20 2017, 10:45 PM
davidxl accepted D40266: Fix a lld-x86_64-darwin13 build error..

lgtm

Nov 20 2017, 1:29 PM

Nov 15 2017

davidxl added a comment to D40037: [CallSiteSplitting] Remove some indirection (NFC)..

Thanks Florian for cleaning up this pass. Overall look good, but this doesn't seem a NFC and can miss an opportunity for a constant phi in non-OR structure. Please see my inline comments.

Nov 15 2017, 10:54 AM
davidxl accepted D39980: Add heuristics for irreducible loop metadata under PGO.

lgtm

Nov 15 2017, 9:30 AM

Nov 14 2017

davidxl added inline comments to D39980: Add heuristics for irreducible loop metadata under PGO.
Nov 14 2017, 4:04 PM
davidxl accepted D40043: Simplify irreducible loop metadata test code..
lgtm
Nov 14 2017, 11:16 AM
davidxl accepted D39992: [CodeGenPrepare] Disable div bypass when working set size is huge..

lgtm

Nov 14 2017, 9:49 AM
davidxl added inline comments to D39980: Add heuristics for irreducible loop metadata under PGO.
Nov 14 2017, 9:42 AM

Nov 13 2017

davidxl accepted D39997: [llvm-profdata] Report if profile data file is IR- or FE-level.

lgtm

Nov 13 2017, 10:45 PM