[PATCH] D28966: [PGO] Memory intrinsic calls optimization based on profiled size

Rong Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 20 13:26:26 PST 2017


xur created this revision.

This patch optimizes two memory intrinsic operations: memset and memcpy based on the profiled size of the operation. The high level transformation is like:
mem_op(..., size)

>
-

switch (size) {

  case s1:
     mem_op(..., s1);
     goto merge_bb;
  case s2:
     mem_op(..., s2);
     goto merge_bb;
  ...
  default:
     mem_op(..., size);
     goto merge_bb;
  }

merge_bb:

There are a few internal options that controls when the optimization takes place.

This patch in an incremental patch based on
https://reviews.llvm.org/D28965


https://reviews.llvm.org/D28966

Files:
  lib/Transforms/Instrumentation/PGOInstrumentation.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28966.85180.patch
Type: text/x-patch
Size: 7722 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170120/5d08296b/attachment.bin>


More information about the llvm-commits mailing list