mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-16 16:37:42 +00:00
Only insert into definingblocks once per block
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260013 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f21f097a73
commit
6d8a11a537
@ -253,17 +253,20 @@ MemorySSAWalker *MemorySSA::buildMemorySSA(AliasAnalysis *AA,
|
||||
// Go through each block, figure out where defs occur, and chain together all
|
||||
// the accesses.
|
||||
for (BasicBlock &B : F) {
|
||||
bool InsertIntoDef = false;
|
||||
AccessListType *Accesses = nullptr;
|
||||
for (Instruction &I : B) {
|
||||
MemoryAccess *MA = createNewAccess(&I, true);
|
||||
if (!MA)
|
||||
continue;
|
||||
if (isa<MemoryDef>(MA))
|
||||
DefiningBlocks.insert(&B);
|
||||
InsertIntoDef = true;
|
||||
if (!Accesses)
|
||||
Accesses = getOrCreateAccessList(&B);
|
||||
Accesses->push_back(MA);
|
||||
}
|
||||
if (InsertIntoDef)
|
||||
DefiningBlocks.insert(&B);
|
||||
}
|
||||
|
||||
// Determine where our MemoryPhi's should go
|
||||
|
Loading…
Reference in New Issue
Block a user