summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms
diff options
context:
space:
mode:
authorWei Mi <wmi@google.com>2019-08-23 19:05:30 +0000
committerWei Mi <wmi@google.com>2019-08-23 19:05:30 +0000
commitbe9073249e346759f39ca90cb1df80c3b02ca41c (patch)
tree7f4eb9931134294bb233bf7749e1be76d982059a /llvm/test/Transforms
parentb4051e57b104d17ed4f5be21e3c54f80d170b97f (diff)
downloadbcm5719-llvm-be9073249e346759f39ca90cb1df80c3b02ca41c.tar.gz
bcm5719-llvm-be9073249e346759f39ca90cb1df80c3b02ca41c.zip
[SampleFDO] Add ExtBinary format to support extension of binary profile.
This is a patch split from https://reviews.llvm.org/D66374. It tries to add a new format of profile called ExtBinary. The format adds a section header table to the profile and organize the profile in sections, so the future extension like adding a new section or extending an existing section will be easier while keeping backward compatiblity feasible. Differential Revision: https://reviews.llvm.org/D66513 llvm-svn: 369798
Diffstat (limited to 'llvm/test/Transforms')
-rw-r--r--llvm/test/Transforms/SampleProfile/Inputs/inline.extbinary.afdobin0 -> 272 bytes
-rw-r--r--llvm/test/Transforms/SampleProfile/profile-format.ll (renamed from llvm/test/Transforms/SampleProfile/compact-binary-profile.ll)6
2 files changed, 4 insertions, 2 deletions
diff --git a/llvm/test/Transforms/SampleProfile/Inputs/inline.extbinary.afdo b/llvm/test/Transforms/SampleProfile/Inputs/inline.extbinary.afdo
new file mode 100644
index 00000000000..f1a1f87820f
--- /dev/null
+++ b/llvm/test/Transforms/SampleProfile/Inputs/inline.extbinary.afdo
Binary files differ
diff --git a/llvm/test/Transforms/SampleProfile/compact-binary-profile.ll b/llvm/test/Transforms/SampleProfile/profile-format.ll
index 3b0a2a47c31..4f7ae0a06a4 100644
--- a/llvm/test/Transforms/SampleProfile/compact-binary-profile.ll
+++ b/llvm/test/Transforms/SampleProfile/profile-format.ll
@@ -2,6 +2,8 @@
; RUN: opt < %s -passes=sample-profile -sample-profile-file=%S/Inputs/inline.prof -S | FileCheck %s
; RUN: opt < %s -sample-profile -sample-profile-file=%S/Inputs/inline.compactbinary.afdo -S | FileCheck %s
; RUN: opt < %s -passes=sample-profile -sample-profile-file=%S/Inputs/inline.compactbinary.afdo -S | FileCheck %s
+; RUN: opt < %s -sample-profile -sample-profile-file=%S/Inputs/inline.extbinary.afdo -S | FileCheck %s
+; RUN: opt < %s -passes=sample-profile -sample-profile-file=%S/Inputs/inline.extbinary.afdo -S | FileCheck %s
; Original C++ test case
;
@@ -21,8 +23,8 @@
;
@.str = private unnamed_addr constant [11 x i8] c"sum is %d\0A\00", align 1
-; Check sample-profile phase using compactbinary format profile will annotate
-; the IR with exactly the same result as using text format.
+; Check sample-profile phase using compactbinary or extbinary format profile
+; will annotate the IR with exactly the same result as using text format.
; CHECK: br i1 %cmp, label %while.body, label %while.end{{.*}} !prof ![[IDX1:[0-9]*]]
; CHECK: br i1 %cmp1, label %if.then, label %if.else{{.*}} !prof ![[IDX2:[0-9]*]]
; CHECK: call i32 (i8*, ...) @printf{{.*}} !prof ![[IDX3:[0-9]*]]
OpenPOWER on IntegriCloud