[DependenceAnalysis] Extend unifySubscriptType for handling coupled subscript groups.
authorJingyue Wu <jingyue@google.com>
Fri, 29 May 2015 16:58:08 +0000 (16:58 +0000)
committerJingyue Wu <jingyue@google.com>
Fri, 29 May 2015 16:58:08 +0000 (16:58 +0000)
commited0d841f595d79e338c6cb4500a4faa231670af3
treeb736035c7fb5f9329506f64d110edda134293b95
parent616c7afb7008b365463e0495ba8c1ec925f10ce4
[DependenceAnalysis] Extend unifySubscriptType for handling coupled subscript groups.

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.

Test Plan:
Added a test case to NonCanonicalizedSubscript.ll which causes dependence analysis to crash without this fix.

All regression tests pass.

Reviewers: spop, sebpop, jingyue

Reviewed By: jingyue

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9698

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238573 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/DependenceAnalysis.h
lib/Analysis/DependenceAnalysis.cpp
test/Analysis/DependenceAnalysis/NonCanonicalizedSubscript.ll