llvm-project/llvm/unittests/Support
Archibald Elliott 3c97f6cab9 [Support] Move getHostNumPhysicalCores to Threading.h
This change is focussed on simplifying `Support/Host.h` to only do
target detection. In this case, this function is close in usage to
existing functions in `Support/Threading.h`, so I moved it into there.
The function is also renamed to `llvm::get_physical_cores()` to match
the style of threading's functions.

The big change here is that now if you have threading disabled,
`llvm::get_physical_cores()` will return -1, as if it had not been able
to work out the right info. This is due to how Threading.cpp includes
OS-specific code/headers. This seems ok, as if threading is disabled,
LLVM should not need to know the number of physical cores.

Differential Revision: https://reviews.llvm.org/D137836
2022-11-29 13:14:13 +00:00
..
CommandLineInit CommandLine: add and use cl::SubCommand::get{All,TopLevel} 2022-08-02 23:49:16 +02:00
DynamicLibrary ManagedStatic: remove from DynamicLibrary 2022-08-25 17:06:43 +02:00
ARMAttributeParser.cpp [llvm] Don't use Optional::{hasValue,getValue} (NFC) 2022-06-25 11:24:23 -07:00
AddressRangeTest.cpp [Reland][DebugInfo][llvm-dwarfutil] Combine overlapped address ranges. 2022-07-21 14:15:39 +03:00
AlignOfTest.cpp
AlignmentTest.cpp Use llvm::sort instead of std::sort where possible 2022-07-23 15:19:05 +02:00
AllocatorTest.cpp [Support] Fix asan AllocatorTest after ba0d50ad7e 2022-05-06 15:51:37 +02:00
AnnotationsTest.cpp [Support] Add support for attaching payloads to points and ranges 2022-11-18 15:00:23 +01:00
ArrayRecyclerTest.cpp
BLAKE3Test.cpp [Support/Hash functions] Change the `final()` and `result()` of the hashing functions to return an array of bytes 2022-04-05 21:38:06 -07:00
Base64Test.cpp An upcoming patch to LLDB will require the ability to decode base64. This patch adds support for decoding base64 and adds tests. 2022-08-30 15:52:08 -07:00
BinaryStreamTest.cpp [llvm] Use std::size instead of llvm::array_lengthof 2022-09-08 09:01:53 -06:00
BlockFrequencyTest.cpp
BranchProbabilityTest.cpp
CMakeLists.txt Revert "[NFC] Make format() more amenable to format attributes" 2022-11-16 19:09:49 +04:00
CRCTest.cpp
CSKYAttributeParserTest.cpp [llvm] Don't use Optional::{hasValue,getValue} (NFC) 2022-06-25 11:24:23 -07:00
CSKYTargetParserTest.cpp [llvm] Use std::size instead of llvm::array_lengthof 2022-09-08 09:01:53 -06:00
CachePruningTest.cpp
Casting.cpp Reland "[llvm][NFC] Use c++17 style variable type traits" 2022-11-08 14:15:15 +00:00
CheckedArithmeticTest.cpp
Chrono.cpp
CommandLineTest.cpp [llvm] Use std::size (NFC) 2022-11-26 13:47:32 -08:00
CompressionTest.cpp [Support] Rename llvm::compression::{zlib,zstd}::uncompress to more appropriate decompress 2022-09-17 12:35:17 -07:00
ConvertUTFTest.cpp Re-land c346068928 with fixes 2022-03-23 08:13:17 -04:00
CrashRecoveryTest.cpp [Reland][lit] Use sharding for GoogleTest format 2022-04-12 14:51:12 -07:00
DJBTest.cpp
DataExtractorTest.cpp Add a new API seek for the Cursor class in the DataExtractor.cpp 2021-09-16 09:39:49 -04:00
DebugCounterTest.cpp
DebugTest.cpp
ELFAttributeParserTest.cpp
EndianStreamTest.cpp
EndianTest.cpp
ErrnoTest.cpp
ErrorOrTest.cpp Reland "[llvm][NFC] Use c++17 style variable type traits" 2022-11-08 14:15:15 +00:00
ErrorTest.cpp ManagedStatic: remove many straightforward uses in llvm 2022-07-10 10:29:15 +02:00
ExtensibleRTTITest.cpp silence new -Wunused-result warnings in test 2022-05-12 08:30:36 +02:00
FSUniqueIDTest.cpp [NFCI][Support] Avoid ASSERT_/EXPECT_TRUE(A <op> B) 2022-01-21 13:15:04 +00:00
FileCollectorTest.cpp
FileOutputBufferTest.cpp
FileUtilitiesTest.cpp
FormatVariadicTest.cpp [Support] Use a custom base class for FormatVariadicTest.cpp (NFC) 2022-11-21 12:22:16 -08:00
GlobPatternTest.cpp
HashBuilderTest.cpp [Support/Hash functions] Change the `final()` and `result()` of the hashing functions to return an array of bytes 2022-04-05 21:38:06 -07:00
Host.cpp [Support] Move getHostNumPhysicalCores to Threading.h 2022-11-29 13:14:13 +00:00
IndexedAccessorTest.cpp [STLExtras] Make indexed_accessor_range operator== compatible with C++20 2022-05-21 13:00:30 +02:00
InstructionCostTest.cpp
ItaniumManglingCanonicalizerTest.cpp
JSONTest.cpp [llvm][json] Fix UINT64 json parsing 2022-05-17 09:11:45 -07:00
KnownBitsTest.cpp [Support] Add KnownBits::concat method 2022-07-29 11:06:39 +01:00
KnownBitsTest.h
LEB128Test.cpp
LineIteratorTest.cpp
LinearPolyBaseTest.cpp [NFC] Remove from UnivariateLinearPolyBase::getValue(). 2021-11-04 14:32:08 +00:00
LockFileManagerTest.cpp
MD5Test.cpp [Support/Hash functions] Change the `final()` and `result()` of the hashing functions to return an array of bytes 2022-04-05 21:38:06 -07:00
ManagedStatic.cpp
MatchersTest.cpp
MathExtrasTest.cpp Fix signed/unsigned comparison warnings on ppc buildbots 2022-02-08 14:15:28 +00:00
MemoryBufferRefTest.cpp
MemoryBufferTest.cpp [MemoryBuffer] Allow optionally specifying desired buffer alignment 2022-11-12 14:38:45 -08:00
MemoryTest.cpp
NativeFormatTests.cpp Print the sign of negative infinity 2021-12-14 22:38:42 -08:00
OptimizedStructLayoutTest.cpp
ParallelTest.cpp Rename parallelForEachN to just parallelFor 2022-06-19 17:49:00 -04:00
Path.cpp Revert "Support: Add mapped_file_region::sync(), equivalent to msync" 2022-09-08 12:49:52 -04:00
ProcessTest.cpp ProcessTest.cpp - replace Optional::hasValue() with Optional::has_value() 2022-08-08 11:52:22 +01:00
ProgramTest.cpp [Reland][lit] Use sharding for GoogleTest format 2022-04-12 14:51:12 -07:00
RISCVAttributeParserTest.cpp [llvm] Don't use Optional::{hasValue,getValue} (NFC) 2022-06-25 11:24:23 -07:00
RegexTest.cpp
ReplaceFileTest.cpp
ReverseIterationTest.cpp Move STLFunctionalExtras out of STLExtras 2022-01-24 14:13:21 +01:00
SHA256.cpp [Support/Hash functions] Change the `final()` and `result()` of the hashing functions to return an array of bytes 2022-04-05 21:38:06 -07:00
ScaledNumberTest.cpp Reland "[llvm][NFC] Use c++17 style variable type traits" 2022-11-08 14:15:15 +00:00
ScopedPrinterTest.cpp [llvm] Add JSONScopedPrinter class 2021-12-10 18:57:33 +00:00
SourceMgrTest.cpp
SpecialCaseListTest.cpp
SuffixTreeTest.cpp
SwapByteOrderTest.cpp
SymbolRemappingReaderTest.cpp
TarWriterTest.cpp [NFCI][Support] Avoid ASSERT_/EXPECT_TRUE(A <op> B) 2022-01-21 13:15:04 +00:00
TargetParserTest.cpp [AArch64] Assembly support for FEAT_LRCPC3 2022-11-25 18:59:07 +00:00
TaskQueueTest.cpp
ThreadLocalTest.cpp Reland "[llvm][NFC] Use c++17 style variable type traits" 2022-11-08 14:15:15 +00:00
ThreadPool.cpp [ThreadPool] add ability to group tasks into separate groups 2022-05-04 06:16:55 +02:00
Threading.cpp [Support] Move getHostNumPhysicalCores to Threading.h 2022-11-29 13:14:13 +00:00
TimeProfilerTest.cpp [support] Prepare TimeProfiler for cross-thread support 2022-09-16 10:20:18 -06:00
TimerTest.cpp [NFCI][Support] Avoid ASSERT_/EXPECT_TRUE(A <op> B) 2022-01-21 13:15:04 +00:00
ToolOutputFileTest.cpp
TrailingObjectsTest.cpp
TrigramIndexTest.cpp
TypeNameTest.cpp
TypeTraitsTest.cpp Revert "[llvm] Remove llvm::is_trivially_{copy/move}_constructible (NFC)" 2022-09-16 18:26:20 -07:00
UnicodeTest.cpp Encode columnWidthUTF8 tests as UTF-8 sequences. 2022-11-28 15:56:12 +01:00
VersionTupleTest.cpp
VirtualFileSystemTest.cpp [llvm][vfs] Implement in-memory symlinks 2022-06-21 16:29:54 +02:00
WithColorTest.cpp
YAMLIOTest.cpp [yamlio] Allow parsing an entire mapping as an enumeration 2022-03-14 04:41:40 +00:00
YAMLParserTest.cpp [llvm] Use has_value instead of hasValue (NFC) 2022-07-12 22:25:42 -07:00
buffer_ostream_test.cpp Support: Skip buffering buffer_unique_ostream's owned stream 2021-10-22 16:25:31 -07:00
formatted_raw_ostream_test.cpp
raw_fd_stream_test.cpp
raw_ostream_test.cpp [NFCI][Support] Avoid ASSERT_/EXPECT_TRUE(A <op> B) 2022-01-21 13:15:04 +00:00
raw_pwrite_stream_test.cpp
raw_sha1_ostream_test.cpp [Support/Hash functions] Change the `final()` and `result()` of the hashing functions to return an array of bytes 2022-04-05 21:38:06 -07:00
xxhashTest.cpp