OSDN Git Service

[DebugInfo] Create merged locations for instructions other than calls
authorVedant Kumar <vsk@apple.com>
Thu, 12 Apr 2018 20:58:24 +0000 (20:58 +0000)
committerVedant Kumar <vsk@apple.com>
Thu, 12 Apr 2018 20:58:24 +0000 (20:58 +0000)
commit85af7e11586b929b381719dd692c013d28014097
treec7ff605ad2f3bb62e914f7612070dd0219c244c5
parenta8d61ae2cdb7d837f6391d42653350b64aff8797
[DebugInfo] Create merged locations for instructions other than calls

This lifts a restriction on DILocation::getMergedLocation(), allowing it
to create merged locations for instructions other than calls.

Instruction::applyMergedLocation() now defaults to creating merged
locations for all instructions.

The default behavior of getMergedLocation() is unchanged: callers which
invoke it directly are unaffected.

This change will enable a follow-up Mem2Reg fix which improves crash
reporting.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329955 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/DebugInfoMetadata.h
lib/IR/DebugInfo.cpp
lib/IR/DebugInfoMetadata.cpp
test/DebugInfo/Generic/instcombine-phi.ll
test/DebugInfo/Generic/simplifycfg_sink_last_inst.ll
test/DebugInfo/Generic/store-tail-merge.ll
test/Transforms/SimplifyCFG/remove-debug-2.ll
test/Transforms/SimplifyCFG/remove-debug.ll