Introduce VirtualUse. NFC.
commit3a38d40c2d5f2051c573fd4a850304a8bebab98f
authorMichael Kruse <llvm@meinersbur.de>
Thu, 4 May 2017 15:22:57 +0000 (4 15:22 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Thu, 4 May 2017 15:22:57 +0000 (4 15:22 +0000)
tree09f2f14848038a6afda6af1457dccd04527787b1
parentcfd9eee0bcb8e6347723aa7bf3773a95bc752dc0
Introduce VirtualUse. NFC.

If a ScopStmt references a (scalar) value, there are multiple
possibilities where this value can come. The decision about what kind of
use it is must be handled consistently at different places, which can be
error-prone. VirtualUse is meant to centralize the handling of the
different types of value uses.

This patch makes ScopBuilder and CodeGeneration use VirtualUse. This
already helps to show inconsistencies with the value handling. In order
to keep this patch NFC, exceptions to the general rules are added.
These might be fixed later if they turn to problems. Overall, this
should result in fewer post-codegen IR-verification errors, but instead
assertion failures in `getNewValue` that are closer to the actual error.

Differential Revision: https://reviews.llvm.org/D32667

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@302157 91177308-0d34-0410-b5e6-96231b3b80d8
include/polly/Support/VirtualInstruction.h [new file with mode: 0644]
lib/Analysis/ScopBuilder.cpp
lib/CMakeLists.txt
lib/CodeGen/BlockGenerators.cpp
lib/Support/VirtualInstruction.cpp [new file with mode: 0644]