[PATCH] D19301: Tune basic block annotation algorithm.

Dehao Chen via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 19 16:57:08 PDT 2016


danielcdh created this revision.
danielcdh added reviewers: dnovillo, davidxl.
danielcdh added a subscriber: llvm-commits.

Instead of using maximum IR weight as the basic block weight, this patch uses the voting algorithm to find the most likely weight for the basic block. This can effectively avoid the cases when some IRs are annotated incorrectly due to code motion of the profiled binary.

This patch also updates propagate.ll unittest to include discriminator in the input file so that it is testing something meaningful.

http://reviews.llvm.org/D19301

Files:
  lib/Transforms/IPO/SampleProfile.cpp
  test/Transforms/SampleProfile/Inputs/propagate.prof
  test/Transforms/SampleProfile/propagate.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19301.54294.patch
Type: text/x-patch
Size: 26076 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160419/b3191284/attachment.bin>


More information about the llvm-commits mailing list