diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2017-01-23 22:40:08 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2017-01-23 22:40:08 +0000 |
commit | 29e56bceec5253c691abfc8bd7a0f916725d657f (patch) | |
tree | f2b86c9cd8d883602aa4b266db123ffea96976ad /llvm/lib/Transforms/IPO/SampleProfile.cpp | |
parent | fd1e5aa8dffa8b26e59fb340668b264b9ac80382 (diff) | |
download | bcm5719-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.cpp | 4 |
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 '") + |