1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
llvm-mirror/unittests
wlei 4683e274de [CSSPGO][llvm-profgen] Compress recursive cycles in calling context
This change compresses the context string by removing cycles due to recursive function for CS profile generation. Removing recursion cycles is a way to normalize the calling context which will be better for the sample aggregation and also make the context promoting deterministic.
Specifically for implementation, we recognize adjacent repeated frames as cycles and deduplicated them through multiple round of iteration.
For example:
Considering a input context string stack:
[“a”, “a”, “b”, “c”, “a”, “b”, “c”, “b”, “c”, “d”]
For first iteration,, it removed all adjacent repeated frames of size 1:
[“a”, “b”, “c”, “a”, “b”, “c”, “b”, “c”, “d”]
For second iteration, it removed all adjacent repeated frames of size 2:
[“a”, “b”, “c”, “a”, “b”, “c”, “d”]
So in the end, we get compressed output:
[“a”, “b”, “c”, “d”]

Compression will be called in two place: one for sample's context key right after unwinding, one is for the eventual context string id in the ProfileGenerator.
Added a switch `compress-recursion` to control the size of duplicated frames, default -1 means no size limit.
Added unit tests and regression test for this.

Differential Revision: https://reviews.llvm.org/D93556
2021-02-03 18:50:14 -08:00
..
ADT ADT: Fix typo in static assert message from 17c584551d573f1693990773e29fbe6b4b6fa4f4 2021-01-28 15:14:46 -08:00
Analysis [ValueTracking] Don't assume readonly function will return 2021-01-24 10:40:21 +01: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 [AMDGPU] Set the default globals address space to 1 2020-11-20 15:46:53 +00:00
Bitstream Switch from llvm::is_trivially_copyable to std::is_trivially_copyable 2020-12-02 22:02:48 -08:00
CodeGen [GlobalISel] Implement computeKnownBits for G_ASSERT_ZEXT 2021-01-28 16:34:34 -08:00
DebugInfo Fix windows buildbot build errors from D89845. 2021-01-28 15:25:10 -08:00
Demangle
ExecutionEngine [ORC] Move OrcError.h to include/llvm/ExecutionEngine/Orc/Shared. 2021-01-19 16:18:00 +11:00
FileCheck Reland [FileCheck] Move FileCheck implementation out of LLVMSupport into its own library 2020-09-01 14:59:28 +02:00
Frontend [OpenMPIRBuilder] Implement collapseLoops. 2021-02-03 19:12:02 -06:00
FuzzMutate [FuzzMutate] Add mutator to modify instruction flags. 2021-01-23 19:05:20 +00:00
InterfaceStub [llvm] Fix ODRViolations for VersionTuple YAML specializations NFC 2020-10-20 18:29:15 -07:00
IR Revert "[ConstantFold] Fold more operations to poison" 2021-02-04 00:24:02 +09:00
LineEditor
Linker [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
MC [MC] Adjust StringTableBuilder for linked Mach-O binaries 2020-10-22 19:19:41 -07:00
MI [AMDGPU] Add _e64 suffix to VOP3 Insts 2021-01-12 18:33:18 -05:00
Object [llvm-readelf/obj] - Add support of multiple SHT_SYMTAB_SHNDX sections. 2021-01-13 11:36:43 +03:00
ObjectYAML Add -Wno-error=unknown flag to clang-format. 2020-09-19 10:17:57 +02:00
Option [clang][cli] Accept strings instead of options in ImpliedByAnyOf 2021-01-26 09:30:36 +01:00
Passes Don't export symbols from clang/opt/llc if plugins are disabled. 2020-03-23 12:17:09 -07:00
ProfileData [llvm] [unittests] Remove temporary files after they're not needed 2020-09-02 00:34:44 +03:00
Remarks [Remarks] Fix error message check in unit test 2019-10-31 15:51:36 -07:00
Support Diagnose if a SLEB128 is too large to fit in an int64_t. 2021-02-02 14:33:34 -08:00
TableGen [TableGen] Eliminte source location from CodeInit 2020-11-23 11:30:13 -05:00
Target [NFC][AMDGPU] Split AMDGPUSubtarget.h to R600 and GCN subtargets 2021-01-20 22:22:45 +03:00
TextAPI [RGT][TextAPI] Remove a zero-trip loop and the assertions within it 2021-01-22 15:07:41 -08:00
tools [CSSPGO][llvm-profgen] Compress recursive cycles in calling context 2021-02-03 18:50:14 -08:00
Transforms [LoopVectorize] use IR fast-math-flags exclusively (not FP function attributes) 2021-01-27 14:17:11 -05:00
XRay Use std::foo_t rather than std::foo in LLVM. 2020-02-11 15:12:51 -08:00
CMakeLists.txt Reland [FileCheck] Move FileCheck implementation out of LLVMSupport into its own library 2020-09-01 14:59:28 +02:00
unittest.cfg.in