mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 13:11:39 +01:00
GVN-hoist: do not dereference null pointers
there may be basic blocks without memory accesses, in which case the list of accesses is a null pointer. llvm-svn: 282175
This commit is contained in:
parent
344cd70c0b
commit
2879352ee0
@ -338,6 +338,9 @@ private:
|
||||
bool ReachedNewPt = false;
|
||||
MemoryLocation DefLoc = MemoryLocation::get(OldPt);
|
||||
const MemorySSA::AccessList *Acc = MSSA->getBlockAccesses(BB);
|
||||
if (!Acc)
|
||||
return false;
|
||||
|
||||
for (const MemoryAccess &MA : *Acc) {
|
||||
auto *MU = dyn_cast<MemoryUse>(&MA);
|
||||
if (!MU)
|
||||
|
Loading…
x
Reference in New Issue
Block a user