summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@google.com>2014-10-22 13:36:35 +0000
committerDiego Novillo <dnovillo@google.com>2014-10-22 13:36:35 +0000
commita67c0b43e151672a49814abf12350d1de03cefc4 (patch)
treec774a64609ba0f4ae429837e6dc3ff67b05e2bf5 /llvm/lib/Transforms
parent61e652334fe94931138706472c4f052cc9b8207a (diff)
downloadbcm5719-llvm-a67c0b43e151672a49814abf12350d1de03cefc4.tar.gz
bcm5719-llvm-a67c0b43e151672a49814abf12350d1de03cefc4.zip
Change error to warning when a profile cannot be found.
When the profile for a function cannot be applied, we use to emit an error. This seems extreme. The compiler can continue, it's just that the optimization opportunities won't include profile information. llvm-svn: 220386
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/SampleProfile.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/SampleProfile.cpp b/llvm/lib/Transforms/Scalar/SampleProfile.cpp
index 211e5920ec3..0749265d2a8 100644
--- a/llvm/lib/Transforms/Scalar/SampleProfile.cpp
+++ b/llvm/lib/Transforms/Scalar/SampleProfile.cpp
@@ -673,7 +673,9 @@ unsigned SampleProfileLoader::getFunctionLoc(Function &F) {
// If could not find the start of \p F, emit a diagnostic to inform the user
// about the missed opportunity.
F.getContext().diagnose(DiagnosticInfoSampleProfile(
- "No debug information found in function " + F.getName()));
+ "No debug information found in function " + F.getName() +
+ ": Function profile not used",
+ DS_Warning));
return 0;
}
OpenPOWER on IntegriCloud