mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
'Tis quite silly to check for a cached version of the entire executable. That
amounts to checking for a completely-native version. We'll cache on a function-by-function basis instead (in the JIT's CodeEmitter). llvm-svn: 9894
This commit is contained in:
parent
aaa29b094d
commit
fd7a4f1337
@ -5,7 +5,6 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "OSInterface.h"
|
||||
#include "SysUtils.h"
|
||||
#include "Config/errno.h"
|
||||
#include "Config/stdlib.h"
|
||||
@ -52,21 +51,6 @@ int execve(const char *filename, char *const argv[], char *const envp[])
|
||||
close(file);
|
||||
if (bytesRead != (ssize_t)headerSize) return EIO;
|
||||
if (!memcmp(llvmHeader, header, headerSize)) {
|
||||
/*
|
||||
* Check if we have a cached translation on disk
|
||||
*/
|
||||
struct stat buf;
|
||||
llvmStat(realFilename, &buf);
|
||||
if (isExecutable(&buf)) {
|
||||
size_t size;
|
||||
void *fileAddr = llvmReadFile(realFilename, &size);
|
||||
fprintf(stderr, "Found in cache: '%s'\n", realFilename);
|
||||
if (fileAddr) {
|
||||
free(fileAddr);
|
||||
}
|
||||
llvmExecve(realFilename, argv, envp);
|
||||
}
|
||||
|
||||
/*
|
||||
* This is a bytecode file, so execute the JIT with the program and
|
||||
* parameters.
|
||||
|
Loading…
Reference in New Issue
Block a user