[llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y
Chris Lattner
lattner at cs.uiuc.edu
Sun Jul 25 18:23:09 PDT 2004
Changes in directory llvm/lib/AsmParser:
llvmAsmParser.y updated: 1.193 -> 1.194
---
Log message:
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.
---
Diffs of the changes: (+6 -0)
Index: llvm/lib/AsmParser/llvmAsmParser.y
diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.193 llvm/lib/AsmParser/llvmAsmParser.y:1.194
--- llvm/lib/AsmParser/llvmAsmParser.y:1.193 Sun Jul 25 16:30:51 2004
+++ llvm/lib/AsmParser/llvmAsmParser.y Sun Jul 25 20:22:59 2004
@@ -383,6 +383,12 @@
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;
}
More information about the llvm-commits
mailing list