mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-20 19:42:54 +02:00
Fix a crash while promoting a value out of a loop from a global variable
when using ds-aa llvm-svn: 20802
This commit is contained in:
parent
586f97a8b6
commit
120bfecc01
@ -527,5 +527,14 @@ void BUDataStructures::copyValue(Value *From, Value *To) {
|
||||
return;
|
||||
}
|
||||
|
||||
assert(!isa<GlobalVariable>(From) && "Do not know how to copy GV's yet!");
|
||||
if (const Function *F = getFnForValue(To)) {
|
||||
DSGraph &G = getDSGraph(*F);
|
||||
G.getScalarMap().copyScalarIfExists(From, To);
|
||||
return;
|
||||
}
|
||||
|
||||
std::cerr << *From;
|
||||
std::cerr << *To;
|
||||
assert(0 && "Do not know how to copy this yet!");
|
||||
abort();
|
||||
}
|
||||
|
@ -468,5 +468,14 @@ void TDDataStructures::copyValue(Value *From, Value *To) {
|
||||
return;
|
||||
}
|
||||
|
||||
assert(!isa<GlobalVariable>(From) && "Do not know how to copy GV's yet!");
|
||||
if (const Function *F = getFnForValue(To)) {
|
||||
DSGraph &G = getDSGraph(*F);
|
||||
G.getScalarMap().copyScalarIfExists(From, To);
|
||||
return;
|
||||
}
|
||||
|
||||
std::cerr << *From;
|
||||
std::cerr << *To;
|
||||
assert(0 && "Do not know how to copy this yet!");
|
||||
abort();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user