mirror of
https://github.com/RPCSX/llvm.git
synced 2025-03-06 03:47:44 +00:00
MemorySSA: Fix and use optimized_def_chain
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299566 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3282f4edba
commit
5def10a6fc
@ -1108,7 +1108,7 @@ upward_defs(const MemoryAccessPair &Pair) {
|
||||
/// thing that would clobber the same memory is, you want the optimized chain.
|
||||
template <class T, bool UseOptimizedChain = false>
|
||||
struct def_chain_iterator
|
||||
: public iterator_facade_base<def_chain_iterator<T>,
|
||||
: public iterator_facade_base<def_chain_iterator<T, UseOptimizedChain>,
|
||||
std::forward_iterator_tag, MemoryAccess *> {
|
||||
def_chain_iterator() : MA(nullptr) {}
|
||||
def_chain_iterator(T MA) : MA(MA) {}
|
||||
|
@ -1986,7 +1986,7 @@ bool NewGVN::singleReachablePHIPath(const MemoryAccess *First,
|
||||
if (MSSA->isLiveOnEntryDef(First))
|
||||
return false;
|
||||
const auto *EndDef = First;
|
||||
for (auto *ChainDef : def_chain(First)) {
|
||||
for (auto *ChainDef : optimized_def_chain(First)) {
|
||||
if (ChainDef == Second)
|
||||
return true;
|
||||
if (MSSA->isLiveOnEntryDef(ChainDef))
|
||||
|
Loading…
x
Reference in New Issue
Block a user