mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Fix a bug that was causing several miscompilations on SPEC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40746 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -111,19 +111,31 @@ void MemoryDependenceAnalysis::nonLocalHelper(Instruction* query,
|
||||
while (!stack.empty()) {
|
||||
BasicBlock* BB = stack.back();
|
||||
|
||||
visited.insert(BB);
|
||||
|
||||
if (resp.count(BB)) {
|
||||
if (visited.count(BB)) {
|
||||
stack.pop_back();
|
||||
continue;
|
||||
}
|
||||
|
||||
if (BB != block) {
|
||||
visited.insert(BB);
|
||||
|
||||
Instruction* localDep = getDependency(query, 0, BB);
|
||||
if (localDep != NonLocal) {
|
||||
resp.insert(std::make_pair(BB, localDep));
|
||||
stack.pop_back();
|
||||
|
||||
continue;
|
||||
}
|
||||
} else if (BB == block && stack.size() > 1) {
|
||||
visited.insert(BB);
|
||||
|
||||
Instruction* localDep = getDependency(query, 0, BB);
|
||||
if (localDep != query)
|
||||
resp.insert(std::make_pair(BB, localDep));
|
||||
|
||||
stack.pop_back();
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
bool predOnStack = false;
|
||||
|
Reference in New Issue
Block a user