1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/unittests
Alexandre Ganea 1c64f56c35 [Support] On Windows, add optional support for {rpmalloc|snmalloc|mimalloc}
This patch optionally replaces the CRT allocator (i.e., malloc and free) with rpmalloc (mixed public domain licence/MIT licence) or snmalloc (MIT licence) or mimalloc (MIT licence). Please note that the source code for these allocators must be available outside of LLVM's tree.

To enable, use `cmake ... -DLLVM_INTEGRATED_CRT_ALLOC=D:/git/rpmalloc -DLLVM_USE_CRT_RELEASE=MT` where `D:/git/rpmalloc` has already been git clone'd from `https://github.com/mjansson/rpmalloc`. The same applies to snmalloc and mimalloc.

When enabled, the allocator will be embeded (statically linked) into the LLVM tools & libraries. This currently only works with the static CRT (/MT), although using the dynamic CRT (/MD) could potentially work as well in the future.

When enabled, this changes the memory stack from:
  new/delete -> MS VC++ CRT malloc/free -> HeapAlloc -> VirtualAlloc
to:
  new/delete -> {rpmalloc|snmalloc|mimalloc} -> VirtualAlloc

The goal of this patch is to bypass the application's global heap - which is thread-safe thus inducing locking - and instead take advantage of a modern lock-free, thread cache, allocator. On a 6-core Xeon Skylake we observe a 2.5x decrease in execution time when linking a large scale application with LLD and ThinLTO (12 min 20 sec -> 5 min 34 sec), when all hardware threads are being used (using LLD's flag /opt:lldltojobs=all). On a dual 36-core Xeon Skylake with all hardware threads used, we observe a 24x decrease in execution time (1 h 2 min -> 2 min 38 sec) when linking a large application with LLD and ThinLTO. Clang build times also see a decrease in the range 5-10% depending on the configuration.

Differential Revision: https://reviews.llvm.org/D71786
2020-08-27 11:09:46 -04:00
..
ADT [APInt] Allow self-assignment with libstdc++ 2020-08-20 04:14:40 -07:00
Analysis [NFC][ValueTracking] Cleanup a test 2020-08-27 03:25:10 -07:00
AsmParser [SVE] Remove calls to VectorType::getNumElements from AsmParserTest 2020-07-07 14:55:42 -07:00
BinaryFormat [BinaryFormat] Add formatv support for DW_OP constants 2020-06-08 15:27:44 +02:00
Bitcode [strictfp] Replace dangling strictfp attrs with nobuiltin 2020-06-15 10:05:35 -04:00
Bitstream
CodeGen [GISel] Correct the known bits of G_ANYEXT 2020-08-20 17:17:04 -07:00
DebugInfo [DWARFYAML] Make the unit_length and header_length fields optional. 2020-08-26 20:35:10 +08:00
Demangle
ExecutionEngine [ConstProp] Remove ConstantPropagation 2020-08-26 15:51:30 -07:00
Frontend [OpenMP][OMPBuilder] Adding support for omp single 2020-08-16 01:15:16 -04:00
FuzzMutate Revert "Revert "[NFC][llvm] Make the contructors of ElementCount private."" 2020-08-19 17:26:36 +00:00
InterfaceStub [elfabi] Move llvm-elfabi related code to InterfaceStub library 2020-08-13 11:51:44 -07:00
IR [NewPM][PassInstrumentation] Add PreservedAnalyses parameter to AfterPass* callbacks 2020-08-21 16:10:42 +07:00
LineEditor
Linker
MC [AIX][XCOFF] add symbol priority for the llvm-objdump -D -symbol-description 2020-05-29 11:08:51 -04:00
MI LIS: fix handleMove to properly extend main range 2020-07-07 11:52:32 -07:00
Object [unittests/Object] - Simplify the code in ELFObjectFileTest.cpp, NFCI. 2020-08-27 12:06:04 +03:00
ObjectYAML [DWARFYAML] Replace InitialLength with Format and Length. NFC. 2020-08-13 18:39:03 +08:00
Option [OptTable] Support grouped short options 2020-07-17 09:32:43 -07:00
Passes Don't export symbols from clang/opt/llc if plugins are disabled. 2020-03-23 12:17:09 -07:00
ProfileData [SampleFDO] Enhance profile remapping support for searching inline instance 2020-08-26 11:07:35 -07:00
Remarks
Support [Support] On Windows, add optional support for {rpmalloc|snmalloc|mimalloc} 2020-08-27 11:09:46 -04:00
TableGen
Target [ARM] Allow tail predication of VLDn 2020-08-18 17:15:45 +01:00
TextAPI [MachO] Add skeletal support for DriverKit platform 2020-08-14 12:36:43 -07:00
tools [llvm][NFC] Add missing 'override's in unittests/ 2020-07-17 17:35:59 -07:00
Transforms [Cloning] Fix to cloning DISubprograms. 2020-08-21 11:54:56 -07:00
XRay
CMakeLists.txt [elfabi] Move llvm-elfabi related code to InterfaceStub library 2020-08-13 11:51:44 -07:00
unittest.cfg.in