sanjoy (Sanjoy Das)
User

Projects

User does not belong to any projects.

User Details

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

Recent Activity

Today

sanjoy requested changes to D33433: [SCEV] Select between two equal values.

I'm not convinced SCEV is the best place to handle this -- by the time IR hits SCEV select A, B, B should already have been simplified to B. We do not handle "simple" patterns like br (xor C, true), label A, label B for the same reason.

Tue, May 23, 9:18 AM

Yesterday

sanjoy added inline comments to D32740: [PM/Unswitch] Fix a bug in the domtree update logic for the new unswitch pass..
Mon, May 22, 11:34 PM

Sun, May 21

sanjoy committed rL303531: [SCEV] Clarify behavior around max backedge taken count.
[SCEV] Clarify behavior around max backedge taken count
Sun, May 21, 11:46 PM
sanjoy added inline comments to D33316: [SCEV] Do not fold dominated SCEVUnknown into AddRecExpr start.
Sun, May 21, 10:50 PM
sanjoy added a comment to D30527: Replacing float with new class Fraction for LSR alternative way of resolving complex solution.

Drive by comment: how about putting the FixedPoint64 in ADT and adding one or two unit tests?

Sun, May 21, 10:02 PM
sanjoy added a comment to D32737: [Constants][SVE] Represent the runtime length of a scalable vector.

I've only lightly read the spec, but it looks like the vector length can be controlled by writing to the ZCR_ELn registers (so, e.g. user code could make a syscall to change the vector length)?

As I explained to Hal on his comment, that is correct but doesn't have the effect you're expecting.

Vectors don't have length, they have the "idea that they may have length", and it's up to the CPU to control that.

Just to be clear, the example you propose has no effect on the notion of length:

// SVE length defined at boot time to be 4
...
add z0.s, p0/m, z0.s, z1.s // z0+=z1 only where the predicate p0 is valid, which here is "up-to" 4 vector lengths
...
svc ... // Try to change vector length to 8, assuming this works
...
add z0.s, p0/m, z0.s, z1.s // z0+=z1 only where the predicate p0 is valid, which here is "up-to" 8 vector lengths
Sun, May 21, 12:40 PM

Sat, May 20

sanjoy committed rL303498: Revert "[SCEV] Clarify behavior around max backedge taken count".
Revert "[SCEV] Clarify behavior around max backedge taken count"
Sat, May 20, 10:02 PM
sanjoy committed rL303497: [SCEV] Clarify behavior around max backedge taken count.
[SCEV] Clarify behavior around max backedge taken count
Sat, May 20, 6:48 PM
sanjoy requested changes to D33129: [SCEVExpander] Try harder to avoid introducing inttoptr.

Thank you for doing this!

Sat, May 20, 6:22 PM
sanjoy added a comment to D32737: [Constants][SVE] Represent the runtime length of a scalable vector.

I've only lightly read the spec, but it looks like the vector length can be controlled by writing to the ZCR_ELn registers (so, e.g. user code could make a syscall to change the vector length)? If that's accurate, I think a constant vscale is not sufficient.

Sat, May 20, 5:44 PM
sanjoy added a comment to D33125: Introduce isoneof<T0, T1, ...> as an extension of isa<T>.

Another high-level comment: I don't like the name isoneof. To me, that parses to the relationship being tested is rather than isa which loses an important distinction. I'm not really sure what would be the best name though.

Sat, May 20, 4:57 PM
sanjoy added a comment to D32737: [Constants][SVE] Represent the runtime length of a scalable vector.

What are the semantics of select when the two vectors have different width? Does store do a memory allocation?

Sat, May 20, 4:22 PM

Fri, May 19

sanjoy requested changes to D33316: [SCEV] Do not fold dominated SCEVUnknown into AddRecExpr start.
Fri, May 19, 5:04 PM
sanjoy accepted D33257: [JumpThreading] Replace uses of Condition safely.

lgtm with nits

Fri, May 19, 5:03 PM
sanjoy requested changes to D32740: [PM/Unswitch] Fix a bug in the domtree update logic for the new unswitch pass..

Getting this out of my review queue (I'm still waiting on the "I don't see why non-determinism in the worklist order matters here." bit).

Fri, May 19, 4:19 PM
sanjoy added inline comments to D33316: [SCEV] Do not fold dominated SCEVUnknown into AddRecExpr start.
Fri, May 19, 12:20 PM

Thu, May 18

sanjoy requested changes to D33316: [SCEV] Do not fold dominated SCEVUnknown into AddRecExpr start.

Comments inline.

Thu, May 18, 10:59 AM
sanjoy added a comment to D33257: [JumpThreading] Replace uses of Condition safely.

Mostly minor stuff.

Thu, May 18, 10:49 AM

Wed, May 17

sanjoy added inline comments to D33300: [ImplicitNullChecks] Uphold an invariant in areMemoryOpsAliased.
Wed, May 17, 8:05 PM
sanjoy added inline comments to D33300: [ImplicitNullChecks] Uphold an invariant in areMemoryOpsAliased.
Wed, May 17, 3:35 PM
sanjoy added inline comments to D33300: [ImplicitNullChecks] Uphold an invariant in areMemoryOpsAliased.
Wed, May 17, 3:23 PM
sanjoy created D33300: [ImplicitNullChecks] Uphold an invariant in areMemoryOpsAliased.
Wed, May 17, 3:17 PM

Tue, May 16

sanjoy added a comment to D32203: [SROA] Add support for non-integral pointers.

ping!

Tue, May 16, 5:47 PM
sanjoy added inline comments to D33129: [SCEVExpander] Try harder to avoid introducing inttoptr.
Tue, May 16, 4:24 PM
sanjoy requested changes to D33257: [JumpThreading] Replace uses of Condition safely.
Tue, May 16, 2:58 PM
sanjoy added inline comments to D33129: [SCEVExpander] Try harder to avoid introducing inttoptr.
Tue, May 16, 1:33 PM
sanjoy accepted D33228: [SCEV] Always sort AddRecExprs from different loops by dominance.

lgtm!

Tue, May 16, 10:42 AM
sanjoy accepted D33231: [SCEV][NFC] Replace redundant dyn_cast with cast in getAddExpr.

Btw, this would have been okay to land without pre-commit review.

Tue, May 16, 8:55 AM

Mon, May 15

sanjoy added a comment to D33121: [SCEV] Fix sorting order for AddRecExprs.

I have two more comments:

Mon, May 15, 10:24 PM
sanjoy accepted D33121: [SCEV] Fix sorting order for AddRecExprs.

lgtm with one comment.

Mon, May 15, 6:05 PM
sanjoy added a comment to D31924: SROA: Allow eliminating addrspacecasted allocas.

There was some discussion about non-integral address spaces at EuroLLVM. The current restriction is too great, as not allowing ptrtoint and inttoptr makes it impossible to support C-like languages. We discussed refining the definition to be that optimisers should not introduce inttoptr or ptrtoint, but that they are allowed to be inserted by the front end in places where they are valid in the context of the source language.

Mon, May 15, 9:45 AM

Sun, May 14

sanjoy committed rL303032: Move some code into ScalarEvolution.cpp; NFC.
Move some code into ScalarEvolution.cpp; NFC
Sun, May 14, 9:35 PM
sanjoy added a comment to D32712: [ConstantRange] Reduce the number of allocations in ConstantRange::makeGuaranteedNoWrapRegion.

Hi Craig,

Sun, May 14, 3:05 PM
sanjoy requested changes to D30703: [DSE] Merge stores when the later store only writes to memory locations the early store also wrote to..
Sun, May 14, 2:38 PM
sanjoy added inline comments to D30703: [DSE] Merge stores when the later store only writes to memory locations the early store also wrote to..
Sun, May 14, 2:38 PM
sanjoy added inline comments to D32614: [GVNHoist] Fix: PR32821, add check for anticipability in case of infinite loops.
Sun, May 14, 2:07 PM

Sat, May 13

sanjoy updated subscribers of D18738: Add new !unconditionally_dereferenceable load instruction metadata.

@hfinkel Oh, my bad--I now remember that this came up long ago...

Sat, May 13, 6:44 PM

Fri, May 12

sanjoy added inline comments to D32699: [PM/Unswitch] Teach the new simple loop unswitch to handle loop invariant PHI inputs and to rewrite PHI nodes during the actual unswitching..
Fri, May 12, 1:42 PM
sanjoy added inline comments to D32740: [PM/Unswitch] Fix a bug in the domtree update logic for the new unswitch pass..
Fri, May 12, 11:49 AM
sanjoy added a comment to D33121: [SCEV] Fix sorting order for AddRecExprs.

Hi Max,

Fri, May 12, 11:41 AM
sanjoy added a comment to D33125: Introduce isoneof<T0, T1, ...> as an extension of isa<T>.

Overall, I think this is a really good abstraction, but given the scope of the change I'll wait for other stakeholders to chime in.

Fri, May 12, 9:32 AM

Thu, May 11

sanjoy added a comment to D33088: [LiveVariables] Switch Kill/Defs sets to be `DenseSet`.

How big does the set get? Did you try using SmallDenseSet instead?

Thu, May 11, 5:10 PM
sanjoy added a comment to D18738: Add new !unconditionally_dereferenceable load instruction metadata.

@sanjoy Since D20116 is in, is there any reason to avoid having a !speculatable on load instructions? It can be emulated anyway by defining a class of @load.x functions marked speculatable and their return value dereferenceable, so there is no loss of soundness.

Thu, May 11, 10:56 AM

Mon, May 8

sanjoy committed rL302482: Add basic test case for -instnamer.
Add basic test case for -instnamer
Mon, May 8, 4:32 PM
sanjoy committed rL302480: [InstNamer] Don't check type of arguments (they're never void).
[InstNamer] Don't check type of arguments (they're never void)
Mon, May 8, 4:32 PM
sanjoy committed rL302481: [InstNamer] Use range-for.
[InstNamer] Use range-for
Mon, May 8, 4:32 PM
sanjoy committed rL302479: Delete trailing whitespace.
Delete trailing whitespace
Mon, May 8, 4:31 PM
sanjoy committed rL302456: Add a blurb to the release notes about the WeakVH -> WeakTrackingVH transition.
Add a blurb to the release notes about the WeakVH -> WeakTrackingVH transition
Mon, May 8, 12:28 PM
sanjoy added a comment to D32006: Mark invariant.group.barrier as inaccessiblememonly.

Is it possible to add "writeonly"? I am not sure if it will help in any way, but the tests seems to be working it.

Yes, I think this makes sense. The model is that there's some side table holding the object type of all memory, and this barrier represents places where we might be updating that table to assign a different type. Right?

Mon, May 8, 8:28 AM

Sun, May 7

sanjoy added a comment to D32850: [ArgPromotion] Fix a truncated variable.

If I understand what happened, this is scary -- if clang-tidy introduces bugs like this perhaps we should think twice before checking in large mechanical changes like 273808?

Sun, May 7, 1:54 PM
sanjoy added a comment to D32762: [Atomic] Remove IsStore/IsLoad in the interface, and pass the instruction instead. NFC..

Random drive by comment.

Sun, May 7, 1:22 PM
sanjoy updated subscribers of D32563: Add LiveRangeShrink pass to shrink live range within BB..

The reordering code here is reminding me of the reordering code in ImplicitNullChecks. Is there an opportunity to share code here?

Sun, May 7, 12:56 PM

Sat, May 6

sanjoy committed rL302368: Remove unnecessary const_cast.
Remove unnecessary const_cast
Sat, May 6, 10:43 PM
sanjoy committed rL302367: Use array_pod_sort instead of std::sort.
Use array_pod_sort instead of std::sort
Sat, May 6, 10:42 PM
sanjoy requested changes to D32740: [PM/Unswitch] Fix a bug in the domtree update logic for the new unswitch pass..
Sat, May 6, 7:09 PM
sanjoy accepted D32699: [PM/Unswitch] Teach the new simple loop unswitch to handle loop invariant PHI inputs and to rewrite PHI nodes during the actual unswitching..

I have some minor comments, but they're of the form "if *I* wrote this, this is what I'd do", and don't necessarily need to be addressed.

Sat, May 6, 3:39 PM
sanjoy accepted D32943: [SCEV] Use move semantics in ScalarEvolution::setRange.

lgtm!

Sat, May 6, 11:01 AM

Wed, May 3

sanjoy added a comment to D32663: [SCEV] createAddRecFromPHI: Optimize for the most common case..

Thanks for taking a look, I've updated the patch.

The change in 2014-08-29-CompactUnwind.ll is caused by the fact that SCEV started to produce a simpler expression for %iv.i, which allowed LSR to optimize the test harder.

Wed, May 3, 3:53 PM
sanjoy accepted D32663: [SCEV] createAddRecFromPHI: Optimize for the most common case..

lgtm, but the test case change looks fishy. This change is NFC right?

Wed, May 3, 3:49 PM
sanjoy committed rL302063: Fix typos in comment.
Fix typos in comment
Wed, May 3, 11:42 AM

Tue, May 2

sanjoy committed rL301997: Add Falcon to Users.html.
Add Falcon to Users.html
Tue, May 2, 10:04 PM
sanjoy requested changes to D32663: [SCEV] createAddRecFromPHI: Optimize for the most common case..
Tue, May 2, 7:11 PM
sanjoy accepted D32655: Replace hardcoded intrinsic list with speculatable attribute..
Tue, May 2, 7:04 PM
sanjoy added a comment to D32655: Replace hardcoded intrinsic list with speculatable attribute..

The overarching idea looks fine to me, but I did not look too closely.

Tue, May 2, 7:04 PM
sanjoy accepted D32494: [Loop Deletion] Delete loops that are never executed.

lgtm

Tue, May 2, 9:50 AM

Mon, May 1

sanjoy updated the diff for D32203: [SROA] Add support for non-integral pointers.
  • address review
Mon, May 1, 4:07 PM
sanjoy requested changes to D32494: [Loop Deletion] Delete loops that are never executed.

This looks pretty close to done.

Mon, May 1, 4:01 PM
sanjoy committed rL301817: Use a 2 bit pointer in ValueHandleBase::PrevPair; NFC.
Use a 2 bit pointer in ValueHandleBase::PrevPair; NFC
Mon, May 1, 10:49 AM
sanjoy added a comment to D30446: [IndVars] Do not branch on poison.

My suggestion was this: LFTR is not necessary this early in the pipeline if it's only purpose is converting a 'cmp slt' to 'cmp eq'. As long as SCEV can compute the trip count, the loop test shouldn't matter. If we really need to convert the loop test, it could be done during LSR and we could drop the 'nw' flags at that point.

We still want to remove sext/zext by widening, remove quadratic IVs, etc.

Mon, May 1, 10:24 AM
sanjoy committed rL301815: Adapt to LLVM's rename of WeakVH to WeakTrackingVH; NFC.
Adapt to LLVM's rename of WeakVH to WeakTrackingVH; NFC
Mon, May 1, 10:21 AM
sanjoy committed rL301814: Use WeakVH instead of WeakTrackingVH in AliasSetTracker's UnkownInsts.
Use WeakVH instead of WeakTrackingVH in AliasSetTracker's UnkownInsts
Mon, May 1, 10:21 AM
sanjoy committed rL301812: Rename WeakVH to WeakTrackingVH; NFC.
Rename WeakVH to WeakTrackingVH; NFC
Mon, May 1, 10:21 AM
sanjoy committed rL301813: Add a new WeakVH value handle; NFC.
Add a new WeakVH value handle; NFC
Mon, May 1, 10:21 AM
sanjoy committed rL301809: Emulate TrackingVH using WeakVH.
Emulate TrackingVH using WeakVH
Mon, May 1, 9:42 AM
sanjoy closed D32634: Emulate TrackingVH using WeakVH by committing rL301809: Emulate TrackingVH using WeakVH.
Mon, May 1, 9:42 AM
sanjoy updated the diff for D32634: Emulate TrackingVH using WeakVH.

Address review.

Mon, May 1, 12:37 AM

Sun, Apr 30

sanjoy committed rL301789: Remove unneeded struct; NFC.
Remove unneeded struct; NFC
Sun, Apr 30, 11:25 PM
sanjoy closed D32691: Remove unneeded struct; NFC by committing rL301789: Remove unneeded struct; NFC.
Sun, Apr 30, 11:25 PM
sanjoy created D32691: Remove unneeded struct; NFC.
Sun, Apr 30, 10:46 PM
sanjoy added a comment to D30446: [IndVars] Do not branch on poison.

The other option would be to keep LFTR aggressive (i.e. have it drop no-wrap flags if needed), but to do that only if the backedge condition is quadratic.

Sun, Apr 30, 4:12 PM
sanjoy added a comment to D30446: [IndVars] Do not branch on poison.

Hi Andy,

Sun, Apr 30, 2:59 PM
sanjoy committed rL301776: Rename isKnownNotFullPoison to programUndefinedIfPoison; NFC.
Rename isKnownNotFullPoison to programUndefinedIfPoison; NFC
Sun, Apr 30, 12:54 PM
sanjoy closed D30444: Rename isKnownNotFullPoison to programUndefinedIfPoison; NFC by committing rL301776: Rename isKnownNotFullPoison to programUndefinedIfPoison; NFC.
Sun, Apr 30, 12:54 PM
sanjoy added a comment to D32634: Emulate TrackingVH using WeakVH.

FYI unless advised otherwise, I plan to land

Sun, Apr 30, 12:36 PM

Fri, Apr 28

sanjoy added a comment to D32623: [GVN] Fix a crash on encountering non-integral pointers.

The behavioral change looks fine to me, but I'll have to defer to @dberlin on whether this is the right place to do make the change.

Fri, Apr 28, 5:13 PM
sanjoy added a comment to D32203: [SROA] Add support for non-integral pointers.

ping

Fri, Apr 28, 4:05 PM
sanjoy added inline comments to D29320: [XRay] A tool for Comparing xray function call graphs.
Fri, Apr 28, 1:43 PM
sanjoy added a comment to D20116: Add speculatable function attribute.

Okay, unfortunately, this is only useful to me if we allow it on function declarations

Fri, Apr 28, 12:55 PM
sanjoy added a comment to D20116: Add speculatable function attribute.

Why only for intrinsics? I thought we had concluded that we'd only allow it for declarations and not on call sites (which may technically mean on call sited but only matching the declaration). I think it is important that we can apply it to regular functions.

Fri, Apr 28, 12:25 PM
sanjoy added a comment to D32654: Fix AliasSetTracker bug.

Yes, we need a VH that does not track RAUW but nulls itself out on deletion. I had a fix that I had to revert and I'm currently working on figuring out a way to reland it.

Fri, Apr 28, 12:22 PM
sanjoy added a comment to D32654: Fix AliasSetTracker bug.

Hi Piotr,

Fri, Apr 28, 12:18 PM
sanjoy added a comment to D32582: [InstCombine] Add range metadata to cttz/ctlz/ctpop intrinsic calls based on known bits.

Fwiw, I'm okay with the overall direction.

Fri, Apr 28, 10:20 AM

Thu, Apr 27

sanjoy created D32634: Emulate TrackingVH using WeakVH.
Thu, Apr 27, 11:47 PM
sanjoy committed rL301616: Remove unnecessary semicolon.
Remove unnecessary semicolon
Thu, Apr 27, 10:02 PM
sanjoy committed rL301615: [StackMaps] Increase the size of the "location size" field.
[StackMaps] Increase the size of the "location size" field
Thu, Apr 27, 10:02 PM
sanjoy closed D32629: [StackMaps] Increase the size of the "location size" field by committing rL301615: [StackMaps] Increase the size of the "location size" field.
Thu, Apr 27, 10:01 PM
sanjoy created D32629: [StackMaps] Increase the size of the "location size" field.
Thu, Apr 27, 5:54 PM
sanjoy added inline comments to D32476: [EarlyCSE] Remove guards with conditions known to be true.
Thu, Apr 27, 5:51 PM
sanjoy added inline comments to D32494: [Loop Deletion] Delete loops that are never executed.
Thu, Apr 27, 3:04 PM
sanjoy committed rL301591: Specify something that's true in practice.
Specify something that's true in practice
Thu, Apr 27, 2:08 PM