diff options
author | Amy Huang <akhuang@google.com> | 2019-10-30 17:31:12 -0700 |
---|---|---|
committer | Amy Huang <akhuang@google.com> | 2019-10-30 17:31:12 -0700 |
commit | 004ed2b0d1b86d424643ffc88fce20ad8bab6804 (patch) | |
tree | 35cf8523de716a0dd8cb975f319075f0e87324ec /llvm/lib/Transforms/Utils/InlineFunction.cpp | |
parent | 6d03890384517919a3ba7fe4c35535425f278f89 (diff) | |
download | bcm5719-llvm-004ed2b0d1b86d424643ffc88fce20ad8bab6804.tar.gz bcm5719-llvm-004ed2b0d1b86d424643ffc88fce20ad8bab6804.zip |
Revert "[CodeView] Add option to disable inline line tables."
because it breaks compiler-rt tests.
This reverts commit 6d03890384517919a3ba7fe4c35535425f278f89.
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/InlineFunction.cpp | 41 |
1 files changed, 11 insertions, 30 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp index b522dd2b631..7e08da35563 100644 --- a/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -1405,10 +1405,6 @@ static void fixupLineNumbers(Function *Fn, Function::iterator FI, // other. DenseMap<const MDNode *, MDNode *> IANodes; - // Check if we are not generating inline line tables and want to use - // the call site location instead. - bool NoInlineLineTables = Fn->hasFnAttribute("no-inline-line-tables"); - for (; FI != Fn->end(); ++FI) { for (BasicBlock::iterator BI = FI->begin(), BE = FI->end(); BI != BE; ++BI) { @@ -1420,22 +1416,20 @@ static void fixupLineNumbers(Function *Fn, Function::iterator FI, BI->setMetadata(LLVMContext::MD_loop, NewLoopID); } - if (!NoInlineLineTables) - if (DebugLoc DL = BI->getDebugLoc()) { - DebugLoc IDL = - inlineDebugLoc(DL, InlinedAtNode, BI->getContext(), IANodes); - BI->setDebugLoc(IDL); - continue; - } + if (DebugLoc DL = BI->getDebugLoc()) { + DebugLoc IDL = + inlineDebugLoc(DL, InlinedAtNode, BI->getContext(), IANodes); + BI->setDebugLoc(IDL); + continue; + } - if (CalleeHasDebugInfo && !NoInlineLineTables) + if (CalleeHasDebugInfo) continue; - // If the inlined instruction has no line number, or if inline info - // is not being generated, make it look as if it originates from the call - // location. This is important for ((__always_inline, __nodebug__)) - // functions which must use caller location for all instructions in their - // function body. + // If the inlined instruction has no line number, make it look as if it + // originates from the call location. This is important for + // ((__always_inline__, __nodebug__)) functions which must use caller + // location for all instructions in their function body. // Don't update static allocas, as they may get moved later. if (auto *AI = dyn_cast<AllocaInst>(BI)) @@ -1444,19 +1438,6 @@ static void fixupLineNumbers(Function *Fn, Function::iterator FI, BI->setDebugLoc(TheCallDL); } - - // Remove debug info intrinsics if we're not keeping inline info. - if (NoInlineLineTables) { - BasicBlock::iterator BI = FI->begin(); - while (BI != FI->end()) { - if (isa<DbgInfoIntrinsic>(BI)) { - BI = BI->eraseFromParent(); - continue; - } - ++BI; - } - } - } } |