[EarlyCSE] Reuse invariant scopes for invariant load
authorPhilip Reames <listmail@philipreames.com>
Thu, 15 Mar 2018 17:29:32 +0000 (17:29 +0000)
committerPhilip Reames <listmail@philipreames.com>
Thu, 15 Mar 2018 17:29:32 +0000 (17:29 +0000)
commitca587fe0b4749b5ffca8cfc8358ea4602e435bb7
tree241736b9b956b7c7a9dfaab6df9bfae2c0126040
parent8e53917a26ad7504dfd6b1c956100c6b43433125
[EarlyCSE] Reuse invariant scopes for invariant load

This is a follow up to https://reviews.llvm.org/D43716 which rewrites the invariant load handling using the new infrastructure. It's slightly more powerful, but only in somewhat minor ways for the moment. It's not clear that DSE of stores to invariant locations is actually interesting since why would your IR have such a construct to start with?

Note: The submitted version is slightly different than the reviewed one.  I realized the scope could start for an invariant load which was proven redundant and removed.  Added a test case to illustrate that as well.

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

llvm-svn: 327646
llvm/lib/Transforms/Scalar/EarlyCSE.cpp
llvm/test/Transforms/EarlyCSE/invariant-loads.ll