sanjoy (Sanjoy Das)
User

Projects

User does not belong to any projects.

User Details

User Since
Jun 6 2014, 4:30 PM (183 w, 4 d)

Recent Activity

Yesterday

sanjoy committed rL320512: Reapply "[X86] Flag BroadWell scheduler model as complete".
Reapply "[X86] Flag BroadWell scheduler model as complete"
Tue, Dec 12, 11:12 AM
sanjoy committed rL320508: Revert "[X86] Flag BroadWell scheduler model as complete".
Revert "[X86] Flag BroadWell scheduler model as complete"
Tue, Dec 12, 10:41 AM

Mon, Dec 11

sanjoy requested changes to D38862: Add must alias info to ModRefInfo..

Unless you have a specific reason not to, I think we should merge https://reviews.llvm.org/D41091 into this one -- that'll make the patch easier to review (usually these kinds of things go the other way -- splitting the patch makes it easier to review :) ).

Mon, Dec 11, 10:56 PM

Fri, Dec 8

sanjoy accepted D41026: [InstComineLoadStoreAlloca] Optimize stores to GEP off null base.

lgtm

Fri, Dec 8, 11:25 AM

Thu, Dec 7

sanjoy added a reviewer for D40945: [ScalarEvolution] Improve high cost heuristic in SCEVExpander.: mzolotukhin.
Thu, Dec 7, 11:19 PM
sanjoy updated subscribers of D40945: [ScalarEvolution] Improve high cost heuristic in SCEVExpander..

lgtm to me, but I want Michael to take a look at the test update, as mentioned inline.

Thu, Dec 7, 11:19 PM
sanjoy accepted D40946: [ScalarEvolution] Fix base condition in isNormalAddRecPHI..

lgtm

Thu, Dec 7, 11:14 PM
sanjoy accepted D40641: [SCEV] Fix wrong Equal predicate created in getAddRecForPhiWithCasts.

lgtm with stylistic nits.

Thu, Dec 7, 10:38 PM
sanjoy accepted D40953: [SCEV] Fix predicate usage in computeExitLimitFromICmp.

lgtm!

Thu, Dec 7, 10:34 PM
sanjoy accepted D40933: [ModRefInfo] Make enum ModRefInfo an enum class [NFC]..

Do you think it will be useful to add some migration instructions to the commit message for folks with out of tree changes to LLVM?

Thu, Dec 7, 2:07 PM

Wed, Dec 6

sanjoy added a comment to D40933: [ModRefInfo] Make enum ModRefInfo an enum class [NFC]..

This is just a find-replace right? I didn't look at the textual changes carefully assuming that but please let me know if there are pieces of this CL that are *not* find-replace and I'll review those more carefully.

Wed, Dec 6, 5:26 PM

Tue, Dec 5

sanjoy requested changes to D38862: Add must alias info to ModRefInfo..

Some minor nits inline, but I thought we were going with making bitwise MRI_Must be 0 (and MRI_NoModRef be 4) so that & works as expected?

Tue, Dec 5, 9:18 PM
sanjoy accepted D40597: [SCEV][NFC] Share value cache between SCEVs in GroupByComplexity.

lgtm

Tue, Dec 5, 8:44 PM
sanjoy accepted D40645: [SCEV][NFC] Check NoWrap flags before lexicographical comparison of SCEVs.

lgtm

Tue, Dec 5, 8:43 PM
sanjoy requested changes to D40802: [MemDep] Don't use cached results from a previous larger query.
Tue, Dec 5, 1:38 PM

Mon, Dec 4

sanjoy accepted D40749: Modify ModRefInfo values using static inline method abstractions [NFC]..

lgtm with some comments inline

Mon, Dec 4, 5:38 PM
sanjoy requested changes to D40749: Modify ModRefInfo values using static inline method abstractions [NFC]..

I have some minor comments inline.

Mon, Dec 4, 1:55 PM
sanjoy committed rL319678: [SCEV] A different fix for PR33494.
[SCEV] A different fix for PR33494
Mon, Dec 4, 11:22 AM
sanjoy committed rL319679: [SCEV] Use a "Discovered" set instead of a "Visited" set; NFC.
[SCEV] Use a "Discovered" set instead of a "Visited" set; NFC
Mon, Dec 4, 11:22 AM
sanjoy closed D39361: [SCEV] A different fix for PR33494 by committing rL319678: [SCEV] A different fix for PR33494.
Mon, Dec 4, 11:22 AM
sanjoy committed rL319677: [BypassSlowDivision] Improve our handling of divisions by constants.
[BypassSlowDivision] Improve our handling of divisions by constants
Mon, Dec 4, 11:22 AM
sanjoy accepted D40039: [CVP] Remove some {s|u}sub.with.overflow checks..

lgtm

Mon, Dec 4, 11:03 AM
sanjoy accepted D40036: [ConstantRange] Support subtraction in makeGuaranteedNoWrapRegion..

lgtm

Mon, Dec 4, 10:58 AM

Wed, Nov 29

sanjoy accepted D38374: [memcpyopt] Memcpy-memcpy dependence isn't detected across basic blocks.
Wed, Nov 29, 6:11 PM

Tue, Nov 28

sanjoy requested changes to D38374: [memcpyopt] Memcpy-memcpy dependence isn't detected across basic blocks.
Tue, Nov 28, 11:50 PM

Sun, Nov 26

sanjoy added inline comments to D40460: [SCEV] Adding a check on outgoing branches of a terminator instr for SCEVBackedgeConditionFolder, NFC..
Sun, Nov 26, 12:03 AM

Sat, Nov 25

sanjoy added inline comments to D40460: [SCEV] Adding a check on outgoing branches of a terminator instr for SCEVBackedgeConditionFolder, NFC..
Sat, Nov 25, 7:53 PM

Fri, Nov 24

sanjoy added inline comments to D40427: [ADT] Introduce Disjoint Set Union structure.
Fri, Nov 24, 1:39 PM
sanjoy accepted D40429: [SCEV][NFC] More efficient caching in CompareValueComplexity.
Fri, Nov 24, 1:32 PM
sanjoy accepted D40428: [SCEV][NFC] More efficient caching in CompareSCEVComplexity.
Fri, Nov 24, 1:30 PM
sanjoy added inline comments to D39361: [SCEV] A different fix for PR33494.
Fri, Nov 24, 1:16 PM

Thu, Nov 23

sanjoy added a comment to D38862: Add must alias info to ModRefInfo..

(We've discussed the meat of this patch offline, but I had some stray comments from earlier)

Thu, Nov 23, 12:37 PM
sanjoy added inline comments to D38494: [SCEV] Handling for ICmp occuring in the evolution chain..
Thu, Nov 23, 12:33 PM

Tue, Nov 21

sanjoy accepted D40246: IR printing improvement for loop passes.

lgtm

Tue, Nov 21, 8:52 PM
sanjoy accepted D40247: IR printing improvement for loop passes - handle -print-module-scope.
Tue, Nov 21, 8:51 PM
sanjoy requested changes to D38862: Add must alias info to ModRefInfo..
Tue, Nov 21, 11:33 AM

Mon, Nov 20

sanjoy accepted D40274: Add MemorySSA as loop dependency, disabled by default [NFC]..

lgtm too

Mon, Nov 20, 9:22 PM

Nov 13 2017

sanjoy accepted D34200: [PM/unswitch] Teach SimpleLoopUnswitch to do non-trivial unswitching, making it no longer even remotely simple..

I skimmed through the changes, and they lgtm. I didn't try to follow the logic closely since I assumed most of the actual mechanics stay the same (but please let me know if that's not true and there are parts of the change that I should review again).

Nov 13 2017, 10:00 AM
sanjoy added inline comments to D38494: [SCEV] Handling for ICmp occuring in the evolution chain..
Nov 13 2017, 9:30 AM

Nov 12 2017

sanjoy accepted D38494: [SCEV] Handling for ICmp occuring in the evolution chain..

Mostly minor stuff; please check in directly after addressing these.

Nov 12 2017, 12:49 PM

Nov 10 2017

sanjoy committed rL317911: [CVP] Remove some {s|u}add.with.overflow checks..
[CVP] Remove some {s|u}add.with.overflow checks.
Nov 10 2017, 11:15 AM
sanjoy closed D39483: [CVP] Remove some {s|u}add.with.overflow checks. by committing rL317911: [CVP] Remove some {s|u}add.with.overflow checks..
Nov 10 2017, 11:15 AM

Nov 9 2017

sanjoy accepted D39483: [CVP] Remove some {s|u}add.with.overflow checks..

LGTM

Nov 9 2017, 4:10 PM

Nov 8 2017

sanjoy committed rL317770: [SectionMemoryManager] Abstract out mmap, munmap, mprotect even more ; NFC.
[SectionMemoryManager] Abstract out mmap, munmap, mprotect even more ; NFC
Nov 8 2017, 10:31 PM
sanjoy closed D39300: [SectionMemoryManager] Abstract out mmap, munmap, mprotect even more ; NFC by committing rL317770: [SectionMemoryManager] Abstract out mmap, munmap, mprotect even more ; NFC.
Nov 8 2017, 10:31 PM
sanjoy requested changes to D39483: [CVP] Remove some {s|u}add.with.overflow checks..
Nov 8 2017, 10:16 PM
sanjoy added a comment to D39822: [NVPTX] Model (some) side effects of warp-synchronous data exchange intrinsics..

In the commit message, did you mean CSE (Common Subexpression Elimination) instead of CSI?

Nov 8 2017, 4:29 PM
sanjoy added inline comments to D38494: [SCEV] Handling for ICmp occuring in the evolution chain..
Nov 8 2017, 11:08 AM
sanjoy added reviewers for D39300: [SectionMemoryManager] Abstract out mmap, munmap, mprotect even more ; NFC: jlebar, asbirlea.
Nov 8 2017, 9:46 AM
sanjoy added a comment to D39483: [CVP] Remove some {s|u}add.with.overflow checks..

I've done the rename, although I'll note that I slightly prefer the old name since it makes it obvious that the function only applies to overflow intrinsics, not any intrinsic.

Nov 8 2017, 9:46 AM

Nov 7 2017

sanjoy requested changes to D39483: [CVP] Remove some {s|u}add.with.overflow checks..
Nov 7 2017, 6:40 PM

Nov 6 2017

sanjoy added inline comments to D39483: [CVP] Remove some {s|u}add.with.overflow checks..
Nov 6 2017, 5:17 PM
sanjoy added a comment to D39300: [SectionMemoryManager] Abstract out mmap, munmap, mprotect even more ; NFC.

ping!

Nov 6 2017, 9:09 AM

Nov 5 2017

sanjoy added inline comments to D38494: [SCEV] Handling for ICmp occuring in the evolution chain..
Nov 5 2017, 8:57 PM
sanjoy requested changes to D38494: [SCEV] Handling for ICmp occuring in the evolution chain..

Mostly minor stuff remains + the one correctness issue with a conditional latch branching to the header in both the true and false cases.

Nov 5 2017, 1:23 PM

Oct 31 2017

sanjoy added a reviewer for D39483: [CVP] Remove some {s|u}add.with.overflow checks.: regehr.
Oct 31 2017, 5:59 PM

Oct 30 2017

sanjoy requested changes to D38494: [SCEV] Handling for ICmp occuring in the evolution chain..
Oct 30 2017, 2:18 PM
sanjoy added inline comments to D39408: Let InstCombiner::foldAllocaCmp check whether icmp is in a loop.
Oct 30 2017, 2:08 PM
sanjoy added a comment to D38494: [SCEV] Handling for ICmp occuring in the evolution chain..

:( that I commented didn't reviewed. this is why I wanted to make other reversion.

Oct 30 2017, 11:03 AM
sanjoy requested changes to D38494: [SCEV] Handling for ICmp occuring in the evolution chain..

This is looking close to ready, just a few minor things inline.

Oct 30 2017, 12:03 AM

Oct 29 2017

sanjoy requested changes to D39408: Let InstCombiner::foldAllocaCmp check whether icmp is in a loop.
Oct 29 2017, 11:53 PM

Oct 28 2017

sanjoy added a comment to D39300: [SectionMemoryManager] Abstract out mmap, munmap, mprotect even more ; NFC.

Out of interest, what’s the use case for this? I’d have expected sys::Memory to be good enough for block-based allocation (though there’s the known issue with PaX on BSD that I need to fix), and using a non block-based underlying allocator seems like it’d risk unnecessary fragmentation.

Oct 28 2017, 11:28 AM

Oct 27 2017

sanjoy added a comment to D39286: [SCEV][NFC] Introduce isSignedDivisorOf function in SCEV.

I'm ok with this patch to not be merged until its application is implemented.

Oct 27 2017, 9:13 AM

Oct 26 2017

sanjoy created D39361: [SCEV] A different fix for PR33494.
Oct 26 2017, 11:02 PM
sanjoy requested changes to D37660: [ScalarEvolution] Handling Conditional Instruction in SCEV chain..
Oct 26 2017, 2:32 PM
sanjoy requested changes to D38494: [SCEV] Handling for ICmp occuring in the evolution chain..
Oct 26 2017, 2:20 PM
sanjoy added a comment to D39286: [SCEV][NFC] Introduce isSignedDivisorOf function in SCEV.

Hi Max,

Oct 26 2017, 2:02 PM
sanjoy accepted D38419: Create instruction classes for identifying any atomicity of memory intrinsic. (NFC).

I'd suggest waiting 1-2 days to give time for someone to chime in (after reading the llvm-dev ping you sent out) and then checking this in.

Oct 26 2017, 11:16 AM

Oct 25 2017

sanjoy added a comment to D38419: Create instruction classes for identifying any atomicity of memory intrinsic. (NFC).

Just to be clear, at the isa<>, dyn_cast<> level, this is the hierarchy you're shooting for right:

Oct 25 2017, 3:29 PM
sanjoy committed rL316615: [SCEV] Fix an assertion failure in the max backedge taken count.
[SCEV] Fix an assertion failure in the max backedge taken count
Oct 25 2017, 2:41 PM
sanjoy committed rL316614: Add a comment to clarify a future change.
Add a comment to clarify a future change
Oct 25 2017, 2:41 PM
sanjoy added a comment to D38419: Create instruction classes for identifying any atomicity of memory intrinsic. (NFC).

Hi Daniel,

Oct 25 2017, 2:23 PM
sanjoy requested changes to D39286: [SCEV][NFC] Introduce isSignedDivisorOf function in SCEV.
Oct 25 2017, 10:49 AM
sanjoy created D39300: [SectionMemoryManager] Abstract out mmap, munmap, mprotect even more ; NFC.
Oct 25 2017, 10:47 AM

Oct 24 2017

sanjoy requested changes to D39231: [SCEV][NFC] Assert that we do not expand something unsafe.
Oct 24 2017, 9:44 AM
sanjoy accepted D39228: [SCEV] Enhance SCEVFindUnsafe for division.
Oct 24 2017, 9:39 AM
sanjoy requested changes to D39230: [IndVarSimplify] Do not expand unsafe expressions in IndVarSimplify.
Oct 24 2017, 9:38 AM

Oct 21 2017

sanjoy accepted D34335: Fix invalid ptrtoint in InstCombine.

LGTM

Oct 21 2017, 10:44 PM

Oct 20 2017

sanjoy requested changes to D38494: [SCEV] Handling for ICmp occuring in the evolution chain..
Oct 20 2017, 10:34 AM

Oct 18 2017

sanjoy committed rL316129: Revert "[ScalarEvolution] Handling for ICmp occuring in the evolution chain.".
Revert "[ScalarEvolution] Handling for ICmp occuring in the evolution chain."
Oct 18 2017, 3:01 PM

Oct 17 2017

sanjoy added a comment to D38494: [SCEV] Handling for ICmp occuring in the evolution chain..

Please upload with full context: https://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface

Oct 17 2017, 10:06 AM

Oct 16 2017

sanjoy committed rL315962: Revert "[SCEV] Maintain and use a loop->loop invalidation dependency".
Revert "[SCEV] Maintain and use a loop->loop invalidation dependency"
Oct 16 2017, 6:04 PM

Oct 15 2017

sanjoy added a comment to D38928: [LoopInfo][Refactor] Make SetLoopAlreadyUnrolled a member function of the Loop Pass, NFC..

LGTM

I think the Loop class has grown quite a bit, and we should pull out some of the utility functions into a separate LoopUtils namespace, but this patch does not need to be blocked on that.

Just out of curiosity, what are the principle to tell whether a function should be a member function of the Loop class or a utilities?

Oct 15 2017, 12:00 AM

Oct 14 2017

sanjoy accepted D38928: [LoopInfo][Refactor] Make SetLoopAlreadyUnrolled a member function of the Loop Pass, NFC..

I think the Loop class has grown quite a bit, and we should pull out some of the utility functions into a separate LoopUtils namespace, but this patch does not need to be blocked on that.

Oct 14 2017, 8:27 PM
sanjoy accepted D38924: Fix `FaultMaps` crash when the out streamer is reused.
Oct 14 2017, 5:15 PM
sanjoy edited reviewers for D38924: Fix `FaultMaps` crash when the out streamer is reused, added: skatkov; removed: sanjoy.
Oct 14 2017, 5:15 PM
sanjoy edited reviewers for D38925: Fix implicit null check with negative offset, added: skatkov; removed: sanjoy.
Oct 14 2017, 5:12 PM
sanjoy added inline comments to D38924: Fix `FaultMaps` crash when the out streamer is reused.
Oct 14 2017, 3:54 PM

Oct 13 2017

sanjoy committed rL315713: [SCEV] Maintain and use a loop->loop invalidation dependency.
[SCEV] Maintain and use a loop->loop invalidation dependency
Oct 13 2017, 10:14 AM
sanjoy closed D38435: [SCEV] Maintain and use a loop->loop invalidation dependency by committing rL315713: [SCEV] Maintain and use a loop->loop invalidation dependency.
Oct 13 2017, 10:14 AM
sanjoy added inline comments to D38825: [SCEV] Teach SCEV to find maxBECount when loop endbound is variant.
Oct 13 2017, 9:59 AM

Oct 12 2017

sanjoy updated the diff for D38435: [SCEV] Maintain and use a loop->loop invalidation dependency.
  • address review
Oct 12 2017, 11:14 PM
sanjoy committed rL315672: [SCEV] Maintain loop use lists, and use them in forgetLoop.
[SCEV] Maintain loop use lists, and use them in forgetLoop
Oct 12 2017, 10:51 PM
sanjoy closed D38434: [SCEV] Maintain loop use lists, and use them in forgetLoop by committing rL315672: [SCEV] Maintain loop use lists, and use them in forgetLoop.
Oct 12 2017, 10:51 PM
sanjoy requested changes to D37660: [ScalarEvolution] Handling Conditional Instruction in SCEV chain..
Oct 12 2017, 10:41 PM
sanjoy planned changes to D38433: Introduce a specialized data structure to be used in a subsequent change.

(Haven't addressed the code comments yet since the design isn't settled)

Have you considered building a ChunkedVector instead of a ChunkedList? Specifically, there is a great trick where you use a single index with the low bits being an index into the chunk and the high bits being an index into a vector of pointers. It has many of the benefits you list and is a bit simpler I think. It also supports essentially the entire vector API if desired. Both bi-directional and even random access are reasonably efficient. Good locality, etc.

With a vector-of-buffers implementation, I'm a bit worried about the space overhead on the smaller cases. For instance, this is the histogram of how this data structure is populated from a clang-bootstrap (also in https://reviews.llvm.org/D38434):

     Count: 731310
       Min: 1
      Mean: 8.555150
50th %tile: 4
95th %tile: 25
99th %tile: 53
       Max: 433

If I used a vector-of-buffers, I will either have to recompute the capacity and end (of the last buffer) on every insert (which will require an additional deref and some computation) or have to keep two words in the data structure over the three that smallvector keeps anyway. This adds a lot of relative overhead on the median case (4 elements). In fact, the current situation of two extra words also qualifies as a "lot" of relative overhead IMO, and I want to think of an SSO to improve the situation.

Hold on, the objects here are just pointers? Then none of this really makes sense to me...

Chunked data structures seem to make the most sense if moving the objects is really expensive and/or the objects are really large.

For pointers, why not just a vector?

Oct 12 2017, 10:29 PM
sanjoy added inline comments to D38856: [IPSCCP] Remove calls without side effects.
Oct 12 2017, 1:00 PM

Oct 11 2017

sanjoy added a comment to D37660: [ScalarEvolution] Handling Conditional Instruction in SCEV chain..

I went through your example, and I think I know what you need to do -- while you cannot assume that a condition feeding into the loop latch is true generally, you can assume it is true *in the context* of a add recurrence increment. That is, in createAddRecFromPHI, under // Create an add with everything but the specified operand., if an operand to the addition is a loop variant value that is the loop latch condition then you can assume said loop variant value to be the constant 1.

Oct 11 2017, 5:26 PM
sanjoy added a comment to D37660: [ScalarEvolution] Handling Conditional Instruction in SCEV chain..

I don't understand what you mean D:
does it meaning do I need to upload raw source code?

Oct 11 2017, 5:02 PM
sanjoy accepted D38814: [SCEV] Properly handle the case of a non-constant start with a zero accum in ScalarEvolution::createAddRecFromPHIWithCastsImpl.

LGTM

Oct 11 2017, 11:45 AM