Page MenuHomePhabricator

davidxl (David Li)
User

Projects

User does not belong to any projects.

User Details

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

Recent Activity

Today

davidxl added a comment to D73381: [PGO][PGSO] Handle MBFIWrapper.

The MBFIWrapper change seems NFC, can it be extracted out first?

Fri, Jan 24, 1:53 PM · Restricted Project

Yesterday

davidxl added a comment to D73221: [PGO] Attach appropriate funclet operand bundles to value profiling instrumentation calls.

ok with me if Reid is ok with windows specific logic.

Thu, Jan 23, 11:41 AM · Restricted Project

Wed, Jan 22

davidxl added a comment to D73221: [PGO] Attach appropriate funclet operand bundles to value profiling instrumentation calls.

Can you extract Window's specific code into its own helper function if possible?

Wed, Jan 22, 3:22 PM · Restricted Project
davidxl accepted D73222: [PGO] Early detection regarding whether pgo counter promotion is possible.

lgtm

Wed, Jan 22, 3:12 PM · Restricted Project
davidxl added inline comments to D73222: [PGO] Early detection regarding whether pgo counter promotion is possible.
Wed, Jan 22, 2:31 PM · Restricted Project
davidxl added inline comments to D73222: [PGO] Early detection regarding whether pgo counter promotion is possible.
Wed, Jan 22, 1:27 PM · Restricted Project
davidxl added a comment to D73217: [InlineCost] Add flag to allow changing the default inline cost .

there are checks of explicit occurrences of inline-threshold option later, so the behavior seems unchanged.

Wed, Jan 22, 1:18 PM · Restricted Project
davidxl added a comment to D73217: [InlineCost] Add flag to allow changing the default inline cost .

ok. I see the intention. As long as the behavior of --inline-threshold option is not changed (it still overrides the new option), the new option seems fine to me. Adding individually controlled option for size opt seems a good idea too.

Wed, Jan 22, 12:51 PM · Restricted Project
davidxl added a comment to D73217: [InlineCost] Add flag to allow changing the default inline cost .

This change won't work. See

Wed, Jan 22, 12:23 PM · Restricted Project

Tue, Jan 21

davidxl accepted D73146: [PGO][PGSO] Update BFI in CodeGenPrepare::optimizeSelectInst..

lgtm

Tue, Jan 21, 4:04 PM · Restricted Project

Mon, Jan 20

davidxl accepted D72949: [NFC] small rename of private member in InlineCost.cpp.

lgtm

Mon, Jan 20, 9:49 AM · Restricted Project

Sun, Jan 19

davidxl added inline comments to D72949: [NFC] small rename of private member in InlineCost.cpp.
Sun, Jan 19, 10:25 PM · Restricted Project

Fri, Jan 17

davidxl added a comment to D71307: [Loads] Handle simple cases with same base pointer with constant offsets in FindAvailableLoadedValue when AA is null..

As other commented, please extract the code into its own function also add the support when AA is available ( as other parts of the function does).

Fri, Jan 17, 2:15 PM · Restricted Project
davidxl requested changes to D72949: [NFC] small rename of private member in InlineCost.cpp.
Fri, Jan 17, 2:15 PM · Restricted Project
davidxl accepted D72949: [NFC] small rename of private member in InlineCost.cpp.
Fri, Jan 17, 2:15 PM · Restricted Project
davidxl accepted D71307: [Loads] Handle simple cases with same base pointer with constant offsets in FindAvailableLoadedValue when AA is null..

lgtm

Fri, Jan 17, 11:11 AM · Restricted Project
davidxl added inline comments to D71307: [Loads] Handle simple cases with same base pointer with constant offsets in FindAvailableLoadedValue when AA is null..
Fri, Jan 17, 9:34 AM · Restricted Project

Thu, Jan 16

davidxl accepted D71308: [CallPromotionUtils] Add tryPromoteCall..

lgtm

Thu, Jan 16, 3:13 PM · Restricted Project

Wed, Jan 15

davidxl accepted D72744: [NFC] Refactor InlineResult for readability.

thanks for the cleanup. The implicit conversion was not quite readable. LGTM

Wed, Jan 15, 10:59 AM · Restricted Project
davidxl accepted D72790: [SampleFDO] Fix invalid branch profile generated by indirect call promotion.

lgtm

Wed, Jan 15, 10:40 AM · Restricted Project

Tue, Jan 14

davidxl added a comment to D72744: [NFC] Refactor InlineResult for readability.

InlineResult --> inlining related result (viability, etc) -- it captures two pieces of information: 1) inline decision and 2) when decision is 'no', related inline analysis that leads to the no decision. The class name seems fine. The patch makes the 'decision' part more explicit, and also fixes some bug in missing the right analysis message.

Tue, Jan 14, 9:31 PM · Restricted Project
davidxl added a comment to D72744: [NFC] Refactor InlineResult for readability.

Class Name ResultWithMessage sounds too generic. Why not keeping the InlineResult class name? The rest of the changes look reasonable.

Tue, Jan 14, 4:53 PM · Restricted Project

Mon, Jan 13

davidxl accepted D72653: [PGO][CHR] Guard against 0-to-0 branch weight and avoid division by zero crash..

lgtm

Mon, Jan 13, 2:30 PM · Restricted Project
davidxl accepted D72618: [Inlining] Add PreInlineThreshold for the new pass manager.

lgtm

Mon, Jan 13, 7:53 AM · Restricted Project

Fri, Jan 10

davidxl accepted D71733: [NFC][InlineCost] Factor cost modeling out of CallAnalyzer traversal..

lgtm

Fri, Jan 10, 3:21 PM · Restricted Project

Thu, Jan 9

davidxl added inline comments to D71308: [CallPromotionUtils] Add tryPromoteCall..
Thu, Jan 9, 12:25 PM · Restricted Project

Wed, Jan 8

davidxl added inline comments to D71733: [NFC][InlineCost] Factor cost modeling out of CallAnalyzer traversal..
Wed, Jan 8, 2:23 PM · Restricted Project

Tue, Jan 7

davidxl added a comment to D71733: [NFC][InlineCost] Factor cost modeling out of CallAnalyzer traversal..

The intention is to make the base CallAnalysis becomes a symbolic execution engine (virtual optimizations) what can be reused. The cost tracking is extracted into the derived class.

Tue, Jan 7, 11:41 AM · Restricted Project
davidxl added a reviewer for D71501: Cost Annotation Writer for InlineCost: kazu.
Tue, Jan 7, 9:27 AM · Restricted Project
davidxl added a comment to D71501: Cost Annotation Writer for InlineCost.

This looks useful. Is it possible to add a test case?

Tue, Jan 7, 9:27 AM · Restricted Project

Mon, Jan 6

davidxl accepted D71970: [profile] Support merge pool size >= 10.

lgtm

Mon, Jan 6, 11:45 AM · Restricted Project, Restricted Project
davidxl added a comment to D71733: [NFC][InlineCost] Factor cost modeling out of CallAnalyzer traversal..

this looks good to me. Easwaran, do you have any comments on the refactoring?

Mon, Jan 6, 9:07 AM · Restricted Project

Dec 23 2019

davidxl added a comment to D71776: [NFC][InlineCost] Refactor CallAnalyzer::analyze.

This patch will be part of mtrofin's https://reviews.llvm.org/D71733, so there is no need for it.

Dec 23 2019, 10:38 AM · Restricted Project
davidxl added inline comments to D71733: [NFC][InlineCost] Factor cost modeling out of CallAnalyzer traversal..
Dec 23 2019, 10:38 AM · Restricted Project

Dec 20 2019

davidxl added inline comments to D71733: [NFC][InlineCost] Factor cost modeling out of CallAnalyzer traversal..
Dec 20 2019, 8:16 PM · Restricted Project
davidxl added a comment to D69591: Devirtualize a call on alloca without waiting for post inline cleanup and next DevirtSCCRepeatedPass iteration..

Use AAManager (include/llvm/Analysis/AliasAnalysis.h) by registering only BasicAA ?

Dec 20 2019, 9:59 AM · Restricted Project

Dec 19 2019

davidxl added a comment to D71733: [NFC][InlineCost] Factor cost modeling out of CallAnalyzer traversal..

The SROA handling code should also be abstracted away and let the derived class handling cost accumulation. In particular, the common code pattern like:

Dec 19 2019, 10:44 PM · Restricted Project
davidxl added inline comments to D71733: [NFC][InlineCost] Factor cost modeling out of CallAnalyzer traversal..
Dec 19 2019, 6:43 PM · Restricted Project
davidxl added a comment to D71307: [Loads] Handle simple cases with same base pointer with constant offsets in FindAvailableLoadedValue when AA is null..

BasicAA is stateless and should be available and used here to disambiguate.

Dec 19 2019, 4:14 PM · Restricted Project
davidxl accepted D71645: [NFC][InlineCost] Simplify internal inlining cost interface.

lgtm

Dec 19 2019, 3:10 PM · Restricted Project
davidxl added a comment to D71645: [NFC][InlineCost] Simplify internal inlining cost interface.

There is comment like this:

Dec 19 2019, 11:34 AM · Restricted Project

Dec 17 2019

davidxl accepted D71646: [NFC][InlineCost] Run clang-format on InlineCost.cpp.

lgtm

Dec 17 2019, 10:43 PM · Restricted Project

Dec 10 2019

davidxl accepted D71323: [profile] Avoid allocating a page on the stack, NFC.

lgtm

Dec 10 2019, 11:46 PM · Restricted Project, Restricted Project
davidxl accepted D71288: [PGO][PGSO] Enable size optimizations in code gen / target passes for cold code..

lgtm

Dec 10 2019, 10:55 AM · Restricted Project

Dec 6 2019

davidxl accepted D71149: [PGO][PGSO] Instrument the code gen / target passes..

lgtm

Dec 6 2019, 4:07 PM · Restricted Project
davidxl accepted D71072: [PGO][PGSO] Instrument the code gen / target passes..

lgtm

Dec 6 2019, 10:03 AM · Restricted Project

Dec 5 2019

davidxl added inline comments to D71072: [PGO][PGSO] Instrument the code gen / target passes..
Dec 5 2019, 10:15 AM · Restricted Project
davidxl accepted D64376: [MBP] Avoid tail duplication if it can't bring benefit.

lgtm

Dec 5 2019, 9:24 AM · Restricted Project

Dec 3 2019

davidxl accepted D70988: [PGO][PGSO] Distinguish queries from unit tests and explicitly enable for the existing IR passes only. NFC..

lgtm

Dec 3 2019, 3:23 PM · Restricted Project
davidxl added inline comments to D64376: [MBP] Avoid tail duplication if it can't bring benefit.
Dec 3 2019, 11:47 AM · Restricted Project

Dec 2 2019

davidxl accepted D70510: [PGO][PGSO] Add an optional query type parameter to shouldOptimizeForSize..

lgtm

Dec 2 2019, 1:05 PM · Restricted Project

Nov 25 2019

davidxl added a comment to D70655: [AutoFDO] Top-down Inlining for specialization with context-sensitive profile.

what I mentioned should be complementary to the top-down method in this patch -- it just allows the full top-down to be doable for cross module scenario as well.

Nov 25 2019, 11:32 AM · Restricted Project
davidxl added a comment to D70655: [AutoFDO] Top-down Inlining for specialization with context-sensitive profile.

One way to handle it is 1) delay early inlining of sites into a hot function if a big percentage of calls to the function are from other modules. This still allows intra module top down inlining of it; or 2) keep a clone of the unlined body of the original function and use that one during cross module inlining.

Nov 25 2019, 10:45 AM · Restricted Project
davidxl added a comment to D70655: [AutoFDO] Top-down Inlining for specialization with context-sensitive profile.

This looks good. Can this be handled for cross module (thinLTO) case somehow too?

Nov 25 2019, 8:28 AM · Restricted Project

Nov 22 2019

davidxl accepted D64532: [CMake] Support separate installation of InstrProfData.inc.

lgtm

Nov 22 2019, 11:57 AM · Restricted Project, Restricted Project

Nov 21 2019

davidxl added a comment to D70510: [PGO][PGSO] Add an optional query type parameter to shouldOptimizeForSize..

How is the query type going to be checked?

Nov 21 2019, 1:35 PM · Restricted Project
davidxl added inline comments to D70330: [profile] Fix file contention causing dropped counts on Windows under -fprofile-generate.
Nov 21 2019, 9:25 AM · Restricted Project, Restricted Project

Nov 20 2019

davidxl added a comment to D70510: [PGO][PGSO] Add an optional query type parameter to shouldOptimizeForSize..

Can this be derived statically from the FuncT or BlockT?

Nov 20 2019, 2:43 PM · Restricted Project
davidxl accepted D70330: [profile] Fix file contention causing dropped counts on Windows under -fprofile-generate.

lgtm

Nov 20 2019, 1:56 PM · Restricted Project, Restricted Project
davidxl added inline comments to D70330: [profile] Fix file contention causing dropped counts on Windows under -fprofile-generate.
Nov 20 2019, 1:28 PM · Restricted Project, Restricted Project
davidxl added inline comments to D70330: [profile] Fix file contention causing dropped counts on Windows under -fprofile-generate.
Nov 20 2019, 12:23 PM · Restricted Project, Restricted Project
davidxl added a comment to D70330: [profile] Fix file contention causing dropped counts on Windows under -fprofile-generate.

Perhaps just add additional checks on the content of the dumped profile to make the test case more complete.

Nov 20 2019, 8:44 AM · Restricted Project, Restricted Project

Nov 19 2019

davidxl accepted D70330: [profile] Fix file contention causing dropped counts on Windows under -fprofile-generate.

thanks for the test case.

Nov 19 2019, 2:33 PM · Restricted Project, Restricted Project
davidxl added inline comments to D69591: Devirtualize a call on alloca without waiting for post inline cleanup and next DevirtSCCRepeatedPass iteration..
Nov 19 2019, 9:38 AM · Restricted Project

Nov 15 2019

davidxl accepted D69586: [profile] Support online merging with continuous sync mode.

lgtm

Nov 15 2019, 7:12 PM · Restricted Project, Restricted Project, Restricted Project
davidxl added a comment to D69586: [profile] Support online merging with continuous sync mode.

Since the unlock is the common path, why not replacing goto with a helper as well?

Nov 15 2019, 4:52 PM · Restricted Project, Restricted Project, Restricted Project
davidxl added inline comments to D69586: [profile] Support online merging with continuous sync mode.
Nov 15 2019, 3:51 PM · Restricted Project, Restricted Project, Restricted Project
davidxl added a comment to D70330: [profile] Fix file contention causing dropped counts on Windows under -fprofile-generate.

Is it possible to add a test?

Nov 15 2019, 3:25 PM · Restricted Project, Restricted Project
davidxl added a comment to D70147: Repeat DevirtSCCRepeatedPass if new indirect calls are found..

Around line 1323 of InlineCost.cpp, there is code that detects if the new indirect callsites can become direct sites after inlining. This information can be passed back to the caller (via GetInlineCost and shouldInline interfaces). WIth that, I think the compile time impact can be minimized.

Nov 15 2019, 2:15 PM · Restricted Project
davidxl updated the diff for D68898: JumpThreading: enhance JT to handle BB with no successor and address comparison.

rebased and addressed review feedbacks.

Nov 15 2019, 11:34 AM · Restricted Project
davidxl created D70331: Jumpthreading change to handle return block.
Nov 15 2019, 11:34 AM · Restricted Project
davidxl added a comment to D70147: Repeat DevirtSCCRepeatedPass if new indirect calls are found..

The compile time impact looks too high. Might consider more fine grained check to trigger more iterations.

Nov 15 2019, 10:50 AM · Restricted Project

Nov 13 2019

davidxl accepted D70207: [PGO][PGSO] Temporarily disable the large working set size behavior..

lgtm

Nov 13 2019, 2:01 PM · Restricted Project

Nov 12 2019

davidxl added inline comments to D68898: JumpThreading: enhance JT to handle BB with no successor and address comparison.
Nov 12 2019, 8:20 PM · Restricted Project
davidxl added inline comments to D70147: Repeat DevirtSCCRepeatedPass if new indirect calls are found..
Nov 12 2019, 3:29 PM · Restricted Project
davidxl added a comment to D70147: Repeat DevirtSCCRepeatedPass if new indirect calls are found..

Any compile time impact numbers?

Nov 12 2019, 3:19 PM · Restricted Project
davidxl accepted D70135: [profile] Factor out logic for mmap'ing merged profile, NFC.

/* */ is more common, so perhaps make it consistent to this. lgtm otherwise

Nov 12 2019, 10:55 AM · Restricted Project, Restricted Project

Nov 11 2019

davidxl added a comment to D70095: [PGO][PGSO] DAG.shouldOptForSize part..

Looks good to me. Added Sanjay and Simon for review.

Nov 11 2019, 11:26 AM · Restricted Project
davidxl added reviewers for D70095: [PGO][PGSO] DAG.shouldOptForSize part.: RKSimon, spatel.
Nov 11 2019, 11:26 AM · Restricted Project

Nov 8 2019

davidxl added a comment to D67120: [PGO] Profile guided code size optimization (continued)..

May I suggest another split? DAG.shouldOptForSize change can be split out as a NFC.

Nov 8 2019, 11:57 AM · Restricted Project

Nov 7 2019

davidxl added a comment to D69740: [profile] Support counter relocation at runtime.

If the runtime/size overhead is acceptable, I prefer this simpler version of implementation. We can always document the improvement possibility in the source and enhance it later if needed.

Nov 7 2019, 8:27 AM · Restricted Project, Restricted Project, Restricted Project

Nov 5 2019

davidxl added inline comments to D69737: [PGO][PGSO] TargetInstrInfo part..
Nov 5 2019, 10:56 AM · Restricted Project

Oct 31 2019

davidxl accepted D68351: [profile] Add a mode to continuously sync counter updates to a file.

lgtm

Oct 31 2019, 2:04 PM · Restricted Project, Restricted Project, Restricted Project

Oct 30 2019

davidxl added a comment to D69591: Devirtualize a call on alloca without waiting for post inline cleanup and next DevirtSCCRepeatedPass iteration..

In this case (shown in godbot), why does PM decides to not iterate another round?

Oct 30 2019, 4:17 PM · Restricted Project
davidxl accepted D69580: [PGO][PGSO] TargetLowering/TargetTransformationInfo/SwitchLoweringUtils part..

lgtm.

Oct 30 2019, 12:19 PM · Restricted Project
davidxl added a comment to D68898: JumpThreading: enhance JT to handle BB with no successor and address comparison.

Ping.

Oct 30 2019, 11:21 AM · Restricted Project

Oct 29 2019

davidxl added inline comments to D68351: [profile] Add a mode to continuously sync counter updates to a file.
Oct 29 2019, 4:06 PM · Restricted Project, Restricted Project, Restricted Project

Oct 28 2019

davidxl added a comment to D67120: [PGO] Profile guided code size optimization (continued)..

With SizeOpts change split, is it ready to split TargetLowering changes out?

Oct 28 2019, 1:37 PM · Restricted Project

Oct 24 2019

davidxl accepted D69409: [PGO][PGSO] SizeOpts changes..

lgtm

Oct 24 2019, 3:49 PM · Restricted Project

Oct 18 2019

davidxl accepted D69137: [profile] Do not cache __llvm_profile_get_filename result.

Thanks. lgtm

Oct 18 2019, 4:23 PM · Restricted Project, Restricted Project, Restricted Project

Oct 17 2019

davidxl added a comment to D69137: [profile] Do not cache __llvm_profile_get_filename result.

If we can clean up the code, that will be great.

Oct 17 2019, 7:07 PM · Restricted Project, Restricted Project, Restricted Project
davidxl added a comment to D69137: [profile] Do not cache __llvm_profile_get_filename result.

maybe we should make lprofCurFilename hidden?

Oct 17 2019, 4:40 PM · Restricted Project, Restricted Project, Restricted Project
davidxl added a comment to D69137: [profile] Do not cache __llvm_profile_get_filename result.

I see.

Oct 17 2019, 3:25 PM · Restricted Project, Restricted Project, Restricted Project
davidxl added a comment to D69137: [profile] Do not cache __llvm_profile_get_filename result.

shared lib should have different profile name from the main executable so the test should check that two file names are not identical?

Oct 17 2019, 2:57 PM · Restricted Project, Restricted Project, Restricted Project
davidxl accepted D69070: [PGO][PGSO] SizeOpts changes..

lgtm

Oct 17 2019, 9:27 AM · Restricted Project

Oct 16 2019

davidxl added inline comments to D69070: [PGO][PGSO] SizeOpts changes..
Oct 16 2019, 2:33 PM · Restricted Project

Oct 15 2019

davidxl added inline comments to D68901: [SampleFDO] Add profile remapping support for profile on-demand loading used by ExtBinary format profile.
Oct 15 2019, 10:39 AM · Restricted Project

Oct 13 2019

davidxl added a comment to D68898: JumpThreading: enhance JT to handle BB with no successor and address comparison.

Handling what Wei's case will be a nice thing to have, but it may require more significant change in JT. Currently the JT candidate BB selection is based on checking the conditional value used by branch or return value of ret instr (with this patch).

Oct 13 2019, 2:17 PM · Restricted Project

Oct 12 2019

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

Wenlei, this sounds like a good idea. Patches are welcome!

Oct 12 2019, 12:27 PM · Restricted Project

Oct 11 2019

davidxl added a comment to D68898: JumpThreading: enhance JT to handle BB with no successor and address comparison.

JumpThreading is basically basic block cloning followed by control flow simplification. This is just a special case where the second part is missing.

Oct 11 2019, 7:36 PM · Restricted Project