1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/lib/Support
Dimitry Andric 4829f7d03a Implement computeHostNumHardwareThreads() for FreeBSD
This retrieves CPU affinity via FreeBSD's cpuset(2) API, and makes LLVM
respect affinity settings configured by the user via the cpuset(1)
command.

In particular, this allows to reduce the number of threads used on
machines with high core counts, which can interact badly with
parallelized build systems. This is particularly noticable with lld,
which spawns lots of threads even for linking e.g. hello_world!

This fix is related to PR48193, but does not adress the more fundamental
problem, which is that LLVM by default grabs as many CPUs and/or threads
as possible.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D92271
2020-11-29 00:49:39 +01:00
..
Unix Implement computeHostNumHardwareThreads() for FreeBSD 2020-11-29 00:49:39 +01:00
Windows Support: Avoid SmallVector::assign with a range from to-be-replaced vector in Windows GetExecutableName 2020-11-18 17:55:49 -08:00
AArch64TargetParser.cpp [AArch64] Add CPU Cortex-R82 2020-10-02 12:47:23 +01:00
ABIBreak.cpp Move LLVM_ENABLE_ABI_BREAKING_CHECKS variables to their own file 2019-09-10 22:05:01 +00:00
Allocator.cpp Revert "[Support] Explicitly instantiate BumpPtrAllocatorImpl" 2020-01-18 09:33:00 -08:00
AMDGPUMetadata.cpp AMDGPU: Remove .value_type from kernel metadata 2020-07-10 18:16:31 -04:00
APFixedPoint.cpp [Fixed Point] Add floating point methods to APFixedPoint. 2020-10-09 10:27:42 +02:00
APFloat.cpp Cleanup namespace comment to fix clang-tidy warning. NFCI. 2020-11-03 18:13:21 +00:00
APInt.cpp [APInt] Add the truncOrSelf resizing operator to APInt 2020-11-23 11:27:30 +00:00
APSInt.cpp ADT: Fix that APSInt's string constructor claims it requires 5 bits to store a zero 2020-06-10 16:36:33 +02:00
ARMAttributeParser.cpp [ARMAttributeParser] Correctly parse and print Tag_THUMB_ISA_use=3 2020-11-28 12:28:22 -08:00
ARMBuildAttrs.cpp [RISCV] ELF attribute section for RISC-V. 2020-03-31 16:16:19 +08:00
ARMTargetParser.cpp ARMTargetParser.cpp - use auto const references in for range loops. NFCI. 2020-09-09 11:38:31 +01:00
ARMWinEH.cpp
Atomic.cpp
BinaryStreamError.cpp
BinaryStreamReader.cpp BinaryStream - fix static analyzer warnings. NFCI. 2019-11-08 13:20:24 +00:00
BinaryStreamRef.cpp
BinaryStreamWriter.cpp
BlockFrequency.cpp
BranchProbability.cpp Make some static class members constexpr 2020-04-22 12:25:01 +02:00
BuryPointer.cpp
CachePruning.cpp CachePruning.h - reduce StringRef.h to Optional.h include. NFC 2020-05-08 14:06:53 +01:00
Chrono.cpp
circular_raw_ostream.cpp
CMakeLists.txt llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
CodeGenCoverage.cpp Introduce llvm::sys::Process::getProcessId() and adopt it 2020-04-16 15:05:37 +03:00
COM.cpp
CommandLine.cpp Fix bugs in EOL marking in command line tokenizers 2020-11-05 13:01:32 -08:00
Compression.cpp [CMake] Simplify CMake handling for zlib 2020-08-11 20:22:11 -07:00
ConvertUTF.cpp
ConvertUTFWrapper.cpp Reland "[Support][unittests] Enforce alignment in ConvertUTFTest" 2020-10-14 12:02:27 +02:00
COPYRIGHT.regex
CrashRecoveryContext.cpp [LLD] Fix include following 45b8a741fbbf271e0fb71294cb7cdce3ad4b9bf3 2020-11-12 08:32:16 -05:00
CRC.cpp [CMake] Simplify CMake handling for zlib 2020-08-11 20:22:11 -07:00
DAGDeltaAlgorithm.cpp
DataExtractor.cpp [Support] Make DataExtractor error messages more clear 2020-06-02 12:57:51 +02:00
Debug.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
DebugCounter.cpp DebugCounterList::printOptionInfo - use const auto& iterator in for-range-loop. 2020-07-09 11:37:49 +01:00
DeltaAlgorithm.cpp
DJB.cpp Revert "Forward declare Optional<T> in STLExtras.h" 2019-11-13 16:36:21 -08:00
DynamicLibrary.cpp
ELFAttributeParser.cpp [RISCV] Support RISC-V ELF attributes sections in llvm-readobj. 2020-04-01 21:50:11 +08:00
ELFAttributes.cpp [RISCV] ELF attribute section for RISC-V. 2020-03-31 16:16:19 +08:00
Errno.cpp
Error.cpp [Support] Add a C-API function to create a StringError instance. 2020-10-19 01:59:04 -07:00
ErrorHandling.cpp Improve error handling for SmallVector programming errors 2020-09-02 15:00:26 -07:00
ExtensibleRTTI.cpp [Support] Add missing files from e823068306e. 2020-04-13 13:30:45 -07:00
FileCollector.cpp [FileCollector] Move interface into FileCollectorBase (NFC) 2020-10-19 21:37:20 -07:00
FileOutputBuffer.cpp FileOutputBuffer.h - remove unused includes. NFC. 2020-05-28 14:38:12 +01:00
FileUtilities.cpp std::isspace -> llvm::isSpace (where locale should be ignored) 2020-05-02 15:36:04 +02:00
FoldingSet.cpp [Support] FoldingSetNodeID::AddString(): reserve memory 2020-06-08 23:26:54 +03:00
FormattedStream.cpp [Support] Fix signed/unsigned comparison warning 2020-07-08 11:26:10 +01:00
FormatVariadic.cpp [NFC] Simplify splitLiteralAndReplacement function 2020-07-22 15:32:32 -07:00
GlobPattern.cpp Revert rGca18ce1a00cd8b7cb7ce0e130440f5ae1ffe86ee "GlobPattern.h - remove unnecessary BitVector.h/StringRef.h includes. NFC" 2020-05-17 18:51:21 +01:00
GraphWriter.cpp Fix SelectionDAG Graph Printing on Windows 2020-05-05 17:01:05 -07:00
Hashing.cpp
Host.cpp [ARM][AArch64] Adding Neoverse N2 CPU support 2020-11-25 11:42:54 +00:00
InitLLVM.cpp llvm-ar: Fix MinGW compilation 2020-02-28 09:59:24 +01:00
IntEqClasses.cpp Explicitly include <cassert> when using assert 2020-03-02 22:45:28 +01:00
IntervalMap.cpp Explicitly include <cassert> when using assert 2020-03-02 22:45:28 +01:00
ItaniumManglingCanonicalizer.cpp ItaniumManglingCanonicalizer - reduce StringRef.h include to forward declaration + remove duplicate includes. NFC 2020-05-08 14:06:53 +01:00
JSON.cpp [json] Provide a means to delegate writing a value to another API 2020-10-07 18:31:45 +02:00
KnownBits.cpp [KnownBits] Combine abs() implementations 2020-11-13 22:23:50 +01:00
LEB128.cpp
LineIterator.cpp Support: Allow use of MemoryBufferRef with line_iterator 2020-10-13 16:43:49 -04:00
Locale.cpp
LockFileManager.cpp Introduce llvm::sys::Process::getProcessId() and adopt it 2020-04-16 15:05:37 +03:00
LowLevelType.cpp [SVE] Make ElementCount and TypeSize use a new PolySize class 2020-10-12 08:23:38 +01:00
ManagedStatic.cpp [Support] Replace sys::Mutex with their standard equivalents. 2019-08-19 19:49:57 +00:00
MathExtras.cpp
MD5.cpp Avoid SmallString.h include in MD5.h, NFC 2020-02-26 09:10:24 -08:00
MemAlloc.cpp Replicate attributes on definition to make MSVC less noisy 2020-04-25 02:02:00 +02:00
Memory.cpp
MemoryBuffer.cpp Revert "[Modules] Add stats to measure performance of building and loading modules." 2020-09-24 12:36:06 -07:00
MemoryBufferRef.cpp Support: Add operator== for MemoryBufferRef and split out MemoryBufferRef.h 2020-10-13 16:42:24 -04:00
NativeFormatting.cpp NativeFormatting.h - reduce raw_ostream.h include to forward declaration. NFC. 2020-05-09 13:32:14 +01:00
OptimizedStructLayout.cpp Rename OptimalLayout to OptimizedStructLayout at Chris's request. 2020-04-10 00:14:20 -04:00
Optional.cpp
Parallel.cpp [Support] Define llvm::parallel::strategy for -DLLVM_ENABLE_THREADS=off builds after D76885 2020-07-08 10:51:20 -07:00
Path.cpp [llvm] Use early exits and get rid of if-return-else-return pattern; NFC 2020-10-21 14:18:42 +02:00
PluginLoader.cpp
PrettyStackTrace.cpp Escape command line arguments in backtraces 2020-11-17 12:16:13 +00:00
Process.cpp [LLD] Fix include following 45b8a741fbbf271e0fb71294cb7cdce3ad4b9bf3 2020-11-12 08:32:16 -05:00
Program.cpp [Clang] Move clang::Job::printArg to llvm::sys::printArg. NFCI. 2020-06-18 09:17:13 -04:00
RandomNumberGenerator.cpp llvm-ar: Fix MinGW compilation 2020-02-28 09:59:24 +01:00
raw_os_ostream.cpp
raw_ostream.cpp raw_ostream.cpp - remove duplicate includes. NFCI. 2020-09-16 18:32:28 +01:00
regcomp.c Allow Compiler.h to be included in C files and fix fallthrough warnings 2019-08-23 17:25:21 +00:00
regengine.inc
regerror.c
regex2.h
regex_impl.h
Regex.cpp [ASTMatchers] Enhanced support for matchers taking Regex arguments 2020-07-02 14:52:25 +01:00
regexec.c
regfree.c
regstrlcpy.c
regutils.h
RISCVAttributeParser.cpp [RISCV] ELF attribute section for RISC-V. 2020-03-31 16:16:19 +08:00
RISCVAttributes.cpp [RISCV] ELF attribute section for RISC-V. 2020-03-31 16:16:19 +08:00
RWMutex.cpp
ScaledNumber.cpp
ScopedPrinter.cpp
SHA1.cpp SHA1.h - remove unnecessary ArrayRef.h/StringRef.h includes. NFC. 2020-04-21 15:12:17 +01:00
Signals.cpp Add support for setting the path to llvm-symbolizer through an environment variable 2020-09-24 19:14:04 +00:00
Signposts.cpp
SmallPtrSet.cpp
SmallVector.cpp [SmallVector] Move error handling out of line 2020-09-06 18:06:44 +02:00
SourceMgr.cpp [TableGen] New backend to print detailed records. 2020-10-02 10:22:13 -04:00
SpecialCaseList.cpp As part of using inclusive language within the llvm project, 2020-06-20 00:24:57 -07:00
Statistic.cpp Fix "Statistics are disabled" 2020-06-03 16:10:09 -07:00
StringExtras.cpp [llvm][StringExtras] Add missing include of cctype 2020-04-14 19:29:54 -07:00
StringMap.cpp Refactor StringMap.h, splitting StringMapEntry out to its own header. 2020-04-12 08:25:17 -07:00
StringRef.cpp [StringRef] Use some trickery to avoid initializing the std::string returned by upper()/lower() 2020-05-21 16:03:09 +02:00
StringSaver.cpp Temporarily Revert "[Support] Make UniqueStringSaver wrap a StringSet" 2020-05-14 19:18:20 -07:00
SuffixTree.cpp [SuffixTree][MachOpt] Factoring out Suffix Tree and adding Unit Tests 2020-06-08 12:44:18 -07:00
SymbolRemappingReader.cpp
SystemUtils.cpp [opt] Remove obsolete --quiet option 2020-07-08 13:21:20 -07:00
TargetParser.cpp [AMDGPU] Add gfx1033 target 2020-11-03 16:27:48 +00:00
TargetRegistry.cpp
TarWriter.cpp Reland D78945 TarWriter: Only use 137 of the 155 prefix bytes. 2020-04-27 10:37:23 -07:00
Threading.cpp [llvm-cov] Prevent llvm-cov from using too many threads 2020-04-24 15:28:25 -04:00
ThreadLocal.cpp
ThreadPool.cpp [Support] Simplify and optimize ThreadPool 2020-04-28 12:20:42 -07:00
TimeProfiler.cpp [TimeProfiler] Emit clock synchronization point 2020-04-23 01:09:31 +03:00
Timer.cpp [Timer] Add a command option to enable/disable timer sorting. 2020-11-28 11:43:38 -05:00
ToolOutputFile.cpp [Support] Use outs() in ToolOutputFile 2020-06-04 14:56:35 +02:00
TrigramIndex.cpp TrigramIndex.cpp - remove unnecessary includes. NFCI. 2020-09-09 11:38:31 +01:00
Triple.cpp [RFC][Target] Add a new triple called Triple::csky 2020-09-02 12:46:09 +08:00
Twine.cpp
Unicode.cpp
UnicodeCaseFold.cpp
Valgrind.cpp
VersionTuple.cpp VersionTuple.h - reduce includes to forward declarations. NFC. 2020-06-08 11:08:44 +01:00
VirtualFileSystem.cpp [lldb] Add reproducer verifier 2020-09-02 22:00:00 -07:00
Watchdog.cpp
WithColor.cpp WithColor.h - reduce CommandLine.h include to forward declaration. NFC. 2020-06-23 17:07:53 +01:00
X86TargetParser.cpp [X86] Support Intel avxvnni 2020-10-31 12:39:51 +08:00
xxhash.cpp
YAMLParser.cpp [YAMLIO] Support non-null-terminated inputs 2020-11-18 23:06:03 +00:00
YAMLTraits.cpp Reland "[lib/Support/YAMLTraits] - Don't print leading zeroes when dumping Hex8/Hex16/Hex32 types." (https://reviews.llvm.org/D90930). 2020-11-18 13:08:46 +03:00
Z3Solver.cpp [llvm][Z3][NFC] Improve mkBitvector performance 2020-06-30 12:26:50 +02:00