From 35de1443fcaaa9e0ddc9681f134ae4fb33d89828 Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Mon, 23 Jan 2017 22:40:08 +0000 Subject: [PATCH] Revert "Refactor SampleProfile.cpp to move computation inside a branch. (NFC)" Causes MSan failures on the buildbot. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292840 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/IPO/SampleProfile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Transforms/IPO/SampleProfile.cpp b/lib/Transforms/IPO/SampleProfile.cpp index 9b280958da8..cba0a813c44 100644 --- a/lib/Transforms/IPO/SampleProfile.cpp +++ b/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 '") + -- 2.40.0