OSDN Git Service

[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)
commit457b8b54363afdcd10199f70836ca623720349ab
treeb0ffdfd6c79c2496445e8d5241cf6badee81e1fd
parent73e0892707fe1b442a14aee417474fb66224556d
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327646 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/EarlyCSE.cpp
test/Transforms/EarlyCSE/invariant-loads.ll