Page MenuHomePhabricator

hiraditya (Aditya Kumar)
User

Projects

User does not belong to any projects.

User Details

User Since
Mar 5 2014, 4:23 PM (284 w, 6 d)

Recent Activity

Sun, Aug 4

hiraditya added a comment to D65376: Randomly outline code for cold regions.

Do you actually need truly random, non-deterministic transform?

Sun, Aug 4, 9:56 PM · Restricted Project

Fri, Aug 2

hiraditya added a comment to D65376: Randomly outline code for cold regions.

As a future direction for code reordering in llvm, a pass that operates on the machine instruction level may have more promise. At that level, there's a reduced/eliminated code size penalty and landingpads can be moved easily. There's less pass ordering flexibility, but experiments seem to show that late splitting works better anyway.

Fri, Aug 2, 7:04 AM · Restricted Project

Thu, Aug 1

hiraditya added a comment to D65376: Randomly outline code for cold regions.
In D65376#1607799, @vsk wrote:

I think that this is probably too risky. I've seen that splitting out the wrong block can introduce major performance regressions (up to and including stack overflow).

As a future direction for code reordering in llvm, a pass that operates on the machine instruction level may have more promise. At that level, there's a reduced/eliminated code size penalty and landingpads can be moved easily. There's less pass ordering flexibility, but experiments seem to show that late splitting works better anyway.

Thu, Aug 1, 9:53 AM · Restricted Project

Tue, Jul 30

hiraditya updated the diff for D65376: Randomly outline code for cold regions.

Updated to have a fixed sequence of 'random' numbers.

Tue, Jul 30, 10:11 PM · Restricted Project
hiraditya added a comment to D65376: Randomly outline code for cold regions.

I'm not sure it is a good idea to have non-deterministic optimizations.

I agree with @lebedev.ri, I don't think non-deterministic optimizations are good as it would make triaging and debugging really difficult. I see @pcc has a follow on suggestion to make this deterministic. At the least that would be needed. But is it useful to do this optimization randomly in practice?

Tue, Jul 30, 9:37 AM · Restricted Project
hiraditya added a comment to D65376: Randomly outline code for cold regions.

We can certainly make this deterministic with a sequence of lists. Thanks for the suggestion, I'll update this soon.

Tue, Jul 30, 9:37 AM · Restricted Project

Sun, Jul 28

hiraditya added reviewers for D65376: Randomly outline code for cold regions: sebpop, bcahoon, ronl.
Sun, Jul 28, 6:36 AM · Restricted Project
hiraditya created D65376: Randomly outline code for cold regions.
Sun, Jul 28, 6:33 AM · Restricted Project

Thu, Jul 25

hiraditya added a comment to D64380: Add 'require_designated_init' and 'required' attribute to clang.

Thanks for addressing the feedback @emmettneyman , LGTM, deferring to other reviewers for final call.

Thu, Jul 25, 5:40 PM · Restricted Project

May 25 2019

hiraditya added a comment to D32140: Global code motion of congruent computations.

Working on porting this to latest llvm, will push the latest changes soon.

May 25 2019, 11:12 PM · Restricted Project

Feb 6 2019

hiraditya added a comment to D57123: [MergeSets] Add infrastructure to build merge sets based on Das and Ramakrishna's paper..

Interesting, I have a merge-sets implementation in my patch: https://reviews.llvm.org/D32140
It will be interesting to compare the two.

Feb 6 2019, 11:12 AM
hiraditya accepted D57265: [PM/CC1] Add -f[no-]split-cold-code CC1 options to toggle splitting.

LGTM

Feb 6 2019, 11:08 AM · Restricted Project
hiraditya created D57830: Add functionality to trace a function within lldb.
Feb 6 2019, 11:05 AM · Restricted Project

Dec 7 2018

hiraditya accepted D53887: [HotColdSplitting] Outline more than once per function.

LGTM, if there are outstanding comments from other reviewers we can address them in subsequent patches.

Dec 7 2018, 12:04 PM

Nov 19 2018

hiraditya added a reviewer for D54713: [SCEV] Guard movement of insertion point for loop-invariants: sebpop.
Nov 19 2018, 1:45 PM

Nov 13 2018

hiraditya added a comment to D35035: [InstCombine] Prevent memcpy generation for small data size.
In D35035#1284164, @jfb wrote:

Not sure what is the general consensus wrt this patch, but i guess it now consistently uses bytes.

Agree - the code change looks like what I expected now.

So:

  1. Is @jfb objecting to this as an intermediate improvement?

My concern is here: https://reviews.llvm.org/D35035#inline-464768
This uses an unrelated constant to drive optimization decisions. Create a new per-target constant.

Nov 13 2018, 8:34 AM · Restricted Project
hiraditya added inline comments to D54189: [HotColdSplitting] Ensure PHIs have unique incoming values.
Nov 13 2018, 5:42 AM
hiraditya accepted D54244: [HotColdSplitting] Refine definition of unlikelyExecuted.

Thanks for removing the exception handlers. I never wanted to hard code them in the first place.

Nov 13 2018, 5:39 AM
hiraditya accepted D54329: Mark @llvm.trap cold.
Nov 13 2018, 5:32 AM

Nov 6 2018

hiraditya added inline comments to D54189: [HotColdSplitting] Ensure PHIs have unique incoming values.
Nov 6 2018, 5:03 PM
hiraditya added inline comments to D53887: [HotColdSplitting] Outline more than once per function.
Nov 6 2018, 9:36 AM

Nov 3 2018

hiraditya added a comment to D53887: [HotColdSplitting] Outline more than once per function.

Can we push this patch? This is not enabled by default so we can continue development in subsequent patches.

Nov 3 2018, 12:31 PM

Oct 31 2018

hiraditya updated the diff for D52966: [Merge SImilar Function ThinLTO 3/n] Add hash code to function summary.

Comment

Oct 31 2018, 11:18 PM
hiraditya updated the diff for D52966: [Merge SImilar Function ThinLTO 3/n] Add hash code to function summary.

Remove ModuleSummaryIndex

Oct 31 2018, 11:13 PM
hiraditya added inline comments to D53887: [HotColdSplitting] Outline more than once per function.
Oct 31 2018, 9:18 AM
hiraditya added inline comments to D53887: [HotColdSplitting] Outline more than once per function.
Oct 31 2018, 9:10 AM
hiraditya added a comment to D53588: [hot-cold-split] split more than a cold region per function.

For reference: https://reviews.llvm.org/D53887

Oct 31 2018, 8:49 AM
hiraditya added inline comments to D53887: [HotColdSplitting] Outline more than once per function.
Oct 31 2018, 8:47 AM

Oct 30 2018

hiraditya added a comment to D53588: [hot-cold-split] split more than a cold region per function.

For splitting more than one cold region, maintaining a DT maybe expensive but we don't have to do that. All we need is to 'color/mark' the blocks which we want to outline. In the next iteration the colored blocks need not be considered. It may be slightly non-trivial in a general case where coloring SEME and reasoning about DT/PDT of blocks which are non-colored. What we can do is in the subsequent iterations we can take a sub-graph which do not intersect anywhere except at entry or exit. This way DT/PDT will still be preserved in the non-intersecting regions. I think jump-threading also works(should work) on similar lines.

Oct 30 2018, 9:52 AM

Oct 21 2018

hiraditya added a reviewer for D41474: Fix a crash in lazy loading of Metadata in ThinLTO: sebpop.
Oct 21 2018, 12:57 PM
hiraditya updated the diff for D52367: Remove address taken, add optnone.

Adding test

Oct 21 2018, 12:48 PM
hiraditya updated the diff for D35035: [InstCombine] Prevent memcpy generation for small data size.

Fix testcases and address comments

Oct 21 2018, 12:36 PM · Restricted Project
hiraditya added a comment to D41474: Fix a crash in lazy loading of Metadata in ThinLTO.

Can we land this patch

Oct 21 2018, 11:17 AM
hiraditya committed rL344869: Schedule Hot Cold Splitting pass after most optimization passes.
Schedule Hot Cold Splitting pass after most optimization passes
Oct 21 2018, 11:14 AM
hiraditya closed D53437: Schedule Hot Cold Splitting pass after most optimization passes.
Oct 21 2018, 11:14 AM

Oct 19 2018

hiraditya updated the diff for D53437: Schedule Hot Cold Splitting pass after most optimization passes.
Oct 19 2018, 9:57 PM
hiraditya updated the summary of D53437: Schedule Hot Cold Splitting pass after most optimization passes.
Oct 19 2018, 8:07 AM
hiraditya created D53437: Schedule Hot Cold Splitting pass after most optimization passes.
Oct 19 2018, 8:06 AM

Oct 15 2018

hiraditya added a comment to D35035: [InstCombine] Prevent memcpy generation for small data size.

Any updates?

Oct 15 2018, 11:20 PM · Restricted Project
hiraditya added inline comments to D52966: [Merge SImilar Function ThinLTO 3/n] Add hash code to function summary.
Oct 15 2018, 10:47 PM
hiraditya added inline comments to D53254: [Merge SImilar Function ThinLTO 5/n] Set up similar function to be imported.
Oct 15 2018, 9:11 PM
hiraditya added a comment to D52904: [hot-cold-split] fix static analysis of cold regions.

With this patch I now see a 3% speedup on sqlite vs. no hot-cold-split pass.

Awesome! Thanks for improving this!

I think the 3% uplift in performance is within the noise level.
At least with this patch I do not see the 10% regression in performance with hot/cold partitioning
which most likely was due to doubling the cost of function calls when the whole function was outlined.

Oct 15 2018, 3:15 PM
hiraditya added a comment to D52904: [hot-cold-split] fix static analysis of cold regions.

With this patch I now see a 3% speedup on sqlite vs. no hot-cold-split pass.

Awesome! Thanks for improving this!

Oct 15 2018, 2:26 PM

Oct 14 2018

hiraditya updated the diff for D52896: MergeSimilarFunctions 1/n: a code size pass to merge functions with small differences.
Oct 14 2018, 11:33 AM
hiraditya updated the diff for D52898: [Porting MergeSimilarFunctions 2/n] Changes to DataLayout.
Oct 14 2018, 11:32 AM
hiraditya updated the diff for D52966: [Merge SImilar Function ThinLTO 3/n] Add hash code to function summary.
Oct 14 2018, 11:29 AM
hiraditya updated the diff for D53253: [Merge SImilar Function ThinLTO 4/n] Make merge function decisions before the thin-lto stage.
Oct 14 2018, 11:25 AM
hiraditya updated the diff for D53254: [Merge SImilar Function ThinLTO 5/n] Set up similar function to be imported.
Oct 14 2018, 11:24 AM
hiraditya updated the diff for D53254: [Merge SImilar Function ThinLTO 5/n] Set up similar function to be imported.
Oct 14 2018, 10:27 AM
hiraditya updated the diff for D53254: [Merge SImilar Function ThinLTO 5/n] Set up similar function to be imported.

llvm_debug

Oct 14 2018, 12:32 AM
hiraditya updated the diff for D52896: MergeSimilarFunctions 1/n: a code size pass to merge functions with small differences.

Compiler error with CloneType

Oct 14 2018, 12:24 AM
hiraditya updated the diff for D53253: [Merge SImilar Function ThinLTO 4/n] Make merge function decisions before the thin-lto stage.

compiler error

Oct 14 2018, 12:18 AM

Oct 13 2018

hiraditya retitled D53254: [Merge SImilar Function ThinLTO 5/n] Set up similar function to be imported from [Merge SImilar Function ThinLTO] Set up similar function to be imported to [Merge SImilar Function ThinLTO 5/n] Set up similar function to be imported.
Oct 13 2018, 11:26 PM
hiraditya retitled D53253: [Merge SImilar Function ThinLTO 4/n] Make merge function decisions before the thin-lto stage from [Merge SImilar Function ThinLTO] Make merge function decisions before the thin-lto stage to [Merge SImilar Function ThinLTO 4/n] Make merge function decisions before the thin-lto stage.
Oct 13 2018, 11:25 PM
hiraditya retitled D52966: [Merge SImilar Function ThinLTO 3/n] Add hash code to function summary from [Merge SImilar Function ThinLTO] Add hash code to function summary to [Merge SImilar Function ThinLTO 3/n] Add hash code to function summary.
Oct 13 2018, 11:25 PM
hiraditya retitled D52896: MergeSimilarFunctions 1/n: a code size pass to merge functions with small differences from MergeSimilarFunctions: a code size pass to merge functions with small differences to MergeSimilarFunctions 1/n: a code size pass to merge functions with small differences.
Oct 13 2018, 11:25 PM
hiraditya retitled D52898: [Porting MergeSimilarFunctions 2/n] Changes to DataLayout from [Porting MergeSimilarFunctions] Changes to DataLayout to [Porting MergeSimilarFunctions 2/n] Changes to DataLayout.
Oct 13 2018, 11:25 PM
hiraditya created D53254: [Merge SImilar Function ThinLTO 5/n] Set up similar function to be imported.
Oct 13 2018, 11:24 PM
hiraditya retitled D53253: [Merge SImilar Function ThinLTO 4/n] Make merge function decisions before the thin-lto stage from Make merge function decisions before the thin-lto stage to [Merge SImilar Function ThinLTO] Make merge function decisions before the thin-lto stage.
Oct 13 2018, 11:21 PM
hiraditya updated the summary of D53253: [Merge SImilar Function ThinLTO 4/n] Make merge function decisions before the thin-lto stage.
Oct 13 2018, 11:05 PM
hiraditya updated the summary of D52966: [Merge SImilar Function ThinLTO 3/n] Add hash code to function summary.
Oct 13 2018, 11:05 PM
hiraditya created D53253: [Merge SImilar Function ThinLTO 4/n] Make merge function decisions before the thin-lto stage.
Oct 13 2018, 11:04 PM
hiraditya retitled D52966: [Merge SImilar Function ThinLTO 3/n] Add hash code to function summary from Add hash code to function summary to [Merge SImilar Function ThinLTO] Add hash code to function summary.
Oct 13 2018, 10:46 PM

Oct 8 2018

hiraditya added a reviewer for D32564: AArch64: compress jump tables to minimum size needed to reach destinations: evandro.
Oct 8 2018, 9:39 AM

Oct 6 2018

hiraditya updated the diff for D52966: [Merge SImilar Function ThinLTO 3/n] Add hash code to function summary.
Oct 6 2018, 9:23 PM
hiraditya created D52966: [Merge SImilar Function ThinLTO 3/n] Add hash code to function summary.
Oct 6 2018, 8:25 PM

Oct 5 2018

Herald updated subscribers of D51205: Move SuffixTree type to a common location.
Oct 5 2018, 10:06 AM

Oct 4 2018

hiraditya created D52898: [Porting MergeSimilarFunctions 2/n] Changes to DataLayout.
Oct 4 2018, 11:34 AM
hiraditya updated the diff for D52896: MergeSimilarFunctions 1/n: a code size pass to merge functions with small differences.

DEBUG -> LLVM_DEBUG

Oct 4 2018, 11:27 AM
hiraditya updated subscribers of D52896: MergeSimilarFunctions 1/n: a code size pass to merge functions with small differences.
Oct 4 2018, 11:23 AM
hiraditya created D52896: MergeSimilarFunctions 1/n: a code size pass to merge functions with small differences.
Oct 4 2018, 11:22 AM

Oct 3 2018

hiraditya added a comment to D35035: [InstCombine] Prevent memcpy generation for small data size.

Perhaps the impact is negligible, non-existent, and we worry about this for nothing. As also suggested earlier, I will try to get some numbers on the table for ARM and AArch64 if we strip out the lowering here, if that is helpful for this discussion, but probably need a day or two to get them.

If you could provide some numbers, I can go ahead and remove the inlining of memcpy altogether provided the reviewers agree with it, or we can merge this patch which is trying to improve on previously hardcoded numbers.

Yes, I support removing the expansion entirely, but I don't think we can commit that change without doing some advance perf testing.

Oct 3 2018, 8:52 AM · Restricted Project

Oct 2 2018

hiraditya committed rL343663: Improve static analysis of cold basic blocks.
Improve static analysis of cold basic blocks
Oct 2 2018, 11:22 PM
hiraditya closed D52704: Improve static analysis of cold basic blocks.
Oct 2 2018, 11:22 PM
hiraditya committed rL343662: Add support for new pass manager.
Add support for new pass manager
Oct 2 2018, 10:57 PM
hiraditya closed D52708: Add support for new pass manager.
Oct 2 2018, 10:57 PM
hiraditya added a comment to D35035: [InstCombine] Prevent memcpy generation for small data size.

The ultimate goal would be to simply always canonicalize to memcpy and not expand it ever in instcombine as mentioned in D52081.

Looks like we all agree on this now.

But we don't do that (yet) because we're afraid of missed optimizations that can't be replicated in the backend.

Perhaps the impact is negligible, non-existent, and we worry about this for nothing. As also suggested earlier, I will try to get some numbers on the table for ARM and AArch64 if we strip out the lowering here, if that is helpful for this discussion, but probably need a day or two to get them.

Oct 2 2018, 11:09 AM · Restricted Project
hiraditya added inline comments to D35035: [InstCombine] Prevent memcpy generation for small data size.
Oct 2 2018, 10:14 AM · Restricted Project
hiraditya added inline comments to D35035: [InstCombine] Prevent memcpy generation for small data size.
Oct 2 2018, 7:17 AM · Restricted Project
hiraditya updated the diff for D52708: Add support for new pass manager.

Modified the testcases to use both pass managers
Use single commandline flag for both pass managers.

Oct 2 2018, 7:02 AM

Oct 1 2018

hiraditya updated the diff for D35035: [InstCombine] Prevent memcpy generation for small data size.

Updated testcases with utils/update_test_checks.py
use isPowerOf2_64

Oct 1 2018, 12:00 AM · Restricted Project

Sep 30 2018

hiraditya added a comment to D50658: Hot cold splitting pass.

Added support for new PM: https://reviews.llvm.org/D52708

Sep 30 2018, 11:36 PM
hiraditya created D52708: Add support for new pass manager.
Sep 30 2018, 11:35 PM
hiraditya added a comment to D52367: Remove address taken, add optnone.

Will add one soon!

Sep 30 2018, 12:31 PM
hiraditya added reviewers for D35035: [InstCombine] Prevent memcpy generation for small data size: sebpop, SirishP.
Sep 30 2018, 12:29 PM · Restricted Project
hiraditya updated the diff for D35035: [InstCombine] Prevent memcpy generation for small data size.

Moved the check of Size before checking the LargestInt.

Sep 30 2018, 12:28 PM · Restricted Project
hiraditya updated the diff for D35035: [InstCombine] Prevent memcpy generation for small data size.

Fixed all testcases, and removed memcpy inlining when target datalayout is not present.

Sep 30 2018, 12:22 PM · Restricted Project
hiraditya updated the diff for D35035: [InstCombine] Prevent memcpy generation for small data size.

Fix some unit-tests, a few more remaining.

Sep 30 2018, 10:16 AM · Restricted Project
hiraditya commandeered D35035: [InstCombine] Prevent memcpy generation for small data size.

To fix tests and comments from reviewers.

Sep 30 2018, 10:15 AM · Restricted Project
hiraditya added a comment to D50593: ConstantMerge: merge common initial sequences.

My main worry is that this is only useful with LTO because the linker should do this work otherwise, so at a minimum I need to change the code accordingly.

Sep 30 2018, 10:15 AM
hiraditya created D52704: Improve static analysis of cold basic blocks.
Sep 30 2018, 10:08 AM

Sep 25 2018

hiraditya added inline comments to D52210: [LLVM-C] Add C APIs to access DebugLoc info.
Sep 25 2018, 2:12 PM

Sep 24 2018

hiraditya added inline comments to D52210: [LLVM-C] Add C APIs to access DebugLoc info.
Sep 24 2018, 8:18 AM
hiraditya added inline comments to D52210: [LLVM-C] Add C APIs to access DebugLoc info.
Sep 24 2018, 8:06 AM

Sep 21 2018

hiraditya created D52367: Remove address taken, add optnone.
Sep 21 2018, 10:24 AM

Sep 18 2018

hiraditya added a comment to D35035: [InstCombine] Prevent memcpy generation for small data size.

I think this patch is good to go, I can push this if someone accepts. I'll fix the comments.

I still don't understand the (LargestInt == 0) hack. I think everyone agrees that the existing code is wrong, so why preserve the existing behavior if we don't have a valid datalayout? Ie, there's no risk for real targets because they always have a non-zero getLargestLegalIntTypeSizeInBits()?

Agreed, I'll remove that part then. That was only to make other testcases happy by preserving existing behavior. Thanks

Presumably those testcases should simply be updated to contain the expected datalayout?

Sep 18 2018, 9:46 PM · Restricted Project
hiraditya added a comment to D35035: [InstCombine] Prevent memcpy generation for small data size.

I think this patch is good to go, I can push this if someone accepts. I'll fix the comments.

I still don't understand the (LargestInt == 0) hack. I think everyone agrees that the existing code is wrong, so why preserve the existing behavior if we don't have a valid datalayout? Ie, there's no risk for real targets because they always have a non-zero getLargestLegalIntTypeSizeInBits()?

Sep 18 2018, 9:36 AM · Restricted Project

Sep 17 2018

hiraditya added a comment to D35035: [InstCombine] Prevent memcpy generation for small data size.

I think this patch is good to go, I can push this if someone accepts. I'll fix the comments.

Sep 17 2018, 2:26 PM · Restricted Project

Sep 16 2018

hiraditya added inline comments to D35035: [InstCombine] Prevent memcpy generation for small data size.
Sep 16 2018, 11:54 PM · Restricted Project

Sep 9 2018

hiraditya added a comment to D50593: ConstantMerge: merge common initial sequences.

If you have the code-size numbers, please provide that then I can accept the patch.

Sep 9 2018, 6:49 PM