mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 11:02:59 +02:00
Only insert into definingblocks once per block
llvm-svn: 260013
This commit is contained in:
parent
c7e8ed93d3
commit
3546e6c894
@ -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