Delinearize memory accesses that reference parameters coming from function calls
authorTobias Grosser <tobias@grosser.es>
Sat, 27 May 2017 15:18:53 +0000 (15:18 +0000)
committerTobias Grosser <tobias@grosser.es>
Sat, 27 May 2017 15:18:53 +0000 (15:18 +0000)
commit1e55db30d520694104c21f9c337276865d46e772
treecdc738450d8044d7d8b7bb526f01e69976253f13
parentf5e7e60bc8dc362dd98107d6db41b9b758ecbf20
Delinearize memory accesses that reference parameters coming from function calls

Certain affine memory accesses which we model today might contain products of
parameters which we might combined into a new parameter to be able to create an
affine expression that represents these memory accesses. Especially in the
context of OpenCL, this approach looses information as memory accesses such as
A[get_global_id(0) * N + get_global_id(1)] are assumed to be linear. We
correctly recover their multi-dimensional structure by assuming that parameters
that are the result of a function call at IR level likely are not parameters,
but indeed induction variables. The resulting access is now
A[get_global_id(0)][get_global_id(1)] for an array A[][N].

llvm-svn: 304075
polly/include/polly/Support/SCEVValidator.h
polly/lib/Analysis/ScopBuilder.cpp
polly/lib/Analysis/ScopDetection.cpp
polly/lib/Support/SCEVValidator.cpp
polly/test/ScopInfo/constant_functions_multi_dim.ll [new file with mode: 0644]