llvm-project/llvm/lib/Transforms/Utils
Dehao Chen fb02f7140a Encode duplication factor from loop vectorization and loop unrolling to discriminator.
Summary:
This patch starts the implementation as discuss in the following RFC: http://lists.llvm.org/pipermail/llvm-dev/2016-October/106532.html

When optimization duplicates code that will scale down the execution count of a basic block, we will record the duplication factor as part of discriminator so that the offline process tool can find the duplication factor and collect the accurate execution frequency of the corresponding source code. Two important optimization that fall into this category is loop vectorization and loop unroll. This patch records the duplication factor for these 2 optimizations.

The recording will be guarded by a flag encode-duplication-in-discriminators, which is off by default.

Reviewers: probinson, aprantl, davidxl, hfinkel, echristo

Reviewed By: hfinkel

Subscribers: mehdi_amini, anemet, mzolotukhin, llvm-commits

Differential Revision: https://reviews.llvm.org/D26420

llvm-svn: 294782
2017-02-10 21:09:07 +00:00
..
ASanStackFrameLayout.cpp [asan] Replace std::to_string with llvm::to_string 2016-10-19 00:16:56 +00:00
AddDiscriminators.cpp Encode duplication factor from loop vectorization and loop unrolling to discriminator. 2017-02-10 21:09:07 +00:00
BasicBlockUtils.cpp Apply clang-tidy's modernize-loop-convert to most of lib/Transforms. 2016-06-26 12:28:59 +00:00
BreakCriticalEdges.cpp [PM] Port BreakCriticalEdges to the new PM. 2016-07-22 18:04:25 +00:00
BuildLibCalls.cpp [Analysis] Add LibFunc_ prefix to enums in TargetLibraryInfo. (NFC) 2017-01-23 23:16:46 +00:00
BypassSlowDivision.cpp [BypassSlowDivision] Handle division by constant numerators better. 2016-11-16 00:44:47 +00:00
CMakeLists.txt NVPTX: Extract mem intrinsic expansions into utilities 2017-02-08 17:49:52 +00:00
CloneFunction.cpp [JumpThreading] Thread through guards 2017-02-09 19:40:22 +00:00
CloneModule.cpp Cloning: Copy comdats when cloning globals. 2017-01-18 20:02:31 +00:00
CmpInstAnalysis.cpp move decomposeBitTestICmp() to Transforms/Utils; NFC 2016-07-20 17:18:45 +00:00
CodeExtractor.cpp CodeExtractor : Add ability to preserve profile data. 2016-08-02 02:15:45 +00:00
CtorUtils.cpp [CtorUtils] Modernize. No functional changes intended. 2016-10-22 01:21:24 +00:00
DemoteRegToStack.cpp
EscapeEnumerator.cpp [tsan] Add support for C++ exceptions into TSan (call __tsan_func_exit during unwinding), LLVM part 2016-11-14 21:41:13 +00:00
Evaluator.cpp Use the range variant of find instead of unpacking begin/end 2016-08-11 22:21:41 +00:00
FlattenCFG.cpp [FlattenCFG] Simplify + remove unused variable. NFCI. 2016-08-05 20:53:35 +00:00
FunctionComparator.cpp IR: Move NumElements field from {Array,Vector}Type to SequentialType. 2016-12-02 03:20:58 +00:00
FunctionImportUtils.cpp FunctionImport: Use IRMover directly. 2017-02-03 16:56:27 +00:00
GlobalStatus.cpp [Transforms/Utils] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-01-14 00:32:38 +00:00
ImportedFunctionsInliningStatistics.cpp Imported statistics types changes 2016-08-02 22:18:47 +00:00
InlineFunction.cpp Improve PGO support for the new inliner 2017-01-20 22:44:04 +00:00
InstructionNamer.cpp Apply clang-tidy's modernize-loop-convert to most of lib/Transforms. 2016-06-26 12:28:59 +00:00
IntegerDivision.cpp TransformUtils: Avoid getNodePtrUnchecked() in integer division, NFC 2016-02-21 20:14:29 +00:00
LCSSA.cpp [PM] Introduce an analysis set used to preserve all analyses over 2017-01-15 06:32:49 +00:00
LLVMBuild.txt
LibCallsShrinkWrap.cpp [Analysis] Add LibFunc_ prefix to enums in TargetLibraryInfo. (NFC) 2017-01-23 23:16:46 +00:00
Local.cpp [Analysis] Add LibFunc_ prefix to enums in TargetLibraryInfo. (NFC) 2017-01-23 23:16:46 +00:00
LoopSimplify.cpp [PH] Replace uses of AssertingVH from members of analysis results with 2017-01-24 12:55:57 +00:00
LoopUnroll.cpp Encode duplication factor from loop vectorization and loop unrolling to discriminator. 2017-02-10 21:09:07 +00:00
LoopUnrollPeel.cpp Update domtree incrementally in loop peeling. 2017-01-24 06:58:39 +00:00
LoopUnrollRuntime.cpp [LoopUnroll] Use addClonedBlockToLoopInfo to clone the top level loop (NFC) 2017-01-31 11:13:44 +00:00
LoopUtils.cpp Fix up a comment. NFC. 2017-01-18 19:05:48 +00:00
LoopVersioning.cpp [LoopVersioning] Require loop-simplify form for loop versioning. 2016-12-19 17:13:37 +00:00
LowerInvoke.cpp [PM] Port LowerInvoke to the new pass manager 2016-08-12 17:28:27 +00:00
LowerMemIntrinsics.cpp NVPTX: Extract mem intrinsic expansions into utilities 2017-02-08 17:49:52 +00:00
LowerSwitch.cpp Use the range variant of remove_if instead of unpacking begin/end 2016-08-12 04:32:37 +00:00
Mem2Reg.cpp [PM] Introduce an analysis set used to preserve all analyses over 2017-01-15 06:32:49 +00:00
MemorySSA.cpp Revert "[MemorySSA] Revert r293361 and r293363, as the tests fail under asan." 2017-01-30 11:35:39 +00:00
MemorySSAUpdater.cpp Revert "[MemorySSA] Revert r293361 and r293363, as the tests fail under asan." 2017-01-30 11:35:39 +00:00
MetaRenamer.cpp
ModuleUtils.cpp Cleanup dump() functions. 2017-01-28 02:02:38 +00:00
NameAnonGlobals.cpp Use StringRef in Pass/PassManager APIs (NFC) 2016-10-01 02:56:57 +00:00
PredicateInfo.cpp PredicateInfo: Some compilers are unhappy with naming Use *'s Use. Change the name. 2017-02-07 22:11:43 +00:00
PromoteMemoryToRegister.cpp Revert @llvm.assume with operator bundles (r289755-r289757) 2016-12-19 08:22:17 +00:00
SSAUpdater.cpp [Target, Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-01-18 00:57:48 +00:00
SanitizerStats.cpp Fix Clang-tidy modernize-use-nullptr and modernize-use-override warnings; other minor fixes. 2016-01-26 18:48:36 +00:00
SimplifyCFG.cpp [InstCombine] Merge DebugLoc when speculatively hoisting store instruction 2017-01-28 07:05:43 +00:00
SimplifyIndVar.cpp [IndVars] Remove -liv-reduce 2016-06-05 18:01:12 +00:00
SimplifyInstructions.cpp [ValueTracking] emit a remark when we detect a conflicting assumption (PR31809) 2017-02-06 18:26:06 +00:00
SimplifyLibCalls.cpp [LangRef] Make @llvm.sqrt(x) return undef, rather than have UB, for negative x. 2017-01-27 00:58:03 +00:00
SplitModule.cpp Move instances of std::function. 2016-06-12 16:13:55 +00:00
StripGCRelocates.cpp [StripGCRelocates] New pass to remove gc.relocates added by RS4GC 2016-10-21 18:43:16 +00:00
StripNonLineTableDebugInfo.cpp Add -strip-nonlinetable-debuginfo capability 2016-10-25 18:44:13 +00:00
SymbolRewriter.cpp [PM] Port SymbolRewriter to the new PM 2016-07-25 20:52:00 +00:00
UnifyFunctionExitNodes.cpp Apply clang-tidy's modernize-loop-convert to most of lib/Transforms. 2016-06-26 12:28:59 +00:00
Utils.cpp Add PredicateInfo utility and printing pass 2017-02-07 21:10:46 +00:00
ValueMapper.cpp "Use" lambda captures which are otherwise only used in asserts. NFC 2017-01-13 21:02:41 +00:00