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.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
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? |
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 Jingyue, can you commit this change? I don't have write access to the repo yet.
Regards,
I may be missing something. Why not calling unifySubscriptType(Pairs[SJ]) here? Do we have to unify the subscript types across the entire group?