alex-t (Alexander)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 26 2016, 7:17 AM (113 w, 23 h)

Recent Activity

Yesterday

alex-t accepted D52454: Run VerifyDAGDiverence in debug only.
Tue, Sep 25, 12:41 PM
alex-t added a comment to D52454: Run VerifyDAGDiverence in debug only.

TargetTransformInfo::hasBranchDivergence() only returns true only if the divergence makes sense for the given target.
So, the compile time should be only affected for such targets: AMDGPU, NVPTX etc.

Tue, Sep 25, 3:24 AM

Fri, Sep 21

alex-t added a comment to D52019: [AMDGPU] Divergence driven instruction selection. Part 1..

Committed r342719.

Fri, Sep 21, 3:37 AM
alex-t committed rL342719: [AMDGPU] Divergence driven instruction selection. Part 1..
[AMDGPU] Divergence driven instruction selection. Part 1.
Fri, Sep 21, 3:34 AM

Thu, Sep 20

alex-t updated the diff for D52019: [AMDGPU] Divergence driven instruction selection. Part 1..

MC/Disassembler/AMDGPU passed
Tests fixed

Thu, Sep 20, 4:26 AM

Wed, Sep 19

alex-t added inline comments to D52019: [AMDGPU] Divergence driven instruction selection. Part 1..
Wed, Sep 19, 7:55 AM
alex-t updated the diff for D52019: [AMDGPU] Divergence driven instruction selection. Part 1..

Source cleanup.

Wed, Sep 19, 7:55 AM

Thu, Sep 13

alex-t set the repository for D52019: [AMDGPU] Divergence driven instruction selection. Part 1. to rL LLVM.
Thu, Sep 13, 5:54 AM
alex-t closed D43334: AMDGPU: fix for SIRegisterInfo::isVGPR() crash.
Thu, Sep 13, 5:53 AM
alex-t closed D51316: [AMDGPU] Preliminary patch for divergence driven instruction selection. Operands Folding 1..
Thu, Sep 13, 5:53 AM
alex-t closed D51586: [AMDGPU] Preliminary patch for divergence driven instruction selection. Inline immediate move to V_MADAK_F32..
Thu, Sep 13, 5:53 AM
alex-t closed D51975: [AMDGPU] Preliminary patch for divergence driven instruction selection. Load offset inlining pattern changed..
Thu, Sep 13, 5:53 AM
alex-t closed D51931: [AMDGPU] Load divergence predicate refactoring.
Thu, Sep 13, 5:49 AM
alex-t set the repository for D51975: [AMDGPU] Preliminary patch for divergence driven instruction selection. Load offset inlining pattern changed. to rL LLVM.
Thu, Sep 13, 5:09 AM
alex-t committed rL342120: [AMDGPU] Load divergence predicate refactoring.
[AMDGPU] Load divergence predicate refactoring
Thu, Sep 13, 2:08 AM
alex-t created D52019: [AMDGPU] Divergence driven instruction selection. Part 1..
Thu, Sep 13, 1:54 AM

Wed, Sep 12

alex-t added inline comments to D51931: [AMDGPU] Load divergence predicate refactoring.
Wed, Sep 12, 11:43 PM
alex-t committed rL342115: [AMDGPU] Preliminary patch for divergence driven instruction selection..
[AMDGPU] Preliminary patch for divergence driven instruction selection.
Wed, Sep 12, 11:37 PM
alex-t created D51975: [AMDGPU] Preliminary patch for divergence driven instruction selection. Load offset inlining pattern changed..
Wed, Sep 12, 4:19 AM
alex-t updated the diff for D51931: [AMDGPU] Load divergence predicate refactoring.

Formatting fixed, function renamed.

Wed, Sep 12, 3:21 AM

Tue, Sep 11

alex-t created D51931: [AMDGPU] Load divergence predicate refactoring.
Tue, Sep 11, 7:21 AM
alex-t committed rL341928: [AMDGPU] Preliminary patch for divergence driven instruction selection..
[AMDGPU] Preliminary patch for divergence driven instruction selection.
Tue, Sep 11, 4:58 AM
alex-t closed D51734: [AMDGPU] Preliminary patch for divergence driven instruction selection. Immediate selection predicate changed.
Tue, Sep 11, 4:58 AM

Mon, Sep 10

alex-t committed rL341843: [AMDGPU] Preliminary patch for divergence driven instruction selection..
[AMDGPU] Preliminary patch for divergence driven instruction selection.
Mon, Sep 10, 9:44 AM

Fri, Sep 7

alex-t added a comment to D51316: [AMDGPU] Preliminary patch for divergence driven instruction selection. Operands Folding 1..

comitted: r341068
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341068 91177308-0d34-0410-b5e6-96231b3b80d8

Fri, Sep 7, 2:22 AM
alex-t committed rL341636: [AMDGPU] Preliminary patch for divergence driven instruction selection. Fold….
[AMDGPU] Preliminary patch for divergence driven instruction selection. Fold…
Fri, Sep 7, 2:10 AM
alex-t closed D51610: [AMDGPU] Preliminary patch for divergence driven instruction selection. Fold immediate SMRD offset..
Fri, Sep 7, 2:10 AM

Thu, Sep 6

alex-t created D51734: [AMDGPU] Preliminary patch for divergence driven instruction selection. Immediate selection predicate changed.
Thu, Sep 6, 8:07 AM
alex-t updated the diff for D51610: [AMDGPU] Preliminary patch for divergence driven instruction selection. Fold immediate SMRD offset..

Unnecessary "isReg()" check removed.
Full context unified diff.

Thu, Sep 6, 4:15 AM
alex-t updated the diff for D51586: [AMDGPU] Preliminary patch for divergence driven instruction selection. Inline immediate move to V_MADAK_F32..

Physical registers handling added. Test cases for physical registers added.

Thu, Sep 6, 1:01 AM
alex-t retitled D51586: [AMDGPU] Preliminary patch for divergence driven instruction selection. Inline immediate move to V_MADAK_F32. from [AMDGPU] Preliminary patch for divergence driven instruction selection. Inline move immediate. to [AMDGPU] Preliminary patch for divergence driven instruction selection. Inline immediate move to V_MADAK_F32..
Thu, Sep 6, 12:58 AM

Tue, Sep 4

alex-t updated the diff for D51586: [AMDGPU] Preliminary patch for divergence driven instruction selection. Inline immediate move to V_MADAK_F32..

Formatting corrected.

Tue, Sep 4, 4:36 AM
alex-t created D51610: [AMDGPU] Preliminary patch for divergence driven instruction selection. Fold immediate SMRD offset..
Tue, Sep 4, 1:21 AM

Mon, Sep 3

alex-t created D51586: [AMDGPU] Preliminary patch for divergence driven instruction selection. Inline immediate move to V_MADAK_F32..
Mon, Sep 3, 4:32 AM

Thu, Aug 30

alex-t committed rL341068: [AMDGPU] Preliminary patch for divergence driven instruction selection..
[AMDGPU] Preliminary patch for divergence driven instruction selection.
Thu, Aug 30, 6:56 AM
alex-t accepted D50433: A New Divergence Analysis for LLVM.
Thu, Aug 30, 6:53 AM
alex-t added a comment to D50433: A New Divergence Analysis for LLVM.

Sorry, i am struggeling to follow.
Do you take the union of the PDF(P) for each immediate predecessor P of X? (where X is a potential join point).
That gives you invalid results.

      A
    /   \
   B     C
 /  \   /  \
D     E     F
 \  /   \  /
   G     H
   \    /
      I

PDF(G) = {E, B}
PDF(H) = {E, C}

PDF(G) join PDF(H) = {E, B, C} (where join is set union).
Yet, there are two disjoint paths from A to I. But A is in none of these sets.

You approach to the Control Dependence Analysis considering CFG only. You operate in terms ob BBs and branches.
I start from the PHI. The idea is simple: each point where 2 values converge has already been found while building SSA and is annotated with the PHI node.
I consider not PHI parent block predecessors PDF but PHI incoming values parent blocks PDFs.

Let's say the phi node in block I reads %x = phi double [ 0.0, %G ], [ 1.0, %H ]. How do you detect the divergence in %x?

Thu, Aug 30, 6:50 AM
alex-t added a comment to D51316: [AMDGPU] Preliminary patch for divergence driven instruction selection. Operands Folding 1..
Thu, Aug 30, 4:41 AM
alex-t updated the diff for D51316: [AMDGPU] Preliminary patch for divergence driven instruction selection. Operands Folding 1..

'registers' section dropped in test

Thu, Aug 30, 4:39 AM

Wed, Aug 29

alex-t added inline comments to D51316: [AMDGPU] Preliminary patch for divergence driven instruction selection. Operands Folding 1..
Wed, Aug 29, 9:29 AM
alex-t updated the diff for D51316: [AMDGPU] Preliminary patch for divergence driven instruction selection. Operands Folding 1..

Formatting. Test corrected.

Wed, Aug 29, 9:29 AM
alex-t retitled D51316: [AMDGPU] Preliminary patch for divergence driven instruction selection. Operands Folding 1. from [AMDGPU] Preliminary patch for divergence driven instruction selection. Operands Folding 1. NFC. to [AMDGPU] Preliminary patch for divergence driven instruction selection. Operands Folding 1..
Wed, Aug 29, 4:28 AM
alex-t added inline comments to D51316: [AMDGPU] Preliminary patch for divergence driven instruction selection. Operands Folding 1..
Wed, Aug 29, 4:28 AM

Tue, Aug 28

alex-t added inline comments to D51316: [AMDGPU] Preliminary patch for divergence driven instruction selection. Operands Folding 1..
Tue, Aug 28, 10:20 AM
alex-t added a comment to D51316: [AMDGPU] Preliminary patch for divergence driven instruction selection. Operands Folding 1..

Needs tests and comments.

I think I know what cases you are trying to solve, and there's usually a better way. Do you have a specific example?

Tue, Aug 28, 7:40 AM
alex-t updated the diff for D51316: [AMDGPU] Preliminary patch for divergence driven instruction selection. Operands Folding 1..

Change has been split to several separate.
MIR test added

Tue, Aug 28, 7:39 AM

Mon, Aug 27

alex-t added a reviewer for D51316: [AMDGPU] Preliminary patch for divergence driven instruction selection. Operands Folding 1.: rampitec.
Mon, Aug 27, 11:35 AM
alex-t created D51316: [AMDGPU] Preliminary patch for divergence driven instruction selection. Operands Folding 1..
Mon, Aug 27, 11:35 AM
alex-t retitled D51316: [AMDGPU] Preliminary patch for divergence driven instruction selection. Operands Folding 1. from [AMDGPU] Preliminary patch for divergence driven instruction selection to [AMDGPU] Preliminary patch for divergence driven instruction selection. NFC..
Mon, Aug 27, 11:35 AM
alex-t added a comment to D50433: A New Divergence Analysis for LLVM.

Sorry, i am struggeling to follow.
Do you take the union of the PDF(P) for each immediate predecessor P of X? (where X is a potential join point).
That gives you invalid results.

      A
    /   \
   B     C
 /  \   /  \
D     E     F
 \  /   \  /
   G     H
   \    /
      I

PDF(G) = {E, B}
PDF(H) = {E, C}

PDF(G) join PDF(H) = {E, B, C} (where join is set union).
Yet, there are two disjoint paths from A to I. But A is in none of these sets.

Mon, Aug 27, 10:44 AM

Aug 24 2018

alex-t added a comment to D50433: A New Divergence Analysis for LLVM.

For given branch all the blocks where PHI nodes must be inserted belongs to the branch parent block dominance frontier.

The problem with DF is that it implicitly assumes that there exists a definition at the function entry (see http://www.cs.utexas.edu/~pingali/CS380C/2010/papers/ssaCytron.pdf, comment below last equation of page 17).
So, we would get imprecise results.

I'm not sure that I understand you correct...
I still do not get an idea what do you mean by "imprecise results". The assumption in the paper you have referred looks reasonable.
Let's say we have 2 disjoint paths from Entry to block X and you have a use of some value V in X.

Aug 24 2018, 9:28 AM

Aug 23 2018

alex-t added a comment to D50433: A New Divergence Analysis for LLVM.

BTW, even with analyzing forward (up-down) and lazy style, for each divergent terminator you have to compute join points.
This is exactly what is done constructing SSA form to find all the blocks where should be PHI nodes.
For given branch all the blocks where PHI nodes must be inserted belongs to the branch parent block dominance frontier.
Why don't you use at least DF information from PDT?
Facing the divergent branch you can compute the blocks set affected by the divergence in linear time by Cooper's "two fingers" algorithm.

Aug 23 2018, 7:45 AM
alex-t added a comment to D50433: A New Divergence Analysis for LLVM.

I've not done with the source investigation yet but I already have one general objection.
The analysis algorithm is list-based iterative solver and hence it have to be of linear complexity.

Aug 23 2018, 6:15 AM

Aug 22 2018

alex-t added a comment to D50433: A New Divergence Analysis for LLVM.
Aug 22 2018, 9:36 AM
alex-t added a comment to D50433: A New Divergence Analysis for LLVM.

Currently I cannot apply your diff to the trunk explicitly.
Could you tell me the commit or revision number in llvm trunk on which your patch could be applied?
The rebased diff could help as well.
if I could it'd be much more convenient to review.

Aug 22 2018, 2:24 AM

Aug 20 2018

alex-t added a comment to D50433: A New Divergence Analysis for LLVM.

Ping. Are there any further remarks, change requests or questions?

Aug 20 2018, 9:41 AM
alex-t added a comment to D50433: A New Divergence Analysis for LLVM.

How do you deal with terminators that have more than two successors? Example:

switch (divInt) {
  case 0:
   v = 1.0; break;
  case 1:
   v = 20.0; break;
  default:
  // do stuff (block D)
  return;
}
// do other stuff, using 'v' (J)

+----A----+
|    |    |
C0  C1    D
\   |    [..]
 \  |
   J

J is control-dependent on A. Therefore, you will erase A from the PDT sets of C0 and C1. However, there exist two disjoint paths from A to J through C0 and C1, which make PHI nodes in J divergent.

Aug 20 2018, 8:14 AM

Aug 10 2018

alex-t added a comment to D50433: A New Divergence Analysis for LLVM.
Aug 10 2018, 3:56 AM

Aug 9 2018

alex-t added a comment to D50433: A New Divergence Analysis for LLVM.

A few comments based on my experience of implemented the DA for AMD GPU legacy compiler :)

Aug 9 2018, 7:08 AM

Jun 4 2018

alex-t added a comment to D46298: AMDGPU: Move isSDNodeSourceOfDivergence() implementation to SITargetLowering.
should I just disable this analysis completely for r600?
Jun 4 2018, 3:34 AM
alex-t accepted D47148: [CodeGen] Always update divergence in SelectionDAG::UpdateNodeOperands.
Jun 4 2018, 3:25 AM
alex-t added a comment to D47148: [CodeGen] Always update divergence in SelectionDAG::UpdateNodeOperands.

My apologies for the delay. Thanks for handling this. LGTM.

Jun 4 2018, 3:24 AM

May 24 2018

alex-t added a comment to D46298: AMDGPU: Move isSDNodeSourceOfDivergence() implementation to SITargetLowering.

I agree isVGPR should be illegal to call for R600

May 24 2018, 3:02 AM

May 21 2018

alex-t accepted D47151: [AMDGPU] Add divergence analysis as a dependency for ISel.

Thanks for catching this

May 21 2018, 11:21 AM

May 3 2018

alex-t added a comment to D46298: AMDGPU: Move isSDNodeSourceOfDivergence() implementation to SITargetLowering.

Could you please clarify - why do you consider that check meaningless for r600?
I see that this line : " const SISubtarget &ST = MF->getSubtarget<SISubtarget>(); " is misleading and in fact is not correct.
I'd better check and choose the R600Subtarget or SISubtarget.
If I understand right we need just check which subtarget to retrieve for physregs check.

May 3 2018, 4:49 AM

Apr 25 2018

alex-t added a comment to D40556: SIFixSGPRCopies should not change non-divergent PHI.

Sorry for the delay. Just submitted to trunk.
It was not about the reverse patch only. I had to change tests accordingly.

Apr 25 2018, 5:40 AM
alex-t committed rL330818: [AMDGPU] Revert b0efc4fd6 (https://reviews.llvm.org/D40556).
[AMDGPU] Revert b0efc4fd6 (https://reviews.llvm.org/D40556)
Apr 25 2018, 5:36 AM

Apr 16 2018

alex-t added a comment to D45372: [AMDGPU] Fix issues for backend divergence tracking.
Apr 16 2018, 8:01 AM

Apr 13 2018

alex-t added a comment to D40556: SIFixSGPRCopies should not change non-divergent PHI.

I have no idea how to backport yet.
I 'my going to submit revert patch.
This change existed for a few months and I' my not sure what may be broken
if reverted. I have to figure out this. Some precheckin tests needed.

Apr 13 2018, 12:57 AM

Apr 10 2018

alex-t accepted D45372: [AMDGPU] Fix issues for backend divergence tracking.
Apr 10 2018, 6:37 AM
alex-t added a comment to D40556: SIFixSGPRCopies should not change non-divergent PHI.

In fact yes. This is the most correct solution. The stuff in
SIFixSGPRCopies.cpp has got to gone.
So it does not make sense to spend efforts on it. Moreover there is no
correct solution at all
unless we implement one more DivergenceAnalysis upon the machine IR.
So, if it's okay I'd prefer to revert.

Apr 10 2018, 6:34 AM
alex-t added a comment to D45372: [AMDGPU] Fix issues for backend divergence tracking.

In general LGTM.
I also concerned about the magic test that has no checks and has no visible side effects on shared data but is necessary to reproduce buggy behavior.
Could you please clarify what do you need it for?

Apr 10 2018, 6:28 AM

Apr 9 2018

alex-t added a comment to D40556: SIFixSGPRCopies should not change non-divergent PHI.

It seems like this patch should be reverted. Recently we have no reliable
way to determine the PHI (or whatever else) divergence on the MI level.
The only correct way is to add the DA algorithm that re-computes all the MI
divergence.
Since we're going to remove the SGPRFix stuff as soon as diverence driven
ISel is ready I consider this patch is not necessary.

Apr 9 2018, 4:37 AM

Mar 27 2018

alex-t accepted D40547: AMDGPU: Fix copying i1 value out of loop with non-uniform exit.
Mar 27 2018, 6:04 AM
alex-t accepted D43743: StructurizeCFG: Test for branch divergence correctly.
Mar 27 2018, 6:04 AM

Mar 17 2018

alex-t added a comment to D40556: SIFixSGPRCopies should not change non-divergent PHI.

I m looking on this.

Mar 17 2018, 8:20 AM

Mar 15 2018

alex-t updated subscribers of D40556: SIFixSGPRCopies should not change non-divergent PHI.

Hi Samuel,

Mar 15 2018, 9:29 AM

Mar 14 2018

alex-t committed rL327488: [AMDGPU] Fix for DAGCombiner infinite loop in OCLtst.
[AMDGPU] Fix for DAGCombiner infinite loop in OCLtst
Mar 14 2018, 2:51 AM
alex-t closed D44417: Fix for DAGCombiner infinite loop in AMDGPU OCLtst.
Mar 14 2018, 2:51 AM

Mar 13 2018

alex-t created D44417: Fix for DAGCombiner infinite loop in AMDGPU OCLtst.
Mar 13 2018, 4:38 AM

Mar 5 2018

alex-t committed rL326703: Pass Divergence Analysis data to Selection DAG to drive divergence.
Pass Divergence Analysis data to Selection DAG to drive divergence
Mar 5 2018, 7:17 AM
alex-t closed D35267: Pass Divergence Analysis data to selection DAG to drive divergence dependent instruction selection.
Mar 5 2018, 7:17 AM
alex-t updated the diff for D35267: Pass Divergence Analysis data to selection DAG to drive divergence dependent instruction selection.
Mar 5 2018, 6:00 AM

Mar 2 2018

alex-t updated the diff for D35267: Pass Divergence Analysis data to selection DAG to drive divergence dependent instruction selection.
Mar 2 2018, 9:21 AM
alex-t updated the diff for D35267: Pass Divergence Analysis data to selection DAG to drive divergence dependent instruction selection.

ready to land

Mar 2 2018, 5:39 AM

Mar 1 2018

alex-t committed rL326451: [AMDGPU] : fix for the crash in SIRegisterInfo when the regiser class not found.
[AMDGPU] : fix for the crash in SIRegisterInfo when the regiser class not found
Mar 1 2018, 9:41 AM

Feb 26 2018

alex-t added a comment to D35267: Pass Divergence Analysis data to selection DAG to drive divergence dependent instruction selection.

make check-llvm has passed

Feb 26 2018, 12:00 PM
alex-t updated the diff for D43334: AMDGPU: fix for SIRegisterInfo::isVGPR() crash.

Following the discussion. The only register classes that appeared necessary according to the test coverage were added.
This preview can be the starting point for the discussion with respect to the proper approach.

Feb 26 2018, 11:24 AM
alex-t updated the diff for D35267: Pass Divergence Analysis data to selection DAG to drive divergence dependent instruction selection.

One test fixed

Feb 26 2018, 11:20 AM
alex-t added a comment to D43334: AMDGPU: fix for SIRegisterInfo::isVGPR() crash.

One more question - where should R600 reg classes be processed?
Should we implement getRegClass in R600RegisterInfo?
Or it's okay to handle all them in SIRegisterInfo?

Feb 26 2018, 9:54 AM
alex-t added inline comments to D43334: AMDGPU: fix for SIRegisterInfo::isVGPR() crash.
Feb 26 2018, 7:50 AM
alex-t updated the diff for D35267: Pass Divergence Analysis data to selection DAG to drive divergence dependent instruction selection.

Formatting fixed.
DAG divergence verification for "divergent" targets only.

Feb 26 2018, 3:09 AM

Feb 22 2018

alex-t added inline comments to D43334: AMDGPU: fix for SIRegisterInfo::isVGPR() crash.
Feb 22 2018, 11:41 AM
alex-t updated the diff for D35267: Pass Divergence Analysis data to selection DAG to drive divergence dependent instruction selection.

Verification algorithm of linear complexity

Feb 22 2018, 11:36 AM

Feb 21 2018

alex-t updated the diff for D35267: Pass Divergence Analysis data to selection DAG to drive divergence dependent instruction selection.

This is the preview of the implementation that provide walk-through divergence bits consistency.
Please note that the verification algorithm has polynomial complexity and is expected to be switched ON/OFF by the option (upcoming soon) with default to OFF.

Feb 21 2018, 12:22 PM
alex-t accepted D40546: StructurizeCFG: Test for branch divergence correctly.
Feb 21 2018, 7:46 AM

Feb 20 2018

alex-t added a comment to D35267: Pass Divergence Analysis data to selection DAG to drive divergence dependent instruction selection.
Feb 20 2018, 6:02 AM
alex-t added inline comments to D43334: AMDGPU: fix for SIRegisterInfo::isVGPR() crash.
Feb 20 2018, 2:43 AM

Feb 16 2018

alex-t added a comment to D35267: Pass Divergence Analysis data to selection DAG to drive divergence dependent instruction selection.

ping @efriedma

Feb 16 2018, 7:39 AM

Feb 15 2018

alex-t updated the diff for D35267: Pass Divergence Analysis data to selection DAG to drive divergence dependent instruction selection.

Some bugfixes and changes according to the reviewers requirements.

Feb 15 2018, 9:03 AM