Page MenuHomePhabricator

madhur13490 (Madhur Amilkanthwar)
User

Projects

User does not belong to any projects.

User Details

User Since
Oct 1 2014, 1:26 AM (306 w, 2 d)

madhur13490@gmail.com

Recent Activity

Yesterday

madhur13490 awarded D85838: New TableGen Programmer's Reference document a Like token.
Thu, Aug 13, 7:36 PM · Restricted Project
madhur13490 added inline comments to D85838: New TableGen Programmer's Reference document.
Thu, Aug 13, 7:18 PM · Restricted Project

Tue, Aug 11

madhur13490 added a comment to D83034: [GlobalISel] Don't skip adding predicate matcher.

@arsenm , Can you please take over? I think @dsanders is on vacation.

Tue, Aug 11, 9:26 AM · Restricted Project

Thu, Aug 6

madhur13490 accepted D84644: AMDGPU/GlobalISel: Handle llvm.amdgcn.ds.{fadd|fmin|fmax}.
Thu, Aug 6, 7:45 AM · Restricted Project

Wed, Aug 5

madhur13490 added inline comments to D84644: AMDGPU/GlobalISel: Handle llvm.amdgcn.ds.{fadd|fmin|fmax}.
Wed, Aug 5, 10:20 PM · Restricted Project
madhur13490 added a comment to D84644: AMDGPU/GlobalISel: Handle llvm.amdgcn.ds.{fadd|fmin|fmax}.

reviewing.

Wed, Aug 5, 10:38 AM · Restricted Project

Mon, Jul 27

madhur13490 added inline comments to D83034: [GlobalISel] Don't skip adding predicate matcher.
Mon, Jul 27, 8:56 AM · Restricted Project

Sun, Jul 26

madhur13490 updated the diff for D83034: [GlobalISel] Don't skip adding predicate matcher.

rebase + address comments

Sun, Jul 26, 9:47 AM · Restricted Project

Fri, Jul 24

madhur13490 added a comment to D84391: [AMDGPU] Fix incorrect arch assert while setting up FlatScratchInit.

Can we just add a predicate for whatever necessitates the SETREG for gfx10+? No idea on a good name, but if it were flatScratchIsHwreg() and it implied flatScratchIsPointer() this becomes:

if (ST.flatScratchIsHwreg()) {
  // pointer add then S_SETREG
} else if (ST.flatScratchIsPointer()) (
  // pointer add
} else {
  // size and offset dance
}
llvm_unreachable();

I agree that the existing assert here doesn't really mean anything, not sure why I wrote it.

Rather, the llvm_unreachable isn't needed if we consider the offset/add case as the "default", but maybe we should predicate it too? It would be nice if we could do this all in a way that was statically known to cover all the targets we have.

Could we combine the various predicate functions into one which returns an enumeration instead? Similar to Madhur's proposal, but without the direct reference to GFX#? I.e.

switch (ST.getFlatScratchSetupKind()) {
AMDGPU::PointerInHwreg:
  // ...
  break;
AMDGPU::PointerInSGPR:
  // ...
  break;
AMDGPU::SizeAndOffsetInSGPR:
  // ...
  break;
}

Then when we add a new variant the compiler points us to everywhere that cares.

Fri, Jul 24, 11:20 AM · Restricted Project
madhur13490 committed rG4a577c3a22c4: [AMDGPU] Fix incorrect arch assert while setting up FlatScratchInit (authored by madhur13490).
[AMDGPU] Fix incorrect arch assert while setting up FlatScratchInit
Fri, Jul 24, 11:19 AM
madhur13490 closed D84391: [AMDGPU] Fix incorrect arch assert while setting up FlatScratchInit.
Fri, Jul 24, 11:19 AM · Restricted Project
madhur13490 updated the diff for D84391: [AMDGPU] Fix incorrect arch assert while setting up FlatScratchInit.

rebase

Fri, Jul 24, 11:18 AM · Restricted Project

Thu, Jul 23

madhur13490 added a reviewer for D84391: [AMDGPU] Fix incorrect arch assert while setting up FlatScratchInit: scott.linder.
Thu, Jul 23, 8:55 AM · Restricted Project
madhur13490 added a comment to D84391: [AMDGPU] Fix incorrect arch assert while setting up FlatScratchInit.

I am not sure what does that mean. Do you agree with my way of refactoring or you're suggesting something else? With my approach there won't be any checks as I said we can get rid of flatScratchIsPointer() too.

I mean exactly the opposite. We should not check the generation anywhere. The hardware does not make changes in a nice, disciplined, sequenced way. Everything should be based on specific feature checks. I.e. there should only be flatScratchIsPointer checks, and nothing checking getGeneration

Thu, Jul 23, 8:40 AM · Restricted Project
madhur13490 added a comment to D84391: [AMDGPU] Fix incorrect arch assert while setting up FlatScratchInit.

Needs test. Also not sure why we would have an assert for this here in the first place

In fact I like the assert. It guarantees that we're not building something insane. Moreover, should we refactor this code to something more readble? :

switch(llvm::AMDGPUSubTarget) {
case GFX:8 {}
case GFX:9: {}
...
}

Only caveat is the usage of function flatScratchIsPointer(). We can get rid of its usage in its current form but in future we may want to add some code to it to take contextual decisions.

I would like to purge all checks of the generation. The relevant bit is flatScratchIsPointer. The generation is redundant and potentially misleading.

Thu, Jul 23, 7:59 AM · Restricted Project
madhur13490 added a comment to D84391: [AMDGPU] Fix incorrect arch assert while setting up FlatScratchInit.

Needs test. Also not sure why we would have an assert for this here in the first place

Thu, Jul 23, 7:07 AM · Restricted Project
Herald added a project to D84391: [AMDGPU] Fix incorrect arch assert while setting up FlatScratchInit: Restricted Project.
Thu, Jul 23, 2:53 AM · Restricted Project
madhur13490 accepted D84367: AMDGPU: Fix failures from overflowing uint8_t number of operands.

LGTM

Thu, Jul 23, 1:21 AM · Restricted Project

Tue, Jul 21

madhur13490 added inline comments to D83034: [GlobalISel] Don't skip adding predicate matcher.
Tue, Jul 21, 7:12 AM · Restricted Project

Mon, Jul 20

madhur13490 added inline comments to D83988: AMDGPU/GlobalISel: Start trying to handle AGPR bank.
Mon, Jul 20, 8:09 AM · Restricted Project
madhur13490 added inline comments to D83988: AMDGPU/GlobalISel: Start trying to handle AGPR bank.
Mon, Jul 20, 1:23 AM · Restricted Project

Thu, Jul 16

madhur13490 added inline comments to D83034: [GlobalISel] Don't skip adding predicate matcher.
Thu, Jul 16, 1:49 AM · Restricted Project

Jul 15 2020

madhur13490 added inline comments to D83710: TableGen/GlobalISel: Allow output instructions with multiple defs.
Jul 15 2020, 12:14 PM · Restricted Project
madhur13490 added inline comments to D83710: TableGen/GlobalISel: Allow output instructions with multiple defs.
Jul 15 2020, 12:26 AM · Restricted Project

Jul 13 2020

madhur13490 added a comment to D83034: [GlobalISel] Don't skip adding predicate matcher.

I would expect the existing tablegen tests to break from this and need updating?

Jul 13 2020, 9:25 AM · Restricted Project
madhur13490 updated the diff for D83034: [GlobalISel] Don't skip adding predicate matcher.

rebase + add test

Jul 13 2020, 9:15 AM · Restricted Project
madhur13490 added a comment to D83034: [GlobalISel] Don't skip adding predicate matcher.

Could you add a test case or point us at a example of an existing test that goes wrong? The description in the commit message is unlikely to be the full story as we already cover loads with non-null MemoryVT's. My best guess is you are attempting to use builtin predicates and custom predicates together. I don't see a reason why that shouldn't be allowed but it's not something that was intended as the goal was aiming to fully remove the custom C++ from the tablegen headers so that tablegen could do some transformations on sextload/zextload and similar to fix DAGISel vs GlobalISel modelling mismatches.

I think the problem is broader than just combining custom predicates and builtin. The emitter here implicitly assumes all of these builtin PatFrag predicates are used exactly as the hierarchy used to define the default/generic load/store patterns. However, the PatFrags are much more free form and you can define a patfrag that combines multiple of these predicates in the same "layer" of the load/store hierarchy. The AMDGPU patterns redefine the entire set of load/store patterns, and in some cases it makes sense to combine all the predicates at once. I had to somewhat artificially add new layers of PatFrags to only apply a single predicate at a time. This also isn't consistently applied (for example, it does work to combine the AddressSpaces predicate and alignment)

Jul 13 2020, 9:13 AM · Restricted Project

Jul 6 2020

madhur13490 updated subscribers of D83034: [GlobalISel] Don't skip adding predicate matcher.

Ping!

Jul 6 2020, 6:50 AM · Restricted Project

Jul 3 2020

madhur13490 added inline comments to D83100: [PPC][GlobalISel] Add initial GlobalIsel infrastructure.
Jul 3 2020, 10:12 AM · Restricted Project
madhur13490 added inline comments to D82713: Improve stack object printing..
Jul 3 2020, 1:35 AM · Restricted Project

Jul 2 2020

madhur13490 updated the diff for D83034: [GlobalISel] Don't skip adding predicate matcher.

Fix test failures

Jul 2 2020, 5:52 AM · Restricted Project
madhur13490 reclaimed D83034: [GlobalISel] Don't skip adding predicate matcher.
Jul 2 2020, 5:52 AM · Restricted Project
madhur13490 updated the summary of D83034: [GlobalISel] Don't skip adding predicate matcher.
Jul 2 2020, 5:52 AM · Restricted Project
madhur13490 abandoned D83034: [GlobalISel] Don't skip adding predicate matcher.
Jul 2 2020, 4:47 AM · Restricted Project
madhur13490 retitled D83034: [GlobalISel] Don't skip adding predicate matcher from [GlobalISel] Don't skip adding predicate macther to [GlobalISel] Don't skip adding predicate matcher.
Jul 2 2020, 4:15 AM · Restricted Project
madhur13490 retitled D83034: [GlobalISel] Don't skip adding predicate matcher from [GlobalISel] Don't skip adding predicate code to [GlobalISel] Don't skip adding predicate macther.
Jul 2 2020, 4:15 AM · Restricted Project
madhur13490 created D83034: [GlobalISel] Don't skip adding predicate matcher.
Jul 2 2020, 4:15 AM · Restricted Project
madhur13490 added inline comments to D82713: Improve stack object printing..
Jul 2 2020, 1:01 AM · Restricted Project

Jul 1 2020

madhur13490 updated the diff for D82713: Improve stack object printing..

rebase + address comments

Jul 1 2020, 5:22 AM · Restricted Project

Jun 28 2020

madhur13490 updated subscribers of D82713: Improve stack object printing..

@jlpeyton Any idea why the tests you added may be failing? I don't think it has anything related to my changes.

Jun 28 2020, 10:16 AM · Restricted Project
madhur13490 retitled D82713: Improve stack object printing. from NFC. Improve stack object printing. to Improve stack object printing..
Jun 28 2020, 9:43 AM · Restricted Project
madhur13490 updated the diff for D82713: Improve stack object printing..

fix tests

Jun 28 2020, 9:12 AM · Restricted Project
madhur13490 created D82713: Improve stack object printing..
Jun 28 2020, 5:29 AM · Restricted Project
madhur13490 committed rGc73966c2f792: Improve stack object printing. NFC. (authored by madhur13490).
Improve stack object printing. NFC.
Jun 28 2020, 4:57 AM
madhur13490 committed rG299dee91b347: Revert accidentally landed patch citing o build errors (authored by madhur13490).
Revert accidentally landed patch citing o build errors
Jun 28 2020, 4:57 AM
madhur13490 added a reverting change for rGc73966c2f792: Improve stack object printing. NFC.: rG299dee91b347: Revert accidentally landed patch citing o build errors.
Jun 28 2020, 4:57 AM
madhur13490 closed D82712: Improve stack object printing. NFC..
Jun 28 2020, 4:57 AM · Restricted Project
madhur13490 updated the diff for D82712: Improve stack object printing. NFC..

rebase

Jun 28 2020, 4:25 AM · Restricted Project
madhur13490 accepted D82712: Improve stack object printing. NFC..
Jun 28 2020, 4:25 AM · Restricted Project
madhur13490 created D82712: Improve stack object printing. NFC..
Jun 28 2020, 4:25 AM · Restricted Project
madhur13490 updated the diff for D82712: Improve stack object printing. NFC..

remove redundant print

Jun 28 2020, 4:25 AM · Restricted Project

Jun 25 2020

madhur13490 updated the summary of D82469: Take out resource tracking from ASM printer..
Jun 25 2020, 3:36 AM · Restricted Project
madhur13490 updated the diff for D82469: Take out resource tracking from ASM printer..

Address comments by arsenm, revise description

Jun 25 2020, 3:36 AM · Restricted Project

Jun 24 2020

madhur13490 created D82469: Take out resource tracking from ASM printer..
Jun 24 2020, 8:36 AM · Restricted Project

Jun 22 2020

madhur13490 added inline comments to D80713: [AMDGPU] Support disassembly for AMDGPU kernel descriptors.
Jun 22 2020, 6:57 AM · Restricted Project

Jun 21 2020

madhur13490 added inline comments to D80713: [AMDGPU] Support disassembly for AMDGPU kernel descriptors.
Jun 21 2020, 2:05 AM · Restricted Project

Jun 16 2020

madhur13490 added a comment to D81806: [DA] conservatively mark the join of every divergent branch.

I am a bit surprised this is necessary. Actually, join divergence in bb3 should come about as a result of propagateLoopDivergence for the [bb1, bb2] loop and not immediately because it is a divergent exit.

I am not sure what you mean here. propagateLoopDivergence is calling propagateJoinDivergence ... so doesn't that count as a result of the former?

Also, a divergent loop exit does not automatically become join divergent, eg:

bb1: 
   %m.uni = <uni>
   %n.uni = <uni>
   br <uni>, %bb2, %bb3

bb2: [..]
   br <div>, %bb2, %bb3

bb3:
   %x.uni = phi [%m.uni, %bb2], [%n.uni %bb1]  <-- divergent loop exit that is not join divergent

But here, bb3 is not a join block for the bb2 loop, since there is only one path from the loop exit reaching bb3.

Exactly. With this patch %x.uni is marked as join divergent even though it is uniform: In its present form the patch solves one issue at the cost of precision.

The real culprit here is the SDA::join_blocks interface that does not distinguish divergent join blocks and loop exits. The SDA "knows" which is which internally, loses that information as it passes divergent blocks through join_blocks and the DA has to reverse-engineer that information. I have an unfinished patch here that fixes that and should resolve the bug addressed by this patch as well. The unfinished patch also factors the back-and-forth between the DA and SDA to propagate along nested loops completely into the SDA (propagateLoopDiv does not really belong in the DA).

Long story short: This is an ok fix (but please add a FIXME/TODO that hints to the issues with this approach) but we should rework the join_blocks interface in any case.

Jun 16 2020, 6:37 AM · Restricted Project

Jun 5 2020

madhur13490 committed rGbca413b036bf: Fix a typo in AMDGPU docs (authored by madhur13490).
Fix a typo in AMDGPU docs
Jun 5 2020, 6:38 AM
madhur13490 closed D81247: Fix a typo in AMDGPU docs.
Jun 5 2020, 6:37 AM · Restricted Project
madhur13490 created D81247: Fix a typo in AMDGPU docs.
Jun 5 2020, 3:48 AM · Restricted Project

Jun 2 2020

madhur13490 updated the diff for D80711: Utility to dump .dot representation of SelectionDAG without firing viewer.

rebase

Jun 2 2020, 2:45 AM · Restricted Project

Jun 1 2020

madhur13490 added inline comments to D80920: AMDGPU: Fix alignment for dynamic allocas.
Jun 1 2020, 8:33 AM · Restricted Project

May 30 2020

madhur13490 updated the diff for D80711: Utility to dump .dot representation of SelectionDAG without firing viewer.

Address further comment by arsenm

May 30 2020, 9:46 PM · Restricted Project
madhur13490 added inline comments to D80711: Utility to dump .dot representation of SelectionDAG without firing viewer.
May 30 2020, 9:46 PM · Restricted Project

May 29 2020

madhur13490 updated the diff for D80711: Utility to dump .dot representation of SelectionDAG without firing viewer.

Fix clang-tidy errors

May 29 2020, 8:39 AM · Restricted Project
madhur13490 updated the diff for D80711: Utility to dump .dot representation of SelectionDAG without firing viewer.

Addressing comments by arsenm

May 29 2020, 4:18 AM · Restricted Project
madhur13490 added inline comments to D80711: Utility to dump .dot representation of SelectionDAG without firing viewer.
May 29 2020, 4:18 AM · Restricted Project

May 28 2020

madhur13490 updated the summary of D80711: Utility to dump .dot representation of SelectionDAG without firing viewer.
May 28 2020, 9:50 AM · Restricted Project
madhur13490 updated the diff for D80711: Utility to dump .dot representation of SelectionDAG without firing viewer.

Update summary

May 28 2020, 9:49 AM · Restricted Project
madhur13490 created D80711: Utility to dump .dot representation of SelectionDAG without firing viewer.
May 28 2020, 4:18 AM · Restricted Project

May 4 2020

madhur13490 committed rG87f5e4951326: Select pointer typed load (authored by madhur13490).
Select pointer typed load
May 4 2020, 9:38 AM
madhur13490 committed rG8474856c82aa: Support any32 typed atomic loads (authored by madhur13490).
Support any32 typed atomic loads
May 4 2020, 9:38 AM

Mar 11 2020

madhur13490 added inline comments to D75865: Introduce unify-loop-exits pass..
Mar 11 2020, 1:35 AM · Restricted Project
madhur13490 added inline comments to D75865: Introduce unify-loop-exits pass..
Mar 11 2020, 1:35 AM · Restricted Project

Mar 22 2018

madhur13490 updated subscribers of D44736: DWARFVerifier: verify debug_names abbreviation table.

Does this patch covers all planned checks or there are any left which will
come later?

Mar 22 2018, 5:41 AM

Mar 25 2015

madhur13490 added a comment to D8576: Divergence analysis for GPU programs.

Any plans to improve this further by leveraging AliasAnalysis?

Mar 25 2015, 12:02 AM