hiraditya (Aditya Kumar)
User

Projects

User does not belong to any projects.

User Details

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

Recent Activity

Yesterday

hiraditya accepted D47143: [InstrSimplify,NewGVN] Add option to ignore additional instr info when simplifying..

Accepting because there are no alternate suggestions, and this patch fixes miscompiles preventing NewGVN to be used in some cases.

Tue, Aug 14, 4:24 PM
hiraditya added a comment to D22051: MergeSimilarFunctions: a code size pass to merge functions with small differences.

MergeSimilarFunctions demonstrates great improvement on Cisco software, so this is of great value to us. We have some improvements upon the base work to improve the compile time.

Tue, Aug 14, 9:59 AM
hiraditya abandoned D32614: [GVNHoist] Fix: PR32821, add check for anticipability in case of infinite loops.

Merged with GVNHoist long time back.

Tue, Aug 14, 9:41 AM
hiraditya added reviewers for D47143: [InstrSimplify,NewGVN] Add option to ignore additional instr info when simplifying.: sebpop, hiraditya.
Tue, Aug 14, 9:38 AM
hiraditya added a comment to D47143: [InstrSimplify,NewGVN] Add option to ignore additional instr info when simplifying..

LGTM with the minor nit.

Tue, Aug 14, 9:38 AM
hiraditya added a reviewer for D50593: ConstantMerge: merge common initial sequences: hiraditya.
Tue, Aug 14, 5:57 AM
hiraditya added a comment to D50593: ConstantMerge: merge common initial sequences.

Have you tested this patch with some benchmarks or an open source project? What is the impact on compilation time?

Tue, Aug 14, 5:57 AM
hiraditya added a comment to D45300: Update MemorySSA BasicBlockUtils..

The general idea appears to be good, do you have any testcases reflect the change?

Tue, Aug 14, 5:46 AM
hiraditya accepted D50674: [libc++] Add missing #include in C11 features tests.

Good catch!

Tue, Aug 14, 5:40 AM
hiraditya accepted D50687: [GraphDiff] Make InverseGraph a property of a GraphDiff..
Tue, Aug 14, 5:38 AM
hiraditya added inline comments to D50686: Updating MergeFunctions.rst.
Tue, Aug 14, 5:37 AM
hiraditya added a reviewer for D50686: Updating MergeFunctions.rst: hiraditya.
Tue, Aug 14, 5:36 AM
hiraditya accepted D50696: [NFC][LICM] Make hoist method void.
Tue, Aug 14, 5:33 AM
hiraditya added inline comments to D50698: [UnJ] Ensure unroll_and_jam metadata is removed once consumed..
Tue, Aug 14, 5:32 AM
hiraditya added a comment to D50699: [clang-format] fix PR38525 - Extraneous continuation indent spaces with BreakBeforeBinaryOperators set to All.

Test case:

Tue, Aug 14, 5:28 AM · Restricted Project
hiraditya added a comment to D37762: [InstCombine] Remove single use restriction from InstCombine's explicit sinking code..

Looks like machine sinking fails because it can't handle the cmovs reading eflags. And it only considers one instruction at a time, but to sink the cmov you have to sink the eflags producer and the cmov together.

Tue, Aug 14, 5:24 AM
hiraditya added a comment to D37762: [InstCombine] Remove single use restriction from InstCombine's explicit sinking code..

I think what matters in this case is the {post}dominance relation between the block of the DEF and the block(s) [potentially > 1] of the USEs.

Tue, Aug 14, 5:21 AM
hiraditya added inline comments to D49281: [Unroll/UnrollAndJam/Vectorizer/Distribute] Add followup loop attributes..
Tue, Aug 14, 5:13 AM
hiraditya added a comment to D47987: Provide only one declaration of __throw_runtime_error.

Any updates on this one? I like @mclow.lists idea of removing it from __locale.

Tue, Aug 14, 4:59 AM

Mon, Aug 13

hiraditya created D50658: Hot cold splitting pass.
Mon, Aug 13, 11:55 AM
hiraditya added inline comments to D50323: [GVNHoist] Prune out useless CHI insertions.
Mon, Aug 13, 11:41 AM

Wed, Jul 25

hiraditya reclaimed D22558: Helper functions to verify SESE, SEME.

Don't want to lose it, yet!

Wed, Jul 25, 11:29 AM
hiraditya removed reviewers for D22558: Helper functions to verify SESE, SEME: sanjoy, hfinkel.
Wed, Jul 25, 11:28 AM

Sat, Jul 21

hiraditya committed rL337643: Early exit with cheaper checks.
Early exit with cheaper checks
Sat, Jul 21, 7:19 AM
hiraditya closed D49617: Early exit with cheaper checks.
Sat, Jul 21, 7:18 AM

Fri, Jul 20

hiraditya added a comment to D49617: Early exit with cheaper checks.

This is probably fine, but does it matter? i.e. you have compile time numbers?

I dont have numbers, maybe you can help with that.

I guess my question is, what's the motivation for this change? You found this by inspection?

Fri, Jul 20, 3:26 PM
hiraditya updated the diff for D49617: Early exit with cheaper checks.

Adding BasicBlock::isEHPad back to preserve the semantics.

Fri, Jul 20, 3:26 PM
hiraditya added a comment to D49617: Early exit with cheaper checks.

This is probably fine, but does it matter? i.e. you have compile time numbers?

I dont have numbers, maybe you can help with that.

Fri, Jul 20, 3:14 PM
hiraditya created D49617: Early exit with cheaper checks.
Fri, Jul 20, 2:40 PM

May 31 2018

hiraditya added a reviewer for D22051: MergeSimilarFunctions: a code size pass to merge functions with small differences: sebpop.
May 31 2018, 12:53 PM
hiraditya added a comment to D46378: Undef the macros after their use.

I'll merge this patch as if there are no further feedbacks.

May 31 2018, 12:52 PM
hiraditya committed rL333659: make GlobalValueSummary::getOriginalName() a const function.
make GlobalValueSummary::getOriginalName() a const function
May 31 2018, 8:19 AM
hiraditya closed D46962: make GlobalValueSummary::getOriginalName() a const function.
May 31 2018, 8:19 AM
hiraditya committed rC333657: Add dump method for selectors.
Add dump method for selectors
May 31 2018, 7:51 AM
hiraditya committed rL333657: Add dump method for selectors.
Add dump method for selectors
May 31 2018, 7:51 AM
hiraditya closed D45935: Add dump method for selectors.
May 31 2018, 7:51 AM
hiraditya updated subscribers of D45935: Add dump method for selectors.
May 31 2018, 7:51 AM

May 17 2018

hiraditya added a reviewer for D22051: MergeSimilarFunctions: a code size pass to merge functions with small differences: hiraditya.
May 17 2018, 9:16 AM

May 16 2018

hiraditya created D46962: make GlobalValueSummary::getOriginalName() a const function.
May 16 2018, 10:22 AM

May 10 2018

hiraditya abandoned D30035: Add const to function parameters.

Merged with https://reviews.llvm.org/D30268

May 10 2018, 1:30 PM
hiraditya abandoned D45923: Fix debug info in absense of DIFinder.

Not required.

May 10 2018, 1:29 PM
hiraditya added a comment to D46378: Undef the macros after their use.

ping

May 10 2018, 1:28 PM

May 3 2018

hiraditya updated the diff for D46378: Undef the macros after their use.

return {}.

May 3 2018, 10:43 AM

May 2 2018

hiraditya created D46378: Undef the macros after their use.
May 2 2018, 11:21 PM

Apr 26 2018

hiraditya updated the diff for D45926: Fix DISubprogram while extracting instructions out of function.

Comments

Apr 26 2018, 11:00 AM
hiraditya added inline comments to D45926: Fix DISubprogram while extracting instructions out of function.
Apr 26 2018, 10:14 AM
hiraditya added a comment to D45923: Fix debug info in absense of DIFinder.

My testcase got fixed just with https://reviews.llvm.org/D45926. I'm wondering if this patch is still a good idea.

Apr 26 2018, 9:41 AM
hiraditya updated the diff for D45926: Fix DISubprogram while extracting instructions out of function.

Comments for enum

Apr 26 2018, 9:38 AM
hiraditya added a comment to D45924: Set calling convention for varargs .

This is not in trunk I guess, I borrowed this pass from: https://reviews.llvm.org/D22051

Apr 26 2018, 9:20 AM
hiraditya abandoned D45601: Warn on bool* to bool conversion.

It appears this warning may not be always useful because there will be false positives.

Apr 26 2018, 9:19 AM

Apr 23 2018

hiraditya updated the diff for D45926: Fix DISubprogram while extracting instructions out of function.
Apr 23 2018, 6:30 PM
hiraditya updated the diff for D45926: Fix DISubprogram while extracting instructions out of function.

Addressed comments

Apr 23 2018, 3:25 PM
hiraditya added inline comments to D45926: Fix DISubprogram while extracting instructions out of function.
Apr 23 2018, 3:24 PM

Apr 22 2018

hiraditya created D45935: Add dump method for selectors.
Apr 22 2018, 5:08 PM

Apr 21 2018

hiraditya created D45926: Fix DISubprogram while extracting instructions out of function.
Apr 21 2018, 7:24 AM
hiraditya created D45924: Set calling convention for varargs .
Apr 21 2018, 6:46 AM
hiraditya created D45923: Fix debug info in absense of DIFinder.
Apr 21 2018, 6:43 AM

Apr 19 2018

hiraditya added a comment to D45601: Warn on bool* to bool conversion.

The bug which motivated this warning is: https://github.com/jemalloc/jemalloc/commit/4df483f0fd76a64e116b1c4f316f8b941078114d#diff-7b26b977303fe92c093a2245b0eaf255

Apr 19 2018, 11:01 AM

Apr 17 2018

hiraditya updated the diff for D45601: Warn on bool* to bool conversion.

Warn on bool* to bool conversion during a call only.

Apr 17 2018, 7:46 AM

Apr 16 2018

hiraditya added a comment to D45601: Warn on bool* to bool conversion.

I'll probably make this warning for function arguments only (when bool* is passed to a function accepting bool). Many conditionals use bool* -> bool conversion as pointed out by @Quuxplusone and @aaron.ballman

Apr 16 2018, 5:51 PM

Apr 12 2018

hiraditya created D45601: Warn on bool* to bool conversion.
Apr 12 2018, 4:24 PM

Mar 9 2018

hiraditya added a comment to D44282: [PR16756] JumpThreading: explicitly update SSA rather than use SSAUpdater..

If you want to update using DJ-Graphs and merge sets, I have implemented them in the global-scheduler which I thought could be reused: https://reviews.llvm.org/D32140
Please let me know if you find this useful.

Mar 9 2018, 1:58 PM

Jan 3 2018

hiraditya committed rL321789: [GVNHoist] Fix: PR35222 gvn-hoist incorrectly erases load in case of a loop.
[GVNHoist] Fix: PR35222 gvn-hoist incorrectly erases load in case of a loop
Jan 3 2018, 11:48 PM
hiraditya closed D41453: [GVNHoist] Fix: PR35222 gvn-hoist incorrectly erases load in case of a loop.
Jan 3 2018, 11:48 PM
hiraditya added a comment to D41453: [GVNHoist] Fix: PR35222 gvn-hoist incorrectly erases load in case of a loop.

There are a bunch of places in GVNHoist which call dominates (as opposed to properlyDominates), and some of them seem dubious. Are you going to audit them?

Jan 3 2018, 10:42 PM

Dec 20 2017

hiraditya created D41453: [GVNHoist] Fix: PR35222 gvn-hoist incorrectly erases load in case of a loop.
Dec 20 2017, 8:43 AM

Dec 13 2017

hiraditya committed rL320607: [GVNHoist] Fix: PR35222 gvn-hoist incorrectly erases load.
[GVNHoist] Fix: PR35222 gvn-hoist incorrectly erases load
Dec 13 2017, 11:41 AM
This revision was not accepted when it landed; it landed in state Needs Review.
Dec 13 2017, 11:40 AM

Dec 5 2017

hiraditya updated the diff for D39781: [GVNHoist] Fix: PR35222 gvn-hoist incorrectly erases load.
Dec 5 2017, 5:58 AM

Nov 10 2017

hiraditya added inline comments to D39781: [GVNHoist] Fix: PR35222 gvn-hoist incorrectly erases load.
Nov 10 2017, 4:21 PM

Nov 9 2017

hiraditya added inline comments to D39781: [GVNHoist] Fix: PR35222 gvn-hoist incorrectly erases load.
Nov 9 2017, 10:30 AM
hiraditya updated the diff for D39781: [GVNHoist] Fix: PR35222 gvn-hoist incorrectly erases load.

Added a testcase for irreducible control flow.

Nov 9 2017, 10:28 AM

Nov 7 2017

hiraditya created D39781: [GVNHoist] Fix: PR35222 gvn-hoist incorrectly erases load.
Nov 7 2017, 10:29 PM

Oct 27 2017

hiraditya added inline comments to D39340: Modifying reassociate for improved CSE.
Oct 27 2017, 5:53 AM

Sep 12 2017

hiraditya committed rL313116: [GVNHoist] Factor out reachability to search for anticipable instructions….
[GVNHoist] Factor out reachability to search for anticipable instructions…
Sep 12 2017, 10:29 PM
hiraditya closed D35918: [GVNHoist] Factor out reachability to search for anticipable instructions quickly by committing rL313116: [GVNHoist] Factor out reachability to search for anticipable instructions….
Sep 12 2017, 10:29 PM

Sep 8 2017

hiraditya updated the diff for D35918: [GVNHoist] Factor out reachability to search for anticipable instructions quickly.

use depth_first

Sep 8 2017, 3:44 PM
hiraditya updated the diff for D35918: [GVNHoist] Factor out reachability to search for anticipable instructions quickly.

added auto to relevant places.

Sep 8 2017, 2:59 PM

Sep 7 2017

hiraditya added a comment to D36423: [libc++] Introsort based sorting function.

Ping!

Sep 7 2017, 9:27 AM

Sep 6 2017

hiraditya added inline comments to D35918: [GVNHoist] Factor out reachability to search for anticipable instructions quickly.
Sep 6 2017, 2:30 PM
hiraditya updated the diff for D35918: [GVNHoist] Factor out reachability to search for anticipable instructions quickly.

use any_of instead of iterating over the successors.

Sep 6 2017, 2:29 PM

Aug 23 2017

hiraditya closed D34224: [NFC] remove trailing WS.

Closed by commit: rL311283

Aug 23 2017, 2:46 PM
hiraditya updated the diff for D35918: [GVNHoist] Factor out reachability to search for anticipable instructions quickly.

Addressed @dberlin 's comments.

Aug 23 2017, 9:19 AM
hiraditya added a comment to D36113: [Loop Vectorize] Vectorize Loops with Backward Dependence.

Two high-level thoughts:

  1. Is this transformation always profitable even if we don't later vectorize? I worry that you're taking a stream of accesses that generally appear in order and making them appear out of order. That could have odd effects. Maybe this should all be a utility that the vectorizer uses more directly?

Agreed, we will evaluate if we can this pass as a utility for vectorizer. In the past we tried that but got stuck because we were unable to recompute loop-access-info once the instructions have been reordered. Maybe you can help us here.

Aug 23 2017, 9:18 AM
hiraditya added a comment to D36113: [Loop Vectorize] Vectorize Loops with Backward Dependence.

Two high-level thoughts:

  1. Is this transformation always profitable even if we don't later vectorize? I worry that you're taking a stream of accesses that generally appear in order and making them appear out of order. That could have odd effects. Maybe this should all be a utility that the vectorizer uses more directly?
  2. I don't think a goal of this should be to provide backup handling of things that LICM misses but MemorySSA can prove are loop invariant. We should improve LICM by making it use MemorySSA (see work on this in D35741 - pushing this along might help?). We could run LICM right before we vectorize too.
Aug 23 2017, 8:58 AM

Aug 21 2017

hiraditya updated the diff for D35918: [GVNHoist] Factor out reachability to search for anticipable instructions quickly.

Updated MemorySSA updates.
Outlined functions from codegen part.

Aug 21 2017, 3:31 PM

Aug 20 2017

hiraditya added a comment to D36423: [libc++] Introsort based sorting function.

Results with the patch.

Aug 20 2017, 1:19 PM
hiraditya committed rL311283: [NFC] remove trailing WS.
[NFC] remove trailing WS
Aug 20 2017, 3:41 AM
hiraditya committed rL311281: [Loop Vectorize] Added a separate metadata.
[Loop Vectorize] Added a separate metadata
Aug 20 2017, 3:34 AM
hiraditya closed D36220: [Loop Vectorize] Added a separate metadata by committing rL311281: [Loop Vectorize] Added a separate metadata.
Aug 20 2017, 3:34 AM

Aug 17 2017

hiraditya added a reviewer for D34566: [loop idiom Recognition] support memcpy for multiple consecutive loads and stores: hiraditya.
Aug 17 2017, 8:37 AM

Aug 15 2017

hiraditya added a reviewer for D36220: [Loop Vectorize] Added a separate metadata : hiraditya.
Aug 15 2017, 10:22 AM
hiraditya added inline comments to D36113: [Loop Vectorize] Vectorize Loops with Backward Dependence.
Aug 15 2017, 10:16 AM

Aug 11 2017

hiraditya added inline comments to D35918: [GVNHoist] Factor out reachability to search for anticipable instructions quickly.
Aug 11 2017, 12:06 PM
hiraditya updated the diff for D35918: [GVNHoist] Factor out reachability to search for anticipable instructions quickly.

Remove dead comments.

Aug 11 2017, 12:05 PM
hiraditya updated the diff for D35918: [GVNHoist] Factor out reachability to search for anticipable instructions quickly.

Added Comments

Aug 11 2017, 9:26 AM

Aug 10 2017

hiraditya updated the diff for D35918: [GVNHoist] Factor out reachability to search for anticipable instructions quickly.

Based on suggestions from @dberlin, I have updated the patch:

  1. Compute iterated post-dominance frontiers
  2. Iterate on post-dominator tree to insert CHIargs more efficiently
Aug 10 2017, 4:24 PM

Aug 7 2017

hiraditya added a comment to D36113: [Loop Vectorize] Vectorize Loops with Backward Dependence.

@hfinkel , I'd appreciate your feedback, and suggestions for improvement.
Thanks,

Aug 7 2017, 9:20 AM

Aug 3 2017

hiraditya added a comment to D35918: [GVNHoist] Factor out reachability to search for anticipable instructions quickly.

I tried a simple df walk like this, it crashes the compiler for the test cases llvm/test/Transforms/GVNHoist/infinite-loop-indirect.ll, and llvm/test/Transforms/GVNHoist/infinite-loop-direct.ll:

auto PrevBB = PDT->getNode(nullptr);
 for (auto it = df_begin(PrevBB); it != df_end(PrevBB);
      ++it) {
 }

These test cases are added in this patch.

Thanks,

I tried running loop like yours in a couple of my unittests (DominatorTreeTest.cpp) and it seems to work:

auto PrevBB = PDT->getNode(nullptr);
for (auto it = df_begin(PrevBB); it != df_end(PrevBB);
     ++it) {
  auto BB = it->getBlock();
  outs() << (BB ? BB->getName() : "virtual root") << "\n";
}

Could you prepare a reduced repro for the crash you saw?

Thanks,
Kuba

Aug 3 2017, 2:36 PM
hiraditya added a comment to D35918: [GVNHoist] Factor out reachability to search for anticipable instructions quickly.

Can you illustrate how to perform a DFS walk on a post-dom tree with your patch. Also, how would I get the (virtual) root node of post-dom tree.

Thanks,

You can get the virtual root by calling PDT.getNode(nullptr). Then you can use something like llvm/ADT/DepthFirstIterator.h or llvm/ADT/PostOrderIterator.h to run DFS on it. Implementing a custom DFS should also be easy.

Aug 3 2017, 2:15 PM