diff options
author | Rui Ueyama <ruiu@google.com> | 2017-10-31 17:37:20 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2017-10-31 17:37:20 +0000 |
commit | 412b29e4ed2aa2d62ef6e5abfc269ff265dc0d85 (patch) | |
tree | fffc5eb46d288de193fa2176475b29f6bffb4bb4 /llvm/lib/Transforms/Utils/SimplifyIndVar.cpp | |
parent | 50baa593f1b5bcc014e855b81f0936190b12a9b4 (diff) | |
download | llvm-412b29e4ed2aa2d62ef6e5abfc269ff265dc0d85.zip llvm-412b29e4ed2aa2d62ef6e5abfc269ff265dc0d85.tar.gz llvm-412b29e4ed2aa2d62ef6e5abfc269ff265dc0d85.tar.bz2 |
[Support] Make the default chunk size of raw_fd_ostream to 1 GiB.
Previously, we call write(2) for each 32767 byte chunk. That is not
efficient because Linux can handle much larger write requests.
This patch changes the chunk size on Linux to 1 GiB.
This patch also changes the default chunks size to SSIZE_MAX. I think
that doesn't in practice change this function's behavior on any operating
system because SSIZE_MAX on 64-bit machine is unrealistically large,
and writing 2 GiB (SSIZE_MAX on 32-bit) on a 32-bit machine by a single
call of write(2) is also unrealistic, as the userspace is usually
limited to 2 GiB. That said, it is in general a good thing to do because
a write larger than SSIZE_MAX is implementation-defined in POSIX.
Differential Revision: https://reviews.llvm.org/D39444
llvm-svn: 317015
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyIndVar.cpp')
0 files changed, 0 insertions, 0 deletions