This is an archive of the discontinued LLVM Phabricator instance.

[DependenceAnalysis] Extend unifySubscriptType for handling coupled subscript groups.
ClosedPublic

Authored by vaivaswatha on May 12 2015, 2:47 AM.

Details

Summary

In continuation to an earlier commit to DependenceAnalysis.cpp by jingyue (r222100), the type for all subscripts in a coupled group need to be the same since constraints from one subscript may be propagated to another during testing. During testing, new SCEVs may be created and the operands for these need to be the same.
This patch extends unifySubscriptType() to work on lists of subscript pairs, ensuring a common extended type for all of them.

Diff Detail

Repository
rL LLVM

Event Timeline

vaivaswatha retitled this revision from to [DependenceAnalysis] Extend unifySubscriptType for handling coupled subscript groups..
vaivaswatha updated this object.
vaivaswatha edited the test plan for this revision. (Show Details)
vaivaswatha added reviewers: spop, sebpop, jingyue.
vaivaswatha set the repository for this revision to rL LLVM.
vaivaswatha added a subscriber: Unknown Object (MLST).
jingyue added inline comments.May 12 2015, 5:04 PM
lib/Analysis/DependenceAnalysis.cpp
3599

I may be missing something. Why not calling unifySubscriptType(Pairs[SJ]) here? Do we have to unify the subscript types across the entire group?

vaivaswatha added a comment.EditedMay 12 2015, 9:29 PM

I may be missing something. Why not calling unifySubscriptType(Pairs[SJ]) here? Do we have to unify the subscript types across the entire group?

Thats right. All subscripts across the entire group need to have the same
type. This is because when testing coupled groups, the information obtained
by testing one subscript (constraints) may be propagated to another
subscript in the group. These constraints are used when testing the other
subscript, and at this point, different SCEVs may be created, all of which
need to have the same operand type.

So in short, its not just within a pair, but also across pairs in a coupled
group that the type must match. Hence the extension of unifySubscriptType().

Hi, a gentle reminder. Can anybody review this change?

Thanks.

jingyue accepted this revision.May 27 2015, 3:12 PM
jingyue edited edge metadata.

LGTM

This revision is now accepted and ready to land.May 27 2015, 3:12 PM

LGTM

Hi Jingyue, can you commit this change? I don't have write access to the repo yet.

Regards,

jingyue closed this revision.May 29 2015, 10:01 AM

Done.

Thank you very much.