[PATCH] D52620: Added Support for StatOnly Files in VFS.

2018-10-01 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. > I would call it a requirement instead of an assumption. The replay must be > exactly the same (even the file stats and reads). If Clang reads the file in > replay which was only stat()ed during compilation, it indicates > non-determinism or something wrong (in c

[PATCH] D52620: Added Support for StatOnly Files in VFS.

2018-09-28 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 added inline comments. Comment at: lib/Basic/VirtualFileSystem.cpp:2097 void YAMLVFSWriter::write(llvm::raw_ostream &OS) { - llvm::sort(Mappings, [](const YAMLVFSEntry &LHS, const YAMLVFSEntry &RHS) { + llvm::sort(Mappings.begin(), Mappings.end(), + [](co

[PATCH] D52620: Added Support for StatOnly Files in VFS.

2018-09-28 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 added a comment. > it sounds like this is for record-replay. Yes this is for record-replay purpose. > What are these files in practice? During loading a modules the files that were required to make the module are stat()ed and their sizes are used to verify that the module is still va

[PATCH] D52620: Added Support for StatOnly Files in VFS.

2018-09-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: lib/Basic/VirtualFileSystem.cpp:2097 void YAMLVFSWriter::write(llvm::raw_ostream &OS) { - llvm::sort(Mappings, [](const YAMLVFSEntry &LHS, const YAMLVFSEntry &RHS) { + llvm::sort(Mappings.begin(), Mappings.end(), + [](con

[PATCH] D52620: Added Support for StatOnly Files in VFS.

2018-09-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Could you give some more detail about what this is for? - it sounds like this is for record-replay. In the replayed compilation, we assume the accessed files are the same, is it safe to assume we never read files we previously stat()ed? What are these files in practic

[PATCH] D52620: Added Support for StatOnly Files in VFS.

2018-09-27 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 created this revision. Herald added subscribers: cfe-commits, mgrang. Some files are only Statted by Clang and not read. Clang mostly uses them for checking the existence of some files and in rare cases uses the value of the Status to proceed further (for example while loading module fil