summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/SampleProfile.cpp
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2017-01-23 22:40:08 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2017-01-23 22:40:08 +0000
commit29e56bceec5253c691abfc8bd7a0f916725d657f (patch)
treef2b86c9cd8d883602aa4b266db123ffea96976ad /llvm/lib/Transforms/IPO/SampleProfile.cpp
parentfd1e5aa8dffa8b26e59fb340668b264b9ac80382 (diff)
downloadbcm5719-llvm-29e56bceec5253c691abfc8bd7a0f916725d657f.tar.gz
bcm5719-llvm-29e56bceec5253c691abfc8bd7a0f916725d657f.zip
Revert "Refactor SampleProfile.cpp to move computation inside a branch. (NFC)"
Causes MSan failures on the buildbot. llvm-svn: 292840
Diffstat (limited to 'llvm/lib/Transforms/IPO/SampleProfile.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/SampleProfile.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/IPO/SampleProfile.cpp b/llvm/lib/Transforms/IPO/SampleProfile.cpp
index 9b280958da8..cba0a813c44 100644
--- a/llvm/lib/Transforms/IPO/SampleProfile.cpp
+++ b/llvm/lib/Transforms/IPO/SampleProfile.cpp
@@ -651,9 +651,9 @@ bool SampleProfileLoader::inlineHotFunctions(Function &F) {
Function *CalledFunction = CS.getCalledFunction();
if (!CalledFunction || !CalledFunction->getSubprogram())
continue;
+ DebugLoc DLoc = I->getDebugLoc();
+ uint64_t NumSamples = findCalleeFunctionSamples(*I)->getTotalSamples();
if (InlineFunction(CS, IFI)) {
- DebugLoc DLoc = I->getDebugLoc();
- uint64_t NumSamples = findCalleeFunctionSamples(*I)->getTotalSamples();
LocalChanged = true;
emitOptimizationRemark(Ctx, DEBUG_TYPE, F, DLoc,
Twine("inlined hot callee '") +
OpenPOWER on IntegriCloud