This is an archive of the discontinued LLVM Phabricator instance.

[Polly][IslAst] Fix minimal dependence distance.
ClosedPublic

Authored by huihuiz on Apr 3 2018, 4:04 PM.

Details

Summary

When checking the parallelism of a scheduling dimension, we first check if excluding reduction dependences the loop is parallel or not.
If the loop is not parallel, then we need to return the minimal dependence distance of all data dependences, including the previously subtracted reduction dependences.

Diff Detail

Repository
rL LLVM

Event Timeline

huihuiz created this revision.Apr 3 2018, 4:04 PM
Meinersbur accepted this revision.Apr 3 2018, 4:34 PM

LGTM

Do you need someone to commit?

This revision is now accepted and ready to land.Apr 3 2018, 4:34 PM
Meinersbur added inline comments.Apr 3 2018, 4:36 PM
test/Isl/Ast/dependence_distance_minimal.ll
23–56 ↗(On Diff #140877)

Could you run the -instnamer pass on this? Should make the statement names checked in the AST more stable.

huihuiz updated this revision to Diff 140886.Apr 3 2018, 4:48 PM
huihuiz marked an inline comment as done.

add -instnamer to unit test

LGTM

Do you need someone to commit?

Thank you so much!
I have commit right, hang in there, I should be committing soon.

Meinersbur added inline comments.Apr 3 2018, 5:53 PM
test/Isl/Ast/dependence_distance_minimal.ll
1 ↗(On Diff #140886)

Sorry, this is not what I meant.

The instructions and BasicBlocks in this .ll file have no names, making LLVM assigning numeric "names" on the fly. Such ids are instable, and without result in different statement names for statements (Stmt1 and Stmt1_b) depending on -polly-use-llvm-names and iteration order.
Please regenerate this files _with_ string names which fixes those names to those in this file. The -instnamer pass automatically assigns string names, so you can just run this file through opt -instnamer and get a new file with instruction names.

huihuiz updated this revision to Diff 140893.Apr 3 2018, 6:23 PM
huihuiz marked an inline comment as not done.

addressing review comments

This revision was automatically updated to reflect the committed changes.

addressing review comments

Thank you.