[SimpleLoopUnswitch] Early check exit for trivial unswitch with MemorySSA.
authorAlina Sbirlea <asbirlea@google.com>
Mon, 28 Jan 2019 17:48:45 +0000 (17:48 +0000)
committerAlina Sbirlea <asbirlea@google.com>
Mon, 28 Jan 2019 17:48:45 +0000 (17:48 +0000)
commit932108703a26491d4bda6723c1049fd50702d44d
tree3fa7922076b222abf47d03cfe552e4af465cdf31
parent3720e2b39e4be7db2a62ff4447502e61f3681b59
[SimpleLoopUnswitch] Early check exit for trivial unswitch with MemorySSA.

Summary:
If MemorySSA is avaiable, we can skip checking all instructions if block has any Defs.
(volatile loads are also Defs).
We still need to check all instructions for "canThrow", even if no Defs are found.

Reviewers: chandlerc

Subscribers: sanjoy, jlebar, Prazek, george.burgess.iv, llvm-commits

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

llvm-svn: 352393
llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp