Page MenuHomePhabricator

bmahjour (Bardia Mahjour)
User

Projects

User does not belong to any projects.

User Details

User Since
May 3 2019, 8:38 AM (37 w, 3 d)

Recent Activity

Yesterday

bmahjour added a comment to D72178: [DA] Delinearization of fixed-size multi-dimensional arrays.

ping

Mon, Jan 20, 11:03 AM · Restricted Project, Restricted Project

Wed, Jan 15

bmahjour updated the diff for D72350: [DDG] Data Dependence Graph - Graph Simplification.

@Meinersbur this update should address your concern regarding time complexity. I've also tried to limit the additional memory usage by only keeping track of incoming edge counts for nodes that are targets of candidate source nodes.

Wed, Jan 15, 5:01 PM · Restricted Project

Mon, Jan 13

bmahjour added a comment to D72178: [DA] Delinearization of fixed-size multi-dimensional arrays.

ping

Mon, Jan 13, 5:38 AM · Restricted Project, Restricted Project

Fri, Jan 10

bmahjour added inline comments to D72350: [DDG] Data Dependence Graph - Graph Simplification.
Fri, Jan 10, 1:29 PM · Restricted Project
bmahjour updated the diff for D72350: [DDG] Data Dependence Graph - Graph Simplification.

Address review comments.

Fri, Jan 10, 1:10 PM · Restricted Project
bmahjour added inline comments to D72350: [DDG] Data Dependence Graph - Graph Simplification.
Fri, Jan 10, 10:12 AM · Restricted Project

Tue, Jan 7

bmahjour created D72350: [DDG] Data Dependence Graph - Graph Simplification.
Tue, Jan 7, 11:02 AM · Restricted Project

Fri, Jan 3

bmahjour created D72178: [DA] Delinearization of fixed-size multi-dimensional arrays.
Fri, Jan 3, 1:20 PM · Restricted Project, Restricted Project

Dec 19 2019

bmahjour committed rG86acaa9457d3: [DDG] Data Dependence Graph - Ordinals (authored by bmahjour).
[DDG] Data Dependence Graph - Ordinals
Dec 19 2019, 8:02 AM
bmahjour closed D70986: [DDG] Data Dependence Graph - Ordinals.
Dec 19 2019, 8:02 AM · Restricted Project
bmahjour added a comment to D70986: [DDG] Data Dependence Graph - Ordinals.

The order is at the mercy of SCCIterator. For example if you look at the first pi-block node in basic-a.ll, you'll notice that prior to this change the %inc = add i64 %i.02, 1 was placed ahead of %i.02 = phi .

I see. Could you add that as a comment to either computeInstructionOrdinals and/or the invocation of llvm::sort.

Dec 19 2019, 8:02 AM · Restricted Project

Dec 18 2019

bmahjour added a comment to D71492: [SCEV] Generate AddRec for trivial and LCSSA phis outside of loop header (WIP).

[suggestion] The scope of the lcssa PHI node and the definition of its value are in different loops, hence calling getSCEVAtScope at the lcssa's scope may simplify the expression. This might even be mandatory since SCEV should be canonical.

If by "lcssa`s scope" you mean the scope at which the lcssa phi instruction appears, then it's not going to help in this case. The scope is the function (outside of any loop). If you pass nullptr to getSCEVAtScope it continues to produce SCEVUnknown.

[serious] createAddRecFromPHI might be directly called be called getSCEV such that %indvars.iv.next isn't in the cache yet. Therefore the result changes depending on the order in which getSCEV is called.

Yes, I was originally concerned that calling getSCEV could cause an infinite loop for cyclic phis, but I gave it more thought and I couldn't come up with a valid IR that can cause the infinite loop. I've changed it to use getSCEV and documented my reasoning for why I don't think a cycle is possible.

Dec 18 2019, 2:10 PM · Restricted Project
bmahjour added a child revision for D71539: [SCEV] Look through trivial PHIs (WIP).: D71492: [SCEV] Generate AddRec for trivial and LCSSA phis outside of loop header (WIP).
Dec 18 2019, 2:10 PM · Restricted Project
bmahjour added a parent revision for D71492: [SCEV] Generate AddRec for trivial and LCSSA phis outside of loop header (WIP): D71539: [SCEV] Look through trivial PHIs (WIP)..
Dec 18 2019, 2:10 PM · Restricted Project
bmahjour retitled D71492: [SCEV] Generate AddRec for trivial and LCSSA phis outside of loop header (WIP) from [SCEV] Generate AddRec for trivial and LCSSA phis outside of loop header. to [SCEV] Generate AddRec for trivial and LCSSA phis outside of loop header (WIP).
Dec 18 2019, 2:10 PM · Restricted Project
bmahjour updated the diff for D71492: [SCEV] Generate AddRec for trivial and LCSSA phis outside of loop header (WIP).

Address Michael's comments.

Dec 18 2019, 2:00 PM · Restricted Project
bmahjour added a comment to D70986: [DDG] Data Dependence Graph - Ordinals.

What would cause the order of nodes in a pi-node to change? As it's not topologically sorted, wouldn't the order stay the order in which they were added to NodeList?

Dec 18 2019, 1:22 PM · Restricted Project

Dec 13 2019

bmahjour created D71492: [SCEV] Generate AddRec for trivial and LCSSA phis outside of loop header (WIP).
Dec 13 2019, 2:23 PM · Restricted Project

Dec 12 2019

bmahjour added a comment to D70986: [DDG] Data Dependence Graph - Ordinals.

ping

Dec 12 2019, 10:05 AM · Restricted Project

Dec 11 2019

bmahjour committed rG916d37a2bc53: [DA] Improve dump to show source and sink of the dependence (authored by bmahjour).
[DA] Improve dump to show source and sink of the dependence
Dec 11 2019, 9:14 AM
bmahjour closed D71088: [DA] Improve dump to show source and sink of the dependence.
Dec 11 2019, 9:14 AM · Restricted Project
bmahjour added a comment to D71088: [DA] Improve dump to show source and sink of the dependence.

Thank you @dmgreen and @fhahn for the quick review.

Dec 11 2019, 8:46 AM · Restricted Project

Dec 10 2019

bmahjour added inline comments to D71088: [DA] Improve dump to show source and sink of the dependence.
Dec 10 2019, 7:33 AM · Restricted Project
bmahjour updated the diff for D71088: [DA] Improve dump to show source and sink of the dependence.

Addressed review comments.

Dec 10 2019, 7:33 AM · Restricted Project

Dec 6 2019

bmahjour added a reviewer for D71088: [DA] Improve dump to show source and sink of the dependence: fhahn.
Dec 6 2019, 6:03 AM · Restricted Project

Dec 5 2019

bmahjour updated the diff for D71088: [DA] Improve dump to show source and sink of the dependence.

Check the complete da print output in the LIT test as per Florian's comment.

Dec 5 2019, 2:17 PM · Restricted Project
bmahjour added inline comments to D71088: [DA] Improve dump to show source and sink of the dependence.
Dec 5 2019, 2:17 PM · Restricted Project
bmahjour added a comment to D70986: [DDG] Data Dependence Graph - Ordinals.

I do not understand why the ordinals are necessary. For deterministic behavior, the deterministic iteration order over blocks and instructions should already ensure that (unless you are iterating over DenseMaps, which does not seem the case and is easily fixed). If for correctness, do you have an illustrative example when this would be critical?

Dec 5 2019, 1:40 PM · Restricted Project
bmahjour created D71088: [DA] Improve dump to show source and sink of the dependence.
Dec 5 2019, 1:13 PM · Restricted Project

Dec 4 2019

bmahjour added a comment to D70939: [LoopUtils] Updated deleteDeadLoop() to handle loop nest. .

The deleteDeadLoop function when called on the outer loop will effectively remove the subloops from the CFG too (make them unreachable). Maybe we should change deleteDeadLoop to also take the subloops into account when updating the analysis passed to it. Then we shouldn't need a separate function to delete loop nests.

Dec 4 2019, 7:58 AM · Restricted Project

Dec 3 2019

bmahjour created D70986: [DDG] Data Dependence Graph - Ordinals.
Dec 3 2019, 2:08 PM · Restricted Project
bmahjour committed rG2dd82a1c0496: [DDG] Data Dependence Graph - Topological Sort (Memory Leak Fix) (authored by bmahjour).
[DDG] Data Dependence Graph - Topological Sort (Memory Leak Fix)
Dec 3 2019, 7:09 AM
bmahjour closed D70609: [DDG] Data Dependence Graph - Topological Sort.
Dec 3 2019, 7:09 AM · Restricted Project

Dec 2 2019

bmahjour updated the diff for D70609: [DDG] Data Dependence Graph - Topological Sort.

Addressed Michael's comments.

Dec 2 2019, 11:47 AM · Restricted Project
bmahjour added a comment to D70609: [DDG] Data Dependence Graph - Topological Sort.

[suggestion] Could you add a test case with a reduction (not necessarily in this patch), such as

double sum = 0;
for (int i = 0; i < n; i+=1)
  sum+=A[i];
return sum;

I am interested in what happens in self-recursive phi dependencies that are not induction variables. Note that GVN LoadPRE and LICM register promotion can create those as well. Another interesting case would be a nested reduction:

for (int j = 0; j < m; j+=1) {
  double sum = 0;
  for (int i = 0; i < n; i+=1)
    sum += A[i][j];
  B[j] = sum;
}

The motivation is that reductions usually are optimized differently than flow dependencies.

Dec 2 2019, 11:29 AM · Restricted Project

Nov 27 2019

bmahjour reopened D70609: [DDG] Data Dependence Graph - Topological Sort.
Nov 27 2019, 8:45 AM · Restricted Project
bmahjour updated the diff for D70609: [DDG] Data Dependence Graph - Topological Sort.

One of the sanitizer builds failed due to a memory leak issue. http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/14902
The reason for the leak is that when sorting I did not consider the nodes inside of the pi-block so they got removed from the DirectedGraph's list of nodes, and did not get freed when the DDG destructor got called.
I've updated the patch to fix the leak and reopened this revision for review.

Nov 27 2019, 8:45 AM · Restricted Project

Nov 25 2019

bmahjour committed rG67f0685b4d10: Revert "[DDG] Data Dependence Graph - Topological Sort" Revert for now to look… (authored by bmahjour).
Revert "[DDG] Data Dependence Graph - Topological Sort" Revert for now to look…
Nov 25 2019, 1:25 PM
bmahjour added a reverting change for rGbec37c3fc766: [DDG] Data Dependence Graph - Topological Sort: rG67f0685b4d10: Revert "[DDG] Data Dependence Graph - Topological Sort" Revert for now to look….
Nov 25 2019, 1:25 PM
bmahjour committed rGbec37c3fc766: [DDG] Data Dependence Graph - Topological Sort (authored by bmahjour).
[DDG] Data Dependence Graph - Topological Sort
Nov 25 2019, 8:34 AM
bmahjour closed D70609: [DDG] Data Dependence Graph - Topological Sort.
Nov 25 2019, 8:33 AM · Restricted Project

Nov 22 2019

bmahjour added inline comments to D70609: [DDG] Data Dependence Graph - Topological Sort.
Nov 22 2019, 3:01 PM · Restricted Project
bmahjour created D70609: [DDG] Data Dependence Graph - Topological Sort.
Nov 22 2019, 11:02 AM · Restricted Project
bmahjour abandoned D70573: [NFC] Improve comment about inverse depth-first iterator + clang-format.
Nov 22 2019, 8:04 AM · Restricted Project

Nov 21 2019

bmahjour created D70573: [NFC] Improve comment about inverse depth-first iterator + clang-format.
Nov 21 2019, 3:24 PM · Restricted Project
bmahjour accepted D70049: [CodeMoverUtils] Added an API to check if an instruction can be safely moved before another instruction..

LGTM.

Nov 21 2019, 10:04 AM · Restricted Project

Nov 20 2019

bmahjour added a comment to D68789: [LoopNest]: Analysis to discover properties of a loop nest..

[suggestion] Add a methods that returns/fills a vector with all the Loop*s that are part of the perfect loop nest.

Nov 20 2019, 10:30 AM · Restricted Project

Nov 14 2019

bmahjour added inline comments to D70049: [CodeMoverUtils] Added an API to check if an instruction can be safely moved before another instruction..
Nov 14 2019, 2:45 PM · Restricted Project

Nov 13 2019

bmahjour added inline comments to D70192: [LoopCacheAnalysis]: Fix assertion failure during cost computation.
Nov 13 2019, 11:45 AM · Restricted Project

Nov 12 2019

bmahjour added inline comments to D70049: [CodeMoverUtils] Added an API to check if an instruction can be safely moved before another instruction..
Nov 12 2019, 10:09 AM · Restricted Project

Nov 8 2019

bmahjour added an edge to rGf0af11d86f81: [DDG] Data Dependence Graph - Pi Block: D68827: [DDG] Data Dependence Graph - Pi Block.
Nov 8 2019, 2:24 PM
bmahjour closed D68827: [DDG] Data Dependence Graph - Pi Block.
Nov 8 2019, 2:24 PM · Restricted Project
bmahjour added 1 commit(s) for D68827: [DDG] Data Dependence Graph - Pi Block: rGf0af11d86f81: [DDG] Data Dependence Graph - Pi Block.
Nov 8 2019, 2:24 PM · Restricted Project
bmahjour committed rGf0af11d86f81: [DDG] Data Dependence Graph - Pi Block (authored by bmahjour).
[DDG] Data Dependence Graph - Pi Block
Nov 8 2019, 12:53 PM

Nov 7 2019

bmahjour added inline comments to D68827: [DDG] Data Dependence Graph - Pi Block.
Nov 7 2019, 11:52 AM · Restricted Project
bmahjour updated the diff for D68827: [DDG] Data Dependence Graph - Pi Block.

Changed the enum array to use "Last" instead of "Count"

Nov 7 2019, 11:52 AM · Restricted Project

Nov 1 2019

bmahjour updated subscribers of D68789: [LoopNest]: Analysis to discover properties of a loop nest..
Nov 1 2019, 11:27 AM · Restricted Project
bmahjour added inline comments to D68789: [LoopNest]: Analysis to discover properties of a loop nest..
Nov 1 2019, 11:27 AM · Restricted Project
bmahjour updated the diff for D68827: [DDG] Data Dependence Graph - Pi Block.

Created EnumeratedArray ADT (with unit tests), added Count to the edge enums and changed EdgeAlreadyCreated matrix to use EnumeratedArray.

Nov 1 2019, 9:13 AM · Restricted Project

Oct 31 2019

bmahjour added inline comments to D68827: [DDG] Data Dependence Graph - Pi Block.
Oct 31 2019, 11:31 AM · Restricted Project
bmahjour added inline comments to D68827: [DDG] Data Dependence Graph - Pi Block.
Oct 31 2019, 8:27 AM · Restricted Project
bmahjour added a comment to D68827: [DDG] Data Dependence Graph - Pi Block.

I am still unconvinced over the boilerplate createPiBlocks.

Oct 31 2019, 8:10 AM · Restricted Project

Oct 29 2019

bmahjour updated the diff for D68827: [DDG] Data Dependence Graph - Pi Block.
Oct 29 2019, 2:45 PM · Restricted Project
bmahjour added a comment to D68827: [DDG] Data Dependence Graph - Pi Block.

Addressed all comments.

Oct 29 2019, 2:43 PM · Restricted Project

Oct 17 2019

bmahjour added inline comments to D68827: [DDG] Data Dependence Graph - Pi Block.
Oct 17 2019, 10:42 AM · Restricted Project

Oct 10 2019

bmahjour added a comment to D68789: [LoopNest]: Analysis to discover properties of a loop nest..

typo in title: [LoopNext] -> [LoopNest]

Oct 10 2019, 1:16 PM · Restricted Project
bmahjour created D68827: [DDG] Data Dependence Graph - Pi Block.
Oct 10 2019, 1:16 PM · Restricted Project
bmahjour added a comment to D68789: [LoopNest]: Analysis to discover properties of a loop nest..

The motivation for this patch was discussed at the latest meeting of the LLVM loop group (https://ibm.box.com/s/xn1sfd80jkpfssiqhal6t88yvzxebcex).

Oct 10 2019, 9:08 AM · Restricted Project

Oct 8 2019

bmahjour added a comment to D68474: [DirectedGraph]: Add setTargetNode member function.

LGTM, but I'll let another reviewer give the green light :)

Oct 8 2019, 7:38 AM · Restricted Project

Oct 3 2019

bmahjour committed rGf6c34de11767: [PGO] Refactor Value Profiling into a plugin based oracle and create a well… (authored by bmahjour).
[PGO] Refactor Value Profiling into a plugin based oracle and create a well…
Oct 3 2019, 7:21 AM
bmahjour committed rL373601: [PGO] Refactor Value Profiling into a plugin based oracle and create a well….
[PGO] Refactor Value Profiling into a plugin based oracle and create a well…
Oct 3 2019, 7:19 AM
bmahjour closed D67920: [PGO] Refactor Value Profiling into a plugin based oracle and create a well defined API for the plugins..
Oct 3 2019, 7:18 AM · Restricted Project

Oct 1 2019

bmahjour committed rG91b62d5c89ef: [DDG] Data Dependence Graph - Root Node (authored by bmahjour).
[DDG] Data Dependence Graph - Root Node
Oct 1 2019, 12:32 PM
bmahjour committed rL373386: [DDG] Data Dependence Graph - Root Node.
[DDG] Data Dependence Graph - Root Node
Oct 1 2019, 12:31 PM
bmahjour closed D67970: [DDG] Data Dependence Graph - Root Node.
Oct 1 2019, 12:31 PM · Restricted Project

Sep 30 2019

bmahjour updated the diff for D67970: [DDG] Data Dependence Graph - Root Node.
Sep 30 2019, 11:38 AM · Restricted Project
bmahjour removed a reviewer for D67970: [DDG] Data Dependence Graph - Root Node: ppc-slack.
Sep 30 2019, 11:35 AM · Restricted Project
Herald added a reviewer for D67970: [DDG] Data Dependence Graph - Root Node: ppc-slack.

Do I understand it correctly, that this node is added to avoid having to deal with forests?

Kind of. The graph prior to creation of pi-blocks is not a DAG and may have disjoint components. The root node is needed to turn it into a "rooted digraph" making it easier to compute all the strongly connected components. Prior to creating the root, the graph is similar to a forest, but technically speaking it's not a forest because the components may not be trees.

Sep 30 2019, 11:32 AM · Restricted Project

Sep 24 2019

bmahjour created D67970: [DDG] Data Dependence Graph - Root Node.
Sep 24 2019, 9:36 AM · Restricted Project

Sep 18 2019

bmahjour committed rGdb800c267d8f: Data Dependence Graph Basics (authored by bmahjour).
Data Dependence Graph Basics
Sep 18 2019, 10:49 AM
bmahjour committed rL372238: Data Dependence Graph Basics.
Data Dependence Graph Basics
Sep 18 2019, 10:49 AM

Sep 17 2019

bmahjour committed rG6476d7cf0b2b: Revert "Data Dependence Graph Basics" (authored by bmahjour).
Revert "Data Dependence Graph Basics"
Sep 17 2019, 12:22 PM
bmahjour added a reverting change for rGc98ec60993a7: Data Dependence Graph Basics: rG6476d7cf0b2b: Revert "Data Dependence Graph Basics".
Sep 17 2019, 12:22 PM
bmahjour committed rL372168: Revert "Data Dependence Graph Basics".
Revert "Data Dependence Graph Basics"
Sep 17 2019, 12:22 PM
bmahjour committed rGc98ec60993a7: Data Dependence Graph Basics (authored by bmahjour).
Data Dependence Graph Basics
Sep 17 2019, 11:58 AM
bmahjour committed rL372162: Data Dependence Graph Basics.
Data Dependence Graph Basics
Sep 17 2019, 11:54 AM
bmahjour closed D65350: [DDG] Data Dependence Graph Basics.
Sep 17 2019, 11:54 AM · Restricted Project
bmahjour committed rL372140: Request commit access for bmahjour.
Request commit access for bmahjour
Sep 17 2019, 9:52 AM

Sep 16 2019

bmahjour committed rG474c713fc75b: [NFC] Test commit access (authored by bmahjour).
[NFC] Test commit access
Sep 16 2019, 1:46 PM
bmahjour committed rL372033: [NFC] Test commit access.
[NFC] Test commit access
Sep 16 2019, 1:46 PM

Sep 12 2019

bmahjour added a comment to D65350: [DDG] Data Dependence Graph Basics.

ping

Sep 12 2019, 6:40 AM · Restricted Project

Sep 6 2019

bmahjour added inline comments to D65350: [DDG] Data Dependence Graph Basics.
Sep 6 2019, 2:13 PM · Restricted Project
bmahjour updated the diff for D65350: [DDG] Data Dependence Graph Basics.

Addressed latest round of review comments.

Sep 6 2019, 12:47 PM · Restricted Project
bmahjour added a comment to D65350: [DDG] Data Dependence Graph Basics.

Thanks for the docs! Could you clarify the difference between paper and implementation? The implementations looks fine, apart a few nits.

Sep 6 2019, 12:41 PM · Restricted Project

Sep 5 2019

bmahjour added a comment to D65350: [DDG] Data Dependence Graph Basics.

This patch contains support for a basic DDGs containing only atomic nodes (one node for each instruction). The edges are two fold: def-use edges and memory-dependence edges. The idea behind the DependenceGraphBuilder and why we need it are summarized in https://ibm.ent.box.com/v/directed-graph-and-ddg.

I think it would be good to summarize the information in-tree as well, to ensure the information is accessible later on as well. Some of the docs fit in the headers, for some of it a new documentation page might be worth adding. Ideally it would include some info about design decisions, the intended/example uses cases and how the DDG helps and the benefits over the existing infrastructure.

Sure I can create a page or two of documentation, however I'm not very familiar with the doc infrastructure in LLVM. Could you point me to some examples to follow? Would an rts file under llvm/docs/DDG be sufficient? Are they rendered by any tool and if so how can I test it?

Great thanks! Yep adding a .rts should be sufficient. I think you need sphinx installed to build the docs and set LLVM_BUILD_DOCS.

No Problem. Thank you for bringing it up. The latest uploaded patch contains the .rst and the relevant images.

Sep 5 2019, 7:15 AM · Restricted Project

Aug 29 2019

bmahjour updated the diff for D65350: [DDG] Data Dependence Graph Basics.

Created a documentation in tree with diagrams and words describing the high level design.

Aug 29 2019, 1:37 PM · Restricted Project

Aug 21 2019

bmahjour added a comment to D65350: [DDG] Data Dependence Graph Basics.

This patch contains support for a basic DDGs containing only atomic nodes (one node for each instruction). The edges are two fold: def-use edges and memory-dependence edges. The idea behind the DependenceGraphBuilder and why we need it are summarized in https://ibm.ent.box.com/v/directed-graph-and-ddg.

I think it would be good to summarize the information in-tree as well, to ensure the information is accessible later on as well. Some of the docs fit in the headers, for some of it a new documentation page might be worth adding. Ideally it would include some info about design decisions, the intended/example uses cases and how the DDG helps and the benefits over the existing infrastructure.

Aug 21 2019, 9:02 AM · Restricted Project
bmahjour added inline comments to D65350: [DDG] Data Dependence Graph Basics.
Aug 21 2019, 8:29 AM · Restricted Project
bmahjour updated the diff for D65350: [DDG] Data Dependence Graph Basics.

Addressed the latest round of review comments.

Aug 21 2019, 8:21 AM · Restricted Project

Aug 14 2019

bmahjour added a comment to D65350: [DDG] Data Dependence Graph Basics.

A friendly reminder to kindly review and provide comments/approval. Thank you!

Aug 14 2019, 10:43 AM · Restricted Project