yvvan created this revision. Memory mapping does not make llvm faster (at least I don't see any difference). It also allows llvm not to lock files which is sometimes quite important.
https://reviews.llvm.org/D35200 Files: lib/Support/MemoryBuffer.cpp Index: lib/Support/MemoryBuffer.cpp =================================================================== --- lib/Support/MemoryBuffer.cpp +++ lib/Support/MemoryBuffer.cpp @@ -284,6 +284,10 @@ bool RequiresNullTerminator, int PageSize, bool IsVolatile) { +#ifdef _WIN32 + // Do not use mmap on Windows in order to avoid file locking + return false; +#endif // mmap may leave the buffer without null terminator if the file size changed // by the time the last page is mapped in, so avoid it if the file size is // likely to change.
Index: lib/Support/MemoryBuffer.cpp =================================================================== --- lib/Support/MemoryBuffer.cpp +++ lib/Support/MemoryBuffer.cpp @@ -284,6 +284,10 @@ bool RequiresNullTerminator, int PageSize, bool IsVolatile) { +#ifdef _WIN32 + // Do not use mmap on Windows in order to avoid file locking + return false; +#endif // mmap may leave the buffer without null terminator if the file size changed // by the time the last page is mapped in, so avoid it if the file size is // likely to change.
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits