mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-13 08:35:46 +00:00
Fix a crash while promoting a value out of a loop from a global variable
when using ds-aa git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20802 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7d671b88e8
commit
c5132e65a6
@ -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…
x
Reference in New Issue
Block a user