[PATCH] D26420: Encode duplication factor from loop vectorization and loop unrolling to discriminator.

Dehao Chen via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 8 13:52:35 PST 2016


danielcdh created this revision.
danielcdh added reviewers: hfinkel, probinson, aprantl, davidxl.
danielcdh added a subscriber: llvm-commits.
Herald added a subscriber: mzolotukhin.

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.


https://reviews.llvm.org/D26420

Files:
  include/llvm/IR/DebugInfoMetadata.h
  lib/Transforms/Utils/AddDiscriminators.cpp
  lib/Transforms/Utils/LoopUnroll.cpp
  lib/Transforms/Vectorize/LoopVectorize.cpp
  test/Transforms/LoopVectorize/discriminator.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26420.77252.patch
Type: text/x-patch
Size: 8818 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161108/89dab22d/attachment.bin>


More information about the llvm-commits mailing list