diff options
author | Dehao Chen <dehao@google.com> | 2017-10-26 21:20:52 +0000 |
---|---|---|
committer | Dehao Chen <dehao@google.com> | 2017-10-26 21:20:52 +0000 |
commit | ed2d5402cb16e77dd2cf720a09b5638f6aa4ef33 (patch) | |
tree | 3861031ef001bb68d469ef4861a22dfd3d100ddb /llvm/lib/Transforms/Utils/LoopUnroll.cpp | |
parent | b8d7d4d683ada9f4d0cf40a07ab794ee9fddfafe (diff) | |
download | llvm-ed2d5402cb16e77dd2cf720a09b5638f6aa4ef33.zip llvm-ed2d5402cb16e77dd2cf720a09b5638f6aa4ef33.tar.gz llvm-ed2d5402cb16e77dd2cf720a09b5638f6aa4ef33.tar.bz2 |
Do not add discriminator encoding for debug intrinsics.
Summary: There are certain requirements for debug location of debug intrinsics, e.g. the scope of the DILocalVariable should be the same as the scope of its debug location. As a result, we should not add discriminator encoding for debug intrinsics.
Reviewers: dblaikie, aprantl
Reviewed By: aprantl
Subscribers: JDevlieghere, aprantl, bjope, sanjoy, llvm-commits
Differential Revision: https://reviews.llvm.org/D39343
llvm-svn: 316703
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUnroll.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopUnroll.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUnroll.cpp b/llvm/lib/Transforms/Utils/LoopUnroll.cpp index 2994401..ebab844 100644 --- a/llvm/lib/Transforms/Utils/LoopUnroll.cpp +++ b/llvm/lib/Transforms/Utils/LoopUnroll.cpp @@ -544,8 +544,9 @@ LoopUnrollResult llvm::UnrollLoop( if (Header->getParent()->isDebugInfoForProfiling()) for (BasicBlock *BB : L->getBlocks()) for (Instruction &I : *BB) - if (const DILocation *DIL = I.getDebugLoc()) - I.setDebugLoc(DIL->cloneWithDuplicationFactor(Count)); + if (!isa<DbgInfoIntrinsic>(&I)) + if (const DILocation *DIL = I.getDebugLoc()) + I.setDebugLoc(DIL->cloneWithDuplicationFactor(Count)); for (unsigned It = 1; It != Count; ++It) { std::vector<BasicBlock*> NewBlocks; |