BlockGenerator: remove dead instructions in normal statements
authorTobias Grosser <tobias@grosser.es>
Thu, 21 Jul 2016 11:48:36 +0000 (11:48 +0000)
committerTobias Grosser <tobias@grosser.es>
Thu, 21 Jul 2016 11:48:36 +0000 (11:48 +0000)
commit9d12d8ade38c1975b68c450208b734f66637c068
tree26de4eb6439f5401565e5b8cabfc6d06fc00499b
parent212469e0eda1534d07a3ff39d7e2b8e13a4ee6c3
BlockGenerator: remove dead instructions in normal statements

This ensures that no trivially dead code is generated. This is not only cleaner,
but also avoids troubles in case code is generated in a separate function and
some of this dead code contains references to values that are not available.
This issue may happen, in case the memory access functions have been updated
and old getelementptr instructions remain in the code. With normal Polly,
a test case is difficult to draft, but the upcoming GPU code generation can
possibly trigger such problems. We will later extend this dead-code elimination
to region and vector statements.

llvm-svn: 276263
polly/include/polly/CodeGen/BlockGenerators.h
polly/lib/CodeGen/BlockGenerators.cpp
polly/test/ScopInfo/int2ptr_ptr2int_2.ll