llvm-project/llvm
Fangrui Song 0db402c5b4 [lld] Buffer writes when composing a single diagnostic
llvm::errs() is unbuffered. On a POSIX platform, composing a diagnostic
string may invoke the ::write syscall multiple times, which can be slow.
Buffer writes to a temporary SmallString when composing a single diagnostic to
reduce the number of ::write syscalls to one (also easier to read under
strace/truss).

For an invocation of ld.lld with 62000+ lines of
`ld.lld: warning: symbol ordering file: no such symbol: ` warnings (D87121),
the buffering decreases the write time from 1s to 0.4s (for /dev/tty) and
from 0.4s to 0.1s (for a tmpfs file). This can speed up
`relocation R_X86_64_PC32 out of range` diagnostic printing as well
with `--noinhibit-exec --no-fatal-warnings`.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D87272
2021-09-09 09:27:14 -07:00
..
benchmarks
bindings [NFC][C API] Make LLVMSetInstrParamAlignment's index param type LLVMAttributeIndex 2021-09-07 15:13:45 -07:00
cmake [CMake] Don't add -Wnon-virtual-dtor if affected by GCC PR102168 2021-09-07 23:36:47 -07:00
docs [ObjC][ARC] Use the addresses of the ARC runtime functions instead of 2021-09-08 11:58:03 -07:00
examples [examples] Fix Kaleidoscope for Windows 2021-08-19 13:20:51 +10:00
include [lld] Buffer writes when composing a single diagnostic 2021-09-09 09:27:14 -07:00
lib [SystemZ] [NFC] Add SystemZELFFrameLowering and SystemZXPLINKFrameLowering classes. 2021-09-09 12:23:40 -04:00
projects
resources
runtimes [libomptarget][amdcgn] Only add opt/llvm-link dependency if TARGET is available 2021-08-30 17:32:11 +02:00
test [WebAssembly] Add explict TLS symbol flag 2021-09-09 10:03:30 -04:00
tools [yaml2obj][COFF] Allow variable number of directories 2021-09-09 11:16:56 +01:00
unittests [APInt.h] Reduce the APInt header file interface a bit. NFC 2021-09-08 18:17:07 -07:00
utils [gn build] Port b1fb3d75c9 2021-09-09 15:10:21 +00:00
.clang-format
.clang-tidy
.gitattributes Fix: [MCParser] Correctly handle CRLF line ends when consuming line comments 2021-08-17 16:16:19 +01:00
.gitignore
CMakeLists.txt [CMake] Add targets for generating coverage reports 2021-09-03 10:45:55 -05:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

The LLVM Compiler Infrastructure
================================

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.