davidxl (David Li)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 13 2015, 9:48 AM (139 w, 1 d)

Recent Activity

Today

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?

Tue, Dec 12, 8:27 PM

Yesterday

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

lgtm

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

Sun, Dec 10

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

Sat, Dec 9

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
Sat, Dec 9, 11:40 PM

Fri, Dec 8

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

Thu, Dec 7

davidxl added inline comments to D40699: Split IndirectBr critical edges before PGO gen/use passes..
Thu, Dec 7, 5:21 PM
davidxl committed rCRT320105: Test case update for D40873.
Test case update for D40873
Thu, Dec 7, 2:25 PM
davidxl committed rL320105: Test case update for D40873.
Test case update for D40873
Thu, Dec 7, 2:24 PM
davidxl committed rL320104: [PGO] detect infinite loop and form MST properly.
[PGO] detect infinite loop and form MST properly
Thu, Dec 7, 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.
Thu, Dec 7, 2:24 PM

Wed, Dec 6

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.

Wed, Dec 6, 11:29 AM

Tue, Dec 5

davidxl created D40873: [PGO] handle infinite loop properly in pgo instrumention.
Tue, Dec 5, 4:34 PM
davidxl committed rL319842: Revert test case change for r319794.
Revert test case change for r319794
Tue, Dec 5, 1:54 PM
davidxl committed rCRT319842: Revert test case change for r319794.
Revert test case change for r319794
Tue, Dec 5, 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…
Tue, Dec 5, 1:54 PM
davidxl committed rCRT319795: [PGO] fix test case for D40702.
[PGO] fix test case for D40702
Tue, Dec 5, 9:20 AM
davidxl committed rL319795: [PGO] fix test case for D40702.
[PGO] fix test case for D40702
Tue, Dec 5, 9:20 AM
davidxl committed rL319794: [PGO] detect infinite loop and form MST properly.
[PGO] detect infinite loop and form MST properly
Tue, Dec 5, 9:20 AM
davidxl closed D40702: [PGO] More fix to infinite loop profiling by committing rL319794: [PGO] detect infinite loop and form MST properly.
Tue, Dec 5, 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.

Tue, Dec 5, 9:02 AM

Mon, Dec 4

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

lgtm

Mon, Dec 4, 10:46 AM

Fri, Dec 1

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

lgtm

Fri, Dec 1, 1:29 PM
davidxl added inline comments to D40425: Extending CFGPrinter and CallPrinter with Heat Colors.
Fri, Dec 1, 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?
Fri, Dec 1, 10:28 AM

Thu, Nov 30

davidxl created D40702: [PGO] More fix to infinite loop profiling.
Thu, Nov 30, 11:00 PM
davidxl committed rL319463: [PGO] Add a test case for infinite loops.
[PGO] Add a test case for infinite loops
Thu, Nov 30, 11:38 AM
davidxl committed rCRT319463: [PGO] Add a test case for infinite loops.
[PGO] Add a test case for infinite loops
Thu, Nov 30, 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.
Thu, Nov 30, 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.
Thu, Nov 30, 11:38 AM
davidxl committed rL319462: [PGO] Skip counter promotion for infinite loops.
[PGO] Skip counter promotion for infinite loops
Thu, Nov 30, 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.
Thu, Nov 30, 11:16 AM
davidxl created D40663: Add a test that infinite loop has profile properly collected..
Thu, Nov 30, 10:42 AM
davidxl created D40662: [PGO] Do not do counter promotion for loops without exit blocks ('infinite loops').
Thu, Nov 30, 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?

Thu, Nov 30, 9:56 AM

Tue, Nov 28

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

Mon, Nov 27

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.

Mon, Nov 27, 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.

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

lgtm

Mon, Nov 27, 9:23 AM

Wed, Nov 22

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.

Wed, Nov 22, 10:00 AM

Mon, Nov 20

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

lgtm

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

lgtm

Mon, Nov 20, 1:29 PM

Wed, Nov 15

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.

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

lgtm

Wed, Nov 15, 9:30 AM

Tue, Nov 14

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

lgtm

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

Mon, Nov 13

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

lgtm

Mon, Nov 13, 10:45 PM
davidxl added a comment to D39992: [CodeGenPrepare] Disable div bypass when working set size is huge..

hasHugeWorkingSetSize () can be used to selectively disable size increase transformations while Os can be more aggressive at the cost of performance given its mission, so I don't think we should piggyback on Os for performance purpose.

Mon, Nov 13, 8:01 PM

Nov 10 2017

davidxl accepted D39607: [PartialInliner] Inline vararg functions that forward varargs..

lgtm

Nov 10 2017, 11:59 AM

Nov 9 2017

davidxl accepted D39872: Add a wrapper function to set branch weights metadata..

lgtm

Nov 9 2017, 2:45 PM

Nov 8 2017

davidxl added inline comments to D38190: Partial Inlining with multi-region outlining based on PGO information.
Nov 8 2017, 1:27 PM
davidxl added a comment to D39607: [PartialInliner] Inline vararg functions that forward varargs..

We do life-time marker and static alloca shrink wrapping optimization for outlining. Do you see opportunity for vaarg shrink-wrapping too? If yes, it may be considered as a follow up.

Nov 8 2017, 8:51 AM

Nov 7 2017

davidxl added inline comments to D39607: [PartialInliner] Inline vararg functions that forward varargs..
Nov 7 2017, 9:45 AM

Nov 6 2017

davidxl added a comment to D31647: [JumpThreading] Propagate branch hint metadata in more cases.

I have not looked at this patch in details, but from the test case, it seems that the problem should be handled by the updatePredecessorProfileMetadata () method. Have you checked why the existing update does not kick in?

Nov 6 2017, 2:00 PM
davidxl committed rL317514: Fix comment /NFC.
Fix comment /NFC
Nov 6 2017, 1:58 PM

Nov 2 2017

davidxl added inline comments to D39581: [PartialInliner] Skip call sites where inlining fails..
Nov 2 2017, 5:07 PM
davidxl accepted D39137: Add CallSiteSplitting pass.

lgtm

Nov 2 2017, 1:49 PM

Nov 1 2017

davidxl accepted D39447: [PGO] Bump the indexed profile format version.

lgtm

Nov 1 2017, 9:12 PM

Oct 31 2017

davidxl accepted D39385: [BranchProbabilityInfo] Handle irreducible loops..

lgtm

Oct 31 2017, 11:24 AM
davidxl added inline comments to D39385: [BranchProbabilityInfo] Handle irreducible loops..
Oct 31 2017, 9:51 AM
davidxl accepted D39112: [CodeExtractor] Fix iterator invalidation in findOrCreateBlockForHoisting..

lgtm

Oct 31 2017, 9:41 AM

Oct 30 2017

davidxl added inline comments to D39447: [PGO] Bump the indexed profile format version.
Oct 30 2017, 8:28 PM
davidxl added inline comments to D39137: Add CallSiteSplitting pass.
Oct 30 2017, 3:50 PM
davidxl added inline comments to D39385: [BranchProbabilityInfo] Handle irreducible loops..
Oct 30 2017, 10:45 AM
davidxl accepted D39028: Irreducible loop metadata for more accurate block frequency under PGO..

lgtm

Oct 30 2017, 10:26 AM

Oct 27 2017

davidxl added a reviewer for D39385: [BranchProbabilityInfo] Handle irreducible loops.: yamauchi.
Oct 27 2017, 1:13 PM
davidxl added inline comments to D39028: Irreducible loop metadata for more accurate block frequency under PGO..
Oct 27 2017, 10:45 AM

Oct 23 2017

davidxl accepted D39145: [PM] Add pgo-memop-opt pass to the new pass manager.

lgtm

Oct 23 2017, 2:18 PM
davidxl added inline comments to D39137: Add CallSiteSplitting pass.
Oct 23 2017, 9:31 AM

Oct 20 2017

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

Oct 18 2017

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

Oct 17 2017

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

Oct 16 2017

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

please also add test cases.

Oct 16 2017, 12:05 PM

Oct 13 2017

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.

Oct 13 2017, 2:05 PM

Oct 11 2017

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.

Oct 11 2017, 5:35 PM

Oct 9 2017

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

Oct 6 2017

davidxl added inline comments to D37467: Add a new pass to speculate around PHI nodes with constant (integer) operands when profitable..
Oct 6 2017, 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?

Oct 6 2017, 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.

Oct 6 2017, 9:46 AM

Oct 5 2017

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

Oct 4 2017

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

A test case?

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

Oct 2 2017

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

Sep 29 2017

davidxl committed rL314585: Fix buildbot failure -- tighten type check for matching phi.
Fix buildbot failure -- tighten type check for matching phi
Sep 29 2017, 10:29 PM
davidxl committed rL314579: Recommi r314561 after fixing over-debug assertion.
Recommi r314561 after fixing over-debug assertion
Sep 29 2017, 5:48 PM
davidxl committed rL314563: Revert 314561 due to debug build assertion failure.
Revert 314561 due to debug build assertion failure
Sep 29 2017, 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.
Sep 29 2017, 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
Sep 29 2017, 3:12 PM