mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
Fix an extremely serious regression that was causing LLVM basic blocks to be
scrambled around almost at random, having really bad effects on icache locality. llvm-svn: 15225
This commit is contained in:
parent
e643adb9e5
commit
1bb4db76b2
@ -383,6 +383,12 @@ static BasicBlock *getBBVal(const ValID &ID, bool isDefinition = false) {
|
||||
ThrowException("Redefinition of label " + ID.getName());
|
||||
|
||||
ID.destroy(); // Free strdup'd memory.
|
||||
|
||||
// Make sure to move the basic block to the correct location in the
|
||||
// function, instead of leaving it inserted wherever it was first
|
||||
// referenced.
|
||||
CurFun.CurrentFunction->getBasicBlockList().remove(BB);
|
||||
CurFun.CurrentFunction->getBasicBlockList().push_back(BB);
|
||||
return BB;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user