[ScopBuilder] Build invariant loads separately.
commite636ee2abcaba77bca22160989b84613794cd62a
authorMichael Kruse <llvm@meinersbur.de>
Mon, 2 Oct 2017 11:41:27 +0000 (2 11:41 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Mon, 2 Oct 2017 11:41:27 +0000 (2 11:41 +0000)
tree94f0438ced0f13cbd888c9e74981254aa95ced16
parentc2669cdd6aef165ce6bca5b5b1c9443d61fe315b
[ScopBuilder] Build invariant loads separately.

Create the MemoryAccesses of invariant loads separately and before
all other MemoryAccesses.

Invariant loads are classified as synthesizable and therefore are not
contained in any statement. When iterating over all instructions of all
statements, the invariant loads are consequently not processed and
iterating over them separately becomes necessary.

This patch can change the order in which MemoryAccesses are created, but
otherwise has no functional change.

Some temporary code is introduced to ensure correctness, but will be
removed in the next commit.

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@314664 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ScopBuilder.cpp
test/ScopInfo/invariant_load_zext_parameter.ll
test/ScopInfo/multidim_2d_with_modref_call.ll
test/ScopInfo/multidim_2d_with_modref_call_2.ll
test/ScopInfo/multidim_fortran_2d_with_modref_call.ll