1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/include/llvm/Support
River Riddle deae9b5f50 [mlir] Add a ThreadPool to MLIRContext and refactor MLIR threading usage
This revision refactors the usage of multithreaded utilities in MLIR to use a common
thread pool within the MLIR context, in addition to a new utility that makes writing
multi-threaded code in MLIR less error prone. Using a unified thread pool brings about
several advantages:

* Better thread usage and more control
We currently use the static llvm threading utilities, which do not allow multiple
levels of asynchronous scheduling (even if there are open threads). This is due to
how the current TaskGroup structure works, which only allows one truly multithreaded
instance at a time. By having our own ThreadPool we gain more control and flexibility
over our job/thread scheduling, and in a followup can enable threading more parts of
the compiler.

* The static nature of TaskGroup causes issues in certain configurations
Due to the static nature of TaskGroup, there have been quite a few problems related to
destruction that have caused several downstream projects to disable threading. See
D104207 for discussion on some related fallout. By having a ThreadPool scoped to
the context, we don't have to worry about destruction and can ensure that any
additional MLIR thread usage ends when the context is destroyed.

Differential Revision: https://reviews.llvm.org/D104516
2021-06-23 01:29:24 +00:00
..
FileSystem Support: Avoid std::tie in Support/FileSystem/UniqueID.h, NFC 2020-11-02 13:26:15 -05:00
Solaris/sys
Windows WindowsSupport.h: do not depend on private config header 2021-06-01 23:05:03 +03:00
AArch64TargetParser.def [AArch64] Add apple-m1 CPU, and default to it for macOS. 2021-04-20 08:41:04 -07:00
AArch64TargetParser.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
Alignment.h [llvm][NFC] Remove deprecated Alignment::None() 2021-05-06 07:21:23 +00:00
AlignOf.h Document that AlignedCharArrayUnion exists to work around an MSVC bug 2020-12-15 16:01:55 -08:00
Allocator.h [ADT][NFC] Use empty base optimisation in BumpPtrAllocatorImpl 2021-01-12 22:43:48 +00:00
AllocatorBase.h
AMDGPUMetadata.h AMDGPU: Add target id and code object v4 support 2021-03-24 11:54:05 -04:00
AMDHSAKernelDescriptor.h AMDGPU: Add target id and code object v4 support 2021-03-24 11:54:05 -04:00
ARMAttributeParser.h
ARMBuildAttributes.h
ARMEHABI.h
ARMTargetParser.def [clang][ARM] Remove arm2/3/6/7m CPU names 2021-06-03 08:55:44 +00:00
ARMTargetParser.h
ARMWinEH.h
ArrayRecycler.h
Atomic.h
AtomicOrdering.h
AutoConvert.h [SystemZ][z/OS] Add the functions needed for handling EBCDIC I/O 2021-05-03 08:52:38 -04:00
Automaton.h
Base64.h
BCD.h [SystemZ][z/OS] Implement getHostCPUName for z/OS 2021-05-25 11:18:12 -04:00
BinaryByteStream.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
BinaryItemStream.h [llvm] Use llvm::lower_bound and llvm::upper_bound (NFC) 2021-01-05 21:15:59 -08:00
BinaryStream.h
BinaryStreamArray.h [docs] Fix doxygen comments wrongly attached to the llvm namespace 2021-04-07 01:20:18 +02:00
BinaryStreamError.h
BinaryStreamReader.h [Support] BinaryStreamReader.h - remove unnecessary <string> include. NFCI. 2021-04-20 10:31:12 +01:00
BinaryStreamRef.h Make LLVM build in C++20 mode 2020-12-17 10:44:10 +00:00
BinaryStreamWriter.h
BlockFrequency.h
BranchProbability.h Revert "[BranchProbability] move options for 'likely' and 'unlikely'" 2021-03-21 22:50:21 +03:00
BuryPointer.h
CachePruning.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
Capacity.h
Casting.h
CBindingWrapping.h
CFGDiff.h [llvm] Use llvm::append_range (NFC) 2021-01-06 18:27:33 -08:00
CFGUpdate.h [NFC] Add missing includes for LLVM_ENABLE_MODULES builds 2021-06-03 23:29:03 +02:00
CheckedArithmetic.h
Chrono.h [docs] Fix doxygen comments wrongly attached to the llvm namespace 2021-04-07 01:20:18 +02:00
circular_raw_ostream.h
CMakeLists.txt [CMake] Avoid __FakeVCSRevision.h with no git repository 2020-12-16 17:33:20 +01:00
CodeGen.h [IR][sanitizer] Add module flag "frame-pointer" and set it for cc1 -mframe-pointer={non-leaf,all} 2021-04-22 18:07:30 -07:00
CodeGenCoverage.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
COM.h
CommandLine.h [Support] Don't include VirtualFileSystem.h in CommandLine.h 2021-04-21 10:19:01 -04:00
Compiler.h [NFC] Enable RVALUE_REFERENCE_THIS on MSVC 2019 2021-03-23 16:40:13 +00:00
Compression.h
ConvertUTF.h
CrashRecoveryContext.h [LLD][COFF] When using LLD-as-a-library, always prevent re-entrance on failures 2020-11-12 08:14:43 -05:00
CRC.h
DataExtractor.h
DataTypes.h [llvm] Add missing header guards (NFC) 2021-01-30 09:53:42 -08:00
Debug.h
DebugCounter.h
Discriminator.h [SampleFDO] New hierarchical discriminator for FS SampleFDO (llvm-profdata part) 2021-06-04 11:22:06 -07:00
DJB.h
DOTGraphTraits.h [DDG] Data Dependence Graph - DOT printer - recommit 2020-12-16 12:37:36 -05:00
DynamicLibrary.h
ELFAttributeParser.h
ELFAttributes.h
Endian.h
EndianStream.h EndianStream.h - add missing implicit MathExtras.h header dependency. NFCI. 2021-06-05 18:05:40 +01:00
Errc.h
Errno.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
Error.h [NFC] Fix "unused parameter" error revealed in the Linux self-build. 2021-03-15 12:17:11 -04:00
ErrorHandling.h
ErrorOr.h Revert "ADT: Migrate users of AlignedCharArrayUnion to std::aligned_union_t, NFC" 2020-12-14 17:04:06 -08:00
ExitCodes.h
ExtensibleRTTI.h
FileCollector.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
FileOutputBuffer.h [llvm-objcopy][NFC] Move ownership keeping code into restoreStatOnFile(). 2021-03-17 17:27:00 +03:00
FileSystem.h Support: Remove F_{None,Text,Append} compatibility synonyms, NFC 2021-06-15 12:04:09 -07:00
FileUtilities.h
Format.h
FormatAdapters.h
FormatCommon.h
FormatProviders.h
FormattedStream.h
FormatVariadic.h
FormatVariadicDetails.h [NFC] Fix "unused parameter" error revealed in the Linux self-build. 2021-03-15 12:17:11 -04:00
GenericDomTree.h [llvm] Use append_range (NFC) 2021-01-29 23:23:34 -08:00
GenericDomTreeConstruction.h [NFC] Fix "unused variable" warning 2021-06-15 12:59:05 -07:00
GenericIteratedDominanceFrontier.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
GlobPattern.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
GraphWriter.h [SystemZ][z/OS] Set more text files as text 2021-04-19 09:31:46 -04:00
Host.h Reland 293e8fa13d3f05e993771577a4c022deee5cbf6e 2021-03-05 13:23:42 -05:00
InitLLVM.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
InstructionCost.h [NFC][CostModel] Fixed comment that comparisons work regardless of the state. 2021-06-11 23:48:49 +03:00
ItaniumManglingCanonicalizer.h
JSON.h Revert "ADT: Migrate users of AlignedCharArrayUnion to std::aligned_union_t, NFC" 2020-12-14 17:04:06 -08:00
KnownBits.h [KnownBits] Rename KnownBits::computeForMul to KnownBits::mul. NFCI. 2021-04-06 10:11:41 +01:00
LEB128.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
LICENSE.TXT
LineIterator.h Replace uses of std::iterator with explicit using 2021-04-12 10:47:14 -07:00
Locale.h
LockFileManager.h
LowLevelTypeImpl.h [GlobalISel] Add scalable property to LLT types. 2021-06-22 08:43:34 +01:00
MachineValueType.h [ValueTypes] Define MVTs for v6i32, v6f32, v7i32, v7f32 2021-06-11 08:58:16 +09:00
ManagedStatic.h
MathExtras.h [Support] AbsoluteDifference - add brackets to appease static analyzer warning. NFCI. 2021-04-17 13:47:02 +01:00
MD5.h
MemAlloc.h
Memory.h [Support] Memory.h - remove unnecessary <string> include. NFCI. 2021-04-19 14:32:07 +01:00
MemoryBuffer.h [NFC] Reordering parameters in getFile and getFileOrSTDIN 2021-03-25 09:47:49 -04:00
MemoryBufferRef.h
MipsABIFlags.h
MSVCErrorWorkarounds.h
Mutex.h
NativeFormatting.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
OnDiskHashTable.h
OptimizedStructLayout.h [docs] Fix doxygen comments wrongly attached to the llvm namespace 2021-04-07 01:20:18 +02:00
Parallel.h [Support/Parallel] Add a special case for 0/1 items to llvm::parallel_for_each. 2021-05-03 10:08:00 -07:00
Path.h
PluginLoader.h
PointerLikeTypeTraits.h
PrettyStackTrace.h
Printable.h
Process.h [Windows] Use TerminateProcess to exit without running destructors 2021-05-22 23:41:40 +03:00
Program.h [SystemZ][z/OS][Windows] Add new functions that set Text/Binary mode for Stdin and Stdout based on OpenFlags 2021-04-16 08:09:19 -04:00
RandomNumberGenerator.h
raw_os_ostream.h
raw_ostream.h Add Twine support for std::string_view. 2021-06-08 20:19:04 -07:00
raw_sha1_ostream.h
Recycler.h
RecyclingAllocator.h
Regex.h
Registry.h
ReverseIteration.h
RISCVAttributeParser.h
RISCVAttributes.h
RISCVTargetParser.def [RISCV] Fix -Wbraced-scalar-init after D89025 2020-10-15 23:29:11 -07:00
RWMutex.h
SaveAndRestore.h
ScaledNumber.h
ScopedPrinter.h [Support] Use ListSeparator (NFC) 2021-02-15 14:46:09 -08:00
SHA1.h
SHA256.h [llvm] Fix header guards (NFC) 2021-02-16 23:23:07 -08:00
Signals.h
Signposts.h Move the definition of LLVM_SUPPORT_XCODE_SIGNPOSTS into llvm-config.h 2021-06-16 14:40:37 -07:00
SmallVectorMemoryBuffer.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
SMLoc.h
SMTAPI.h
SourceMgr.h
SpecialCaseList.h
StringSaver.h
SuffixTree.h Make LLVM build in C++20 mode 2020-12-17 10:44:10 +00:00
SwapByteOrder.h [Support] Make Support/SwapByteOrder.h compile on Fuchsia 2020-10-29 10:49:06 -07:00
SymbolRemappingReader.h
SystemUtils.h
TargetOpcodes.def [DebugInstrRef][1/3] Track PHI values through register allocation 2021-05-26 20:24:00 +01:00
TargetParser.h Reland "[AMDGPU] Add gfx1013 target" 2021-06-08 21:15:35 -04:00
TargetRegistry.h [MC] Refactor MCObjectFileInfo initialization and allow targets to create MCObjectFileInfo 2021-05-23 14:15:23 -07:00
TargetSelect.h
TarWriter.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
TaskQueue.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
thread.h
Threading.h [ADT] Move DenseMapInfo for ArrayRef/StringRef into respective headers (NFC) 2021-06-03 18:34:36 +02:00
ThreadLocal.h
ThreadPool.h [mlir] Add a ThreadPool to MLIRContext and refactor MLIR threading usage 2021-06-23 01:29:24 +00:00
TimeProfiler.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
Timer.h [Timer] On macOS count number of executed instructions 2021-02-11 17:26:37 +01:00
ToolOutputFile.h [mlir] Enable passing crash reproducer stream factory method 2021-01-21 20:03:15 -08:00
TrailingObjects.h Remove a workaround for MSVC 2013, now that MSVC 2017 is the minimum. 2021-02-24 13:56:49 -05:00
TrigramIndex.h [Support] TrigramIndex::insert - pass std::String argument by const reference. NFCI. 2021-01-23 11:04:00 +00:00
type_traits.h Revert "Switch to std::is_trivially_move_constructible and std::is_trivially_copy_constructible" 2020-12-03 19:58:06 +00:00
TypeName.h
TypeSize.h Always emit error for wrong interfaces to scalable vectors, unless cmdline flag is passed. 2021-04-02 10:55:22 +01:00
Unicode.h
UnicodeCharRanges.h
Valgrind.h
VersionTuple.h
VirtualFileSystem.h [VFS] Fix Wreturn-type gcc warning (NFC) 2021-02-03 10:22:30 +08:00
Watchdog.h
Win64EH.h
WindowsError.h
WithColor.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
X86DisassemblerDecoderCommon.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
X86TargetParser.def [X86] Support -march=rocketlake 2021-04-13 09:48:13 +08:00
X86TargetParser.h [X86] Support -march=rocketlake 2021-04-13 09:48:13 +08:00
xxhash.h
YAMLParser.h Replace uses of std::iterator with explicit using 2021-04-12 10:47:14 -07:00
YAMLTraits.h [YAML I/O] Fix bug in emission of empty sequence 2021-01-25 13:35:36 -08:00