[asan] Improve moving of non-instrumented allocas
authorKuba Brecka <kuba.brecka@gmail.com>
Wed, 22 Jul 2015 10:25:38 +0000 (10:25 +0000)
committerKuba Brecka <kuba.brecka@gmail.com>
Wed, 22 Jul 2015 10:25:38 +0000 (10:25 +0000)
commita5812d5bbf0a13190b48ac9819ab940e68762239
tree8c4faff3e6beb2cebca1d8b0ad70c4f641ff6f27
parentf020cb2f752306fa733455085f577e8043de167f
[asan] Improve moving of non-instrumented allocas

In r242510, non-instrumented allocas are now moved into the first basic block.  This patch limits that to only move allocas that are present *after* the first instrumented one (i.e. only move allocas up).  A testcase was updated to show behavior in these two cases.  Without the patch, an alloca could be moved down, and could cause an invalid IR.

Differential Revision: http://reviews.llvm.org/D11339

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242883 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Instrumentation/AddressSanitizer.cpp
test/Instrumentation/AddressSanitizer/debug_info_noninstrumented_alloca.ll