[llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JIT.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Nov 15 15:18:23 PST 2004
Changes in directory llvm/lib/ExecutionEngine/JIT:
JIT.cpp updated: 1.46 -> 1.47
---
Log message:
There is no reason to try to materialize the function from bytecode if it
already has been. This may be a small speedup.
---
Diffs of the changes: (+12 -9)
Index: llvm/lib/ExecutionEngine/JIT/JIT.cpp
diff -u llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.46 llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.47
--- llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.46 Sun Nov 7 17:58:46 2004
+++ llvm/lib/ExecutionEngine/JIT/JIT.cpp Mon Nov 15 17:18:09 2004
@@ -239,15 +239,18 @@
return Addr; // Check if function already code gen'd
// Make sure we read in the function if it exists in this Module
- try {
- MP->materializeFunction(F);
- } catch ( std::string& errmsg ) {
- std::cerr << "Error reading bytecode file: " << errmsg << "\n";
- abort();
- } catch (...) {
- std::cerr << "Error reading bytecode file!\n";
- abort();
- }
+ if (F->hasNotBeenReadFromBytecode())
+ try {
+ MP->materializeFunction(F);
+ } catch ( std::string& errmsg ) {
+ std::cerr << "Error reading function '" << F->getName()
+ << "' from bytecode file: " << errmsg << "\n";
+ abort();
+ } catch (...) {
+ std::cerr << "Error reading function '" << F->getName()
+ << "from bytecode file!\n";
+ abort();
+ }
if (F->isExternal()) {
void *Addr = getPointerToNamedFunction(F->getName());
More information about the llvm-commits
mailing list