diff options
author | Diego Novillo <dnovillo@google.com> | 2014-03-18 12:03:12 +0000 |
---|---|---|
committer | Diego Novillo <dnovillo@google.com> | 2014-03-18 12:03:12 +0000 |
commit | 213bb0024564cbd0119452bd1c21b273857b9531 (patch) | |
tree | 039518fa85cf3aad1e8e9e433245d79861d09d3b /llvm/test/Transforms/SampleProfile/syntax.ll | |
parent | 9e5341d64ad32d3d4eec7c892a4f601039dd6c8f (diff) | |
download | bcm5719-llvm-213bb0024564cbd0119452bd1c21b273857b9531.tar.gz bcm5719-llvm-213bb0024564cbd0119452bd1c21b273857b9531.zip |
Tolerate unmangled names in sample profiles.
Summary:
The compiler does not always generate linkage names. If a function
has been inlined and its body elided, its linkage name may not be
generated.
When the binary executes, the profiler will use its unmangled name
when attributing samples. This results in unmangled names in the
input profile.
We are currently failing hard when this happens. However, in this case
all that happens is that we fail to attribute samples to the inlined
function. While this means fewer optimization opportunities, it should
not cause a compilation failure.
This patch accepts all valid function names, regardless of whether
they were mangled or not.
Reviewers: chandlerc
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D3087
llvm-svn: 204142
Diffstat (limited to 'llvm/test/Transforms/SampleProfile/syntax.ll')
-rw-r--r-- | llvm/test/Transforms/SampleProfile/syntax.ll | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/test/Transforms/SampleProfile/syntax.ll b/llvm/test/Transforms/SampleProfile/syntax.ll index e08234e1626..53c65f44239 100644 --- a/llvm/test/Transforms/SampleProfile/syntax.ll +++ b/llvm/test/Transforms/SampleProfile/syntax.ll @@ -5,6 +5,7 @@ ; RUN: not opt < %s -sample-profile -sample-profile-file=%S/Inputs/bad_line_values.prof 2>&1 | FileCheck -check-prefix=BAD-LINE-VALUES %s ; RUN: not opt < %s -sample-profile -sample-profile-file=%S/Inputs/bad_discriminator_value.prof 2>&1 | FileCheck -check-prefix=BAD-DISCRIMINATOR-VALUE %s ; RUN: not opt < %s -sample-profile -sample-profile-file=%S/Inputs/bad_samples.prof 2>&1 | FileCheck -check-prefix=BAD-SAMPLES %s +; RUN: opt < %s -sample-profile -sample-profile-file=%S/Inputs/bad_mangle.prof 2>&1 >/dev/null define void @empty() { entry: @@ -12,7 +13,7 @@ entry: } ; NO-DEBUG: error: No debug information found in function empty ; MISSING-FILE: error: missing.prof: -; BAD-FN-HEADER: error: {{.*}}bad_fn_header.prof:1: Expected 'mangled_name:NUM:NUM', found empty:100:BAD +; BAD-FN-HEADER: error: {{.*}}bad_fn_header.prof:1: Expected 'mangled_name:NUM:NUM', found 3empty:100:BAD ; BAD-SAMPLE-LINE: error: {{.*}}bad_sample_line.prof:3: Expected 'NUM[.NUM]: NUM[ mangled_name:NUM]*', found 1: BAD ; BAD-LINE-VALUES: error: {{.*}}bad_line_values.prof:2: Expected 'mangled_name:NUM:NUM', found -1: 10 ; BAD-DISCRIMINATOR-VALUE: error: {{.*}}bad_discriminator_value.prof:2: Expected 'NUM[.NUM]: NUM[ mangled_name:NUM]*', found 1.-3: 10 |