Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline

rjf (Ruijie Fang)
User

Projects

User does not belong to any projects.

User Details

User Since
Mar 18 2020, 5:08 PM (194 w, 2 d)

Recent Activity

Sep 10 2020

rjf added a comment to D59715: [HotColdSplit] Reflect full cost of parameters in split penalty.

@vsk If you're curious about how the max-params value affects code size, I think I can find some time to collect some numbers soon (on firefox). I'll post it here as soon as I have it.

Sep 10 2020, 9:11 PM · Restricted Project

Aug 28 2020

rjf accepted D59715: [HotColdSplit] Reflect full cost of parameters in split penalty.

@vsk Hope these following data collected from compiling Firefox helps. The "Delta" values come from my previous patch: https://reviews.llvm.org/D84468. Based on the data, this patch performs very well at reducing the code size.
-Os:

Aug 28 2020, 10:26 PM · Restricted Project
rjf updated the diff for D86832: [HotColdSplit][WIP] Add support for outlining Itanium EH blocks by hoisting calls to eh.typeid.for intrinsic.

Add test case for EH outlining

Aug 28 2020, 10:23 PM · Restricted Project
rjf updated the diff for D86832: [HotColdSplit][WIP] Add support for outlining Itanium EH blocks by hoisting calls to eh.typeid.for intrinsic.

Update comments.

Aug 28 2020, 10:11 PM · Restricted Project
rjf added a comment to D86832: [HotColdSplit][WIP] Add support for outlining Itanium EH blocks by hoisting calls to eh.typeid.for intrinsic.

This is marked WIP since it might be better to do the code transformation inside CodeExtractor instead of HotColdSplitting. With HCS, we're currently doing it before code extraction, but the region might end up being unworthy for extraction. But if we do it in CodeExtractor, we'll need another implementation of OutliningRegion to detect the SESE region enclosing the EH blocks.

Aug 28 2020, 10:06 PM · Restricted Project
rjf requested review of D86832: [HotColdSplit][WIP] Add support for outlining Itanium EH blocks by hoisting calls to eh.typeid.for intrinsic.
Aug 28 2020, 10:03 PM · Restricted Project

Aug 12 2020

rjf added a comment to D85628: [HotColdSplitting] Add command line options for supplying cold function names via user input..

If there was a way to provide handwritten profile/coverage file, maybe that would work in absence of profile information?

I am not sure I see a need for profiles here.

I don't think we need profile information. We just need __cxa_guard_acquire to be marked cold, and for the compiler to infer coldness of code in the same block as a call to something marked as cold. (Apparently HCS does this?)

Aug 12 2020, 5:59 PM · Restricted Project
rjf requested review of D85860: [HotColdSplit] Fix variable name spelling.
Aug 12 2020, 4:01 PM · Restricted Project
rjf updated the diff for D85628: [HotColdSplitting] Add command line options for supplying cold function names via user input..

Update test case to reflect newest changes

Aug 12 2020, 3:00 PM · Restricted Project
rjf added a comment to D85628: [HotColdSplitting] Add command line options for supplying cold function names via user input..
In D85628#2213919, @vsk wrote:

I’m not convinced this is a good idea. In what use case is it not possible to mark up relevant functions? It doesn’t make sense to me to make alternations to standard library functions within the compiler. It seems better to simply patch the standard library. In some cases llvm does infer function attributes for library functions, but these are generally lower level attributes that can’t be specified at the source level, and the attribute is made available to other passes in the pipeline.

Aug 12 2020, 1:30 PM · Restricted Project
rjf updated the diff for D85628: [HotColdSplitting] Add command line options for supplying cold function names via user input..

Mark cold functions in advance before outlining them.

Aug 12 2020, 12:39 PM · Restricted Project
rjf updated the diff for D85628: [HotColdSplitting] Add command line options for supplying cold function names via user input..

Add the test command for read from file.

Aug 12 2020, 10:56 AM · Restricted Project
rjf updated the diff for D85628: [HotColdSplitting] Add command line options for supplying cold function names via user input..

Add a test case for command line-supplied cold functions list.

Aug 12 2020, 10:30 AM · Restricted Project
rjf updated the diff for D85628: [HotColdSplitting] Add command line options for supplying cold function names via user input..

Remove unused includes.

Aug 12 2020, 9:15 AM · Restricted Project
rjf updated the diff for D85628: [HotColdSplitting] Add command line options for supplying cold function names via user input..

Support marking declarations, e.g. in @hiraditya's example of __cxa_guard_acquire/abort, as cold.

Aug 12 2020, 9:07 AM · Restricted Project
rjf updated the diff for D85628: [HotColdSplitting] Add command line options for supplying cold function names via user input..

Add debug messages.

Aug 12 2020, 8:18 AM · Restricted Project
rjf added inline comments to D85628: [HotColdSplitting] Add command line options for supplying cold function names via user input..
Aug 12 2020, 7:41 AM · Restricted Project
rjf added a comment to D85628: [HotColdSplitting] Add command line options for supplying cold function names via user input..
Aug 12 2020, 7:39 AM · Restricted Project
rjf updated the diff for D85628: [HotColdSplitting] Add command line options for supplying cold function names via user input..

Address review comments from @vsk, @hiraditya

Aug 12 2020, 7:38 AM · Restricted Project

Aug 11 2020

rjf added a comment to D85628: [HotColdSplitting] Add command line options for supplying cold function names via user input..

Based on discussion with @hiraditya and @rcorcs this morning, we're thinking doing this in in the ProfileSummaryInfo pass is better (have the PSI pass take as input user-specified cold funcs and mark them with cold attribute) as its benefit can be more wide-ranging than only for hotcoldsplit. Will prepare a separate patch for this.

Aug 11 2020, 9:39 AM · Restricted Project
rjf added a comment to D84468: [HotColdSplitting] Add SplittingDelta option to enable splitting more small blocks.

@vsk Apologies for the late reply. Here is the data on:

Aug 11 2020, 12:17 AM · Restricted Project

Aug 10 2020

rjf added inline comments to D59715: [HotColdSplit] Reflect full cost of parameters in split penalty.
Aug 10 2020, 3:55 PM · Restricted Project
rjf requested review of D85628: [HotColdSplitting] Add command line options for supplying cold function names via user input..
Aug 10 2020, 12:22 AM · Restricted Project

Aug 9 2020

rjf added a comment to D57265: [PM/CC1] Add -f[no-]split-cold-code CC1 options to toggle splitting.

Would also really like to see this patch landed. Also, as of today (8/10/2020), the patch cannot be cleanly applied into trunk without inducing merge conflicts anymore.

Aug 9 2020, 11:24 PM · Restricted Project, Restricted Project

Aug 5 2020

rjf updated the diff for D85331: [HotColdSplit] Add options for splitting cold functions in separate section.

The tests are modified from split-cold-2.ll in the same folder. Add comments to note this.

Aug 5 2020, 3:28 PM · Restricted Project
rjf added a comment to D85331: [HotColdSplit] Add options for splitting cold functions in separate section.

@rcorcs Your comments are addressed. Thanks!

Aug 5 2020, 3:23 PM · Restricted Project
rjf updated the diff for D85331: [HotColdSplit] Add options for splitting cold functions in separate section.

Incorporate @rcorcs 's suggestions.

Aug 5 2020, 3:22 PM · Restricted Project
rjf updated the diff for D85331: [HotColdSplit] Add options for splitting cold functions in separate section.

Add tests

Aug 5 2020, 3:16 PM · Restricted Project
rjf added a comment to D85331: [HotColdSplit] Add options for splitting cold functions in separate section.

Will add test case soon.

Aug 5 2020, 10:55 AM · Restricted Project
rjf requested review of D85331: [HotColdSplit] Add options for splitting cold functions in separate section.
Aug 5 2020, 10:54 AM · Restricted Project

Aug 4 2020

rjf added a comment to D85229: Revert "[HotColdSplit] Add test case for unlikely attribute in outlined function".

Accepted based on discussion with @hiraditya

Aug 4 2020, 11:07 AM · Restricted Project
rjf accepted D85229: Revert "[HotColdSplit] Add test case for unlikely attribute in outlined function".
Aug 4 2020, 11:07 AM · Restricted Project
rjf added a comment to D85215: [HotColdSplit] Remove target triples from architecture-agnostic testcases.

Looks like coldentrycount.ll is still causing a problem @hiraditya .

Aug 4 2020, 9:38 AM · Restricted Project
rjf added a comment to D69384: [HotColdSplit] Add unlikely attribute to outlined function.

Seems like this is caused by target datalayout and target triple. See https://reviews.llvm.org/D85215 for proposed fix.

Aug 4 2020, 9:03 AM · Restricted Project
rjf added a comment to D85148: Fix ARM build bots failures due to disabled x86_64-apple target.

@JamesNagurne We proposed a fix in https://reviews.llvm.org/D85215, instead of moving it into X86/, we made the test cases architecture-agnostic.

Aug 4 2020, 9:02 AM · Restricted Project
rjf added reviewers for D85215: [HotColdSplit] Remove target triples from architecture-agnostic testcases: CarolineConcatto, JamesNagurne.
Aug 4 2020, 9:01 AM · Restricted Project
rjf added a comment to D69257: Outline non returning functions unless a longjmp.

@hiraditya
We believe that this patch has caused the Flang buildbots to fail:
http://lab.llvm.org:8011/builders/flang-aarch64-ubuntu/builds/2437
http://lab.llvm.org:8011/builders/flang-aarch64-ubuntu-clang/builds/579
It would be nice if someone could take and action to revert of fix it ASAP.
Otherwise we cannot verify the other patches properly.

Aug 4 2020, 9:00 AM · Restricted Project
rjf requested review of D85215: [HotColdSplit] Remove target triples from architecture-agnostic testcases.
Aug 4 2020, 8:53 AM · Restricted Project

Aug 3 2020

rjf abandoned D76481: [MergeSimilarFunctions] Merge {D52896, D52898} with current trunk.
Aug 3 2020, 10:43 AM · Restricted Project
rjf abandoned D76480: [MergeSimilarFunctions] Merge D52896 with current trunk.
Aug 3 2020, 10:42 AM · Restricted Project

Jul 31 2020

rjf updated subscribers of D68192: Fix PR40710: Outlined Function has token parameter but isn't an intrinsic.
Jul 31 2020, 9:45 AM · Restricted Project, Restricted Project
rjf updated the diff for D84468: [HotColdSplitting] Add SplittingDelta option to enable splitting more small blocks.

Update diff to fix merge conflicts.

Jul 31 2020, 9:38 AM · Restricted Project
rjf updated the diff for D69257: Outline non returning functions unless a longjmp.

Add testcases for c stdlib longjmp/setjmp functions in addition to builtin_longjmp and builtin_setjmp.

Jul 31 2020, 9:29 AM · Restricted Project
rjf updated the diff for D69257: Outline non returning functions unless a longjmp.

equals should be contains

Jul 31 2020, 9:15 AM · Restricted Project
rjf updated subscribers of D69384: [HotColdSplit] Add unlikely attribute to outlined function.

@lebedev.ri Just a suggestion, but maybe the title should now be "[HotColdSplit] Add test case for unlikely attribute in outlined function"? Since this patch is now only adding a test case.

Jul 31 2020, 9:12 AM · Restricted Project
rjf updated the diff for D69257: Outline non returning functions unless a longjmp.

Check if function name equals longjmp when checking for blocks
including calls to longjmp; do not check for prefixes and suffixes
anymore, as it might cause potential problems in the future.

Jul 31 2020, 9:02 AM · Restricted Project

Jul 30 2020

rjf added a comment to D69384: [HotColdSplit] Add unlikely attribute to outlined function.

@hiraditya The testcase is passing. This should be ready to be merged.

Jul 30 2020, 11:07 PM · Restricted Project
rjf updated the diff for D69257: Outline non returning functions unless a longjmp.
Jul 30 2020, 11:00 PM · Restricted Project
rjf updated the diff for D69257: Outline non returning functions unless a longjmp.

Squash commits into one.

Jul 30 2020, 10:55 PM · Restricted Project
rjf updated the diff for D69257: Outline non returning functions unless a longjmp.
Jul 30 2020, 10:46 PM · Restricted Project
rjf updated the diff for D69257: Outline non returning functions unless a longjmp.

Update to include testcase with profile information, and check for "longjmp" suffix when detecting blocks containing a longjmp (since the intrinsic name is now "eh_sjlj_longjmp").

Jul 30 2020, 10:39 PM · Restricted Project

Jul 29 2020

rjf updated the diff for D69257: Outline non returning functions unless a longjmp.

Add testcase for longjmp.

Jul 29 2020, 11:03 PM · Restricted Project

Jul 28 2020

rjf added a comment to D69257: Outline non returning functions unless a longjmp.

ping @hiraditya .

Jul 28 2020, 8:04 PM · Restricted Project
rjf updated the diff for D69257: Outline non returning functions unless a longjmp.

Add testcase for outlining cold block containing assert fail.

Jul 28 2020, 8:02 PM · Restricted Project
rjf added a comment to D84468: [HotColdSplitting] Add SplittingDelta option to enable splitting more small blocks.

@vsk I'll post some relevant statistics on the distribution of benefit-penalty scores on our workloads first:

Jul 28 2020, 4:13 PM · Restricted Project
rjf updated the diff for D84468: [HotColdSplitting] Add SplittingDelta option to enable splitting more small blocks.

Change default SplittingDelta to zero.

Jul 28 2020, 9:42 AM · Restricted Project
rjf added a comment to D84468: [HotColdSplitting] Add SplittingDelta option to enable splitting more small blocks.

Based on discussion with @hiraditya today we'll change the default to 0 (which stays the same) and add additional test cases for delta=5 (which come from the four failing cases here).

Jul 28 2020, 8:40 AM · Restricted Project

Jul 23 2020

Herald added a project to D84468: [HotColdSplitting] Add SplittingDelta option to enable splitting more small blocks: Restricted Project.
Jul 23 2020, 2:37 PM · Restricted Project
rjf added a comment to D69257: Outline non returning functions unless a longjmp.

Ping for review.

Jul 23 2020, 11:24 AM · Restricted Project
rjf updated the diff for D69257: Outline non returning functions unless a longjmp.

Resolved merge conflicts.

Jul 23 2020, 10:49 AM · Restricted Project
rjf added a comment to D69257: Outline non returning functions unless a longjmp.

Seems like the patch isn't applying cleanly (which is causing the build failure). I'm looking into it.

Jul 23 2020, 10:18 AM · Restricted Project

Jul 22 2020

rjf commandeered D69257: Outline non returning functions unless a longjmp.

Commandeering this revision as discussed with @hiraditya .

Jul 22 2020, 9:39 PM · Restricted Project
rjf updated the diff for D69257: Outline non returning functions unless a longjmp.

Utilize profile information to mark longjmp blocks as unlikely executed if they are cold.

Jul 22 2020, 5:43 PM · Restricted Project
rjf updated the diff for D69257: Outline non returning functions unless a longjmp.

Remove use of CallSite and update longjmp intrinsics (since Intrinsics::longjmp is removed, changed to using Intrinsics::eh_sjlj_longjmp).

Jul 22 2020, 5:36 PM · Restricted Project

Mar 20 2020

rjf updated the summary of D76481: [MergeSimilarFunctions] Merge {D52896, D52898} with current trunk.
Mar 20 2020, 12:30 AM · Restricted Project
rjf updated the summary of D76480: [MergeSimilarFunctions] Merge D52896 with current trunk.
Mar 20 2020, 12:30 AM · Restricted Project
rjf updated the summary of D76480: [MergeSimilarFunctions] Merge D52896 with current trunk.
Mar 20 2020, 12:30 AM · Restricted Project
rjf created D76480: [MergeSimilarFunctions] Merge D52896 with current trunk.
Mar 20 2020, 12:30 AM · Restricted Project
rjf created D76481: [MergeSimilarFunctions] Merge {D52896, D52898} with current trunk.
Mar 20 2020, 12:30 AM · Restricted Project
rjf retitled D76480: [MergeSimilarFunctions] Merge D52896 with current trunk from Merge D52896 with current trunk to [MergeSimilarFunctions] Merge D52896 with current trunk.
Mar 20 2020, 12:30 AM · Restricted Project

Mar 19 2020

rjf updated the diff for D52896: MergeSimilarFunctions 1/n: a code size pass to merge functions with small differences.

Merges D52896 with trunk

Mar 19 2020, 11:57 PM · Restricted Project