mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-03 11:08:32 +00:00
There is no reason to try to materialize the function from bytecode if it
already has been. This may be a small speedup. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17863 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5aa3ed92de
commit
0050ef8319
@ -239,13 +239,16 @@ void *JIT::getPointerToFunction(Function *F) {
|
|||||||
return Addr; // Check if function already code gen'd
|
return Addr; // Check if function already code gen'd
|
||||||
|
|
||||||
// Make sure we read in the function if it exists in this Module
|
// Make sure we read in the function if it exists in this Module
|
||||||
|
if (F->hasNotBeenReadFromBytecode())
|
||||||
try {
|
try {
|
||||||
MP->materializeFunction(F);
|
MP->materializeFunction(F);
|
||||||
} catch ( std::string& errmsg ) {
|
} catch ( std::string& errmsg ) {
|
||||||
std::cerr << "Error reading bytecode file: " << errmsg << "\n";
|
std::cerr << "Error reading function '" << F->getName()
|
||||||
|
<< "' from bytecode file: " << errmsg << "\n";
|
||||||
abort();
|
abort();
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
std::cerr << "Error reading bytecode file!\n";
|
std::cerr << "Error reading function '" << F->getName()
|
||||||
|
<< "from bytecode file!\n";
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user