[PATCH] D25262: Add an llvm-opt-report tool to generate basic source-annotated optimization summaries

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 5 07:55:46 PDT 2016


hfinkel updated this revision to Diff 73647.
hfinkel added a comment.

Updated to add vectorization and unrolling factors to the output (this can be disabled by passing -s). So the output now looks like this:

  < /tmp/v.c
   2          | void bar();
   3          | void foo() { bar(); }
   4          |
   5          | void Test(int *res, int *c, int *d, int *p, int n) {
   6          |   int i;
   7          |
   8          | #pragma clang loop vectorize(assume_safety)
   9     V4,2 |   for (i = 0; i < 1600; i++) {
  10          |     res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
  11          |   }
  12          |
  13  U16     |   for (i = 0; i < 16; i++) {
  14          |     res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
  15          |   }
  16          |
  17 I        |   foo();
  18          |
  19          |   foo(); bar(); foo();
     I        |   ^
     I        |                 ^
  20          | }


https://reviews.llvm.org/D25262

Files:
  test/CMakeLists.txt
  test/tools/llvm-opt-report/Inputs/or.c
  test/tools/llvm-opt-report/Inputs/or.h
  test/tools/llvm-opt-report/Inputs/or.yaml
  test/tools/llvm-opt-report/basic.test
  tools/llvm-opt-report/CMakeLists.txt
  tools/llvm-opt-report/OptReport.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25262.73647.patch
Type: text/x-patch
Size: 26904 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161005/01df269b/attachment.bin>


More information about the llvm-commits mailing list