[PATCH] D23727: [Profile] SelectInst instrumentation Support in IR-PGO

David Li via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 19 14:57:44 PDT 2016


davidxl created this revision.
davidxl added reviewers: xur, vsk.
davidxl added a subscriber: llvm-commits.

Select instructions are currently ignored by PGO leading to missing profile data which is useful in guiding the select instruction lowering. This patch implements this missing feature for IRPGO.

A new counter increment intrinsic is introduced  (extended from existing increment) that also takes a step argument. It is used to track the number times the true value of a select instruction is taken. The FalseValue count is derived from TrueValue count and the parent BB's profile count.




https://reviews.llvm.org/D23727

Files:
  include/llvm/IR/IntrinsicInst.h
  include/llvm/IR/Intrinsics.td
  lib/Transforms/Instrumentation/InstrProfiling.cpp
  lib/Transforms/Instrumentation/PGOInstrumentation.cpp
  test/Transforms/PGOProfile/Inputs/select1.proftext
  test/Transforms/PGOProfile/select1.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23727.68731.patch
Type: text/x-patch
Size: 13343 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160819/66cc9889/attachment.bin>


More information about the llvm-commits mailing list