OSDN Git Service

Update getMergedLocation to check the instruction type and merge properly.
authorDehao Chen <dehao@google.com>
Mon, 2 Oct 2017 18:13:14 +0000 (18:13 +0000)
committerDehao Chen <dehao@google.com>
Mon, 2 Oct 2017 18:13:14 +0000 (18:13 +0000)
commit50b210a97a629f1787c879037af5f0beaccc69f2
tree167f68cacbaf55340ba598497739146a1143e51c
parent669e5cb88da323f46bffb12525f98ded0974beb1
Update getMergedLocation to check the instruction type and merge properly.

Summary: If the merged instruction is call instruction, we need to set the scope to the closes common scope between 2 locations, otherwise it will cause trouble when the call is getting inlined.

Reviewers: dblaikie, aprantl

Reviewed By: dblaikie, aprantl

Subscribers: llvm-commits, sanjoy

Differential Revision: https://reviews.llvm.org/D37877

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314694 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/DebugInfoMetadata.h
include/llvm/IR/Instruction.h
lib/IR/DebugInfo.cpp
lib/Transforms/IPO/FunctionImport.cpp
lib/Transforms/InstCombine/InstCombineInternal.h
lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
lib/Transforms/InstCombine/InstCombinePHI.cpp
lib/Transforms/Utils/SimplifyCFG.cpp
test/Transforms/SimplifyCFG/remove-debug.ll