hanchenye-llvm-project/llvm
Zachary Turner 95c625ecc9 Make BinaryStreamReader::readCString a bit faster.
Previously it would do a character by character search for a null
terminator, to account for the fact that an arbitrary stream need not
store its data contiguously so you couldn't just do a memchr. However, the
stream API has a function which will return the longest contiguous chunk
without doing a copy, and by using this function we can do a memchr on the
individual chunks. For certain types of streams like data from object
files etc, this is guaranteed to find the null terminator with only a
single memchr, but even with discontiguous streams such as
MappedBlockStream, it's rare that any given string will cross a block
boundary, so even those will almost always be satisfied with a single
memchr.

This optimization is worth a 10-12% reduction in link time (4.2 seconds ->
3.75 seconds)

Differential Revision: https://reviews.llvm.org/D33503

llvm-svn: 303918
2017-05-25 21:12:27 +00:00
..
bindings
cmake CMake: Fix docs-llvm-man target when clang+llvm is in the same source tree 2017-05-15 09:34:23 +00:00
docs Update the documentation and CMake file for Visual Studio generators. 2017-05-25 21:01:30 +00:00
examples [Kaleidoscope] toy.cpp use after move fix 2017-05-07 11:00:01 +00:00
include [pdb] pad source file name buffer at the end instead of the beginning 2017-05-25 21:12:15 +00:00
lib Make BinaryStreamReader::readCString a bit faster. 2017-05-25 21:12:27 +00:00
projects Add temporary workaround to allow in-tree libc++ builds on Windows 2017-05-11 01:44:30 +00:00
resources
runtimes
test [pdb] pad source file name buffer at the end instead of the beginning 2017-05-25 21:12:15 +00:00
tools [llvm-pdbdump] [yaml2pdb] always include object file name in module info 2017-05-25 18:04:17 +00:00
unittests Fix a bug in MappedBlockStream. 2017-05-25 21:12:00 +00:00
utils Fixed nondeterminism in RuleMatcher::emit. 2017-05-25 01:51:53 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt Update the documentation and CMake file for Visual Studio generators. 2017-05-25 21:01:30 +00:00
CODE_OWNERS.TXT
CREDITS.TXT update of the url 2017-05-14 07:55:01 +00:00
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.