Let MemoryAccess remember its purpose
commitb12e64ab5be9dcc86c2999bebf2f43b5a1088984
authorMichael Kruse <llvm@meinersbur.de>
Fri, 25 Sep 2015 21:21:00 +0000 (25 21:21 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Fri, 25 Sep 2015 21:21:00 +0000 (25 21:21 +0000)
tree98e2dad65b64a8c5d58a41ff4b0d3a68342b3918
parentb7be439706b605fe6aa84cbc24d25f0dd68deaa6
Let MemoryAccess remember its purpose

There are three possible reasons to add a memory memory access: For explicit load and stores, for llvm::Value defs/uses, and to emulate PHI nodes (the latter two called implicit accesses). Previously MemoryAccess only stored IsPHI. Register accesses could be identified through the isScalar() method if it was no IsPHI. isScalar() determined the number of dimensions of the underlaying array, scalars represented by zero dimensions.

For the work on de-LICM, implicit accesses can have more than zero dimensions, making the distinction of isScalars() useless, hence now stored explicitly in the MemoryAccess. Instead, we replace it by isImplicit() and avoid the term scalar for zero-dimensional arrays as it might be confused with llvm::Value which are also often referred to as scalars (or alternatively, as registers).

No behavioral change intended, under the condition that it was impossible to create explicit accesses to zero-dimensional "arrays".

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@248616 91177308-0d34-0410-b5e6-96231b3b80d8
include/polly/ScopInfo.h
lib/Analysis/ScopInfo.cpp
lib/CodeGen/BlockGenerators.cpp
lib/CodeGen/IslNodeBuilder.cpp