[llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Mon May 24 14:46:04 PDT 2004
Changes in directory llvm-java/lib/Compiler:
Compiler.cpp updated: 1.14 -> 1.15
---
Log message:
Fix bug in bytecode->BasicBlock mapping creation.
---
Diffs of the changes: (+4 -6)
Index: llvm-java/lib/Compiler/Compiler.cpp
diff -u llvm-java/lib/Compiler/Compiler.cpp:1.14 llvm-java/lib/Compiler/Compiler.cpp:1.15
--- llvm-java/lib/Compiler/Compiler.cpp:1.14 Mon May 24 13:37:16 2004
+++ llvm-java/lib/Compiler/Compiler.cpp Mon May 24 14:43:30 2004
@@ -50,7 +50,6 @@
bc2bbMap_.clear();
bc2bbMap_.assign(codeAttr.getCodeSize(), NULL);
- bc2bbMap_[0] = new BasicBlock("entry", &function);
const uint8_t* code = codeAttr.getCode();
for (unsigned i = 0; i < codeAttr.getCodeSize(); ++i) {
@@ -161,13 +160,12 @@
}
}
- unsigned i = 0;
- BasicBlock* bb = bc2bbMap_[i];
- while (++i < codeAttr.getCodeSize()) {
+ BasicBlock* bb = new BasicBlock("entry", &function);
+ for (unsigned i = 0; i < codeAttr.getCodeSize(); ++i) {
if (bc2bbMap_[i])
- bc2bbMap_[i] = bb;
- else
bb = bc2bbMap_[i];
+ else
+ bc2bbMap_[i] = bb;
}
}
More information about the llvm-commits
mailing list