OSDN Git Service

[BranchFolding] Merge debug locations from common tail instead of removing
authorTaewook Oh <twoh@fb.com>
Wed, 15 Mar 2017 05:44:59 +0000 (05:44 +0000)
committerTaewook Oh <twoh@fb.com>
Wed, 15 Mar 2017 05:44:59 +0000 (05:44 +0000)
commit5c088820badb6a40eb0f76ca52c52c90a7776e53
treec955781f56d6e11493aeab12913a026bcd72dd9d
parentc7a57cdda643e397720daa35ea3b1c4b7ce42371
[BranchFolding] Merge debug locations from common tail instead of removing

Summary: D25742 improved the precision of debug locations for PGO by removing debug locations from common tail when tail-merging. However, if identical insturctions that are merged into a common tail have the same debug locations, there's no need to remove them. This patch creates a merged debug location of identical instructions across SameTails and assign it to the instruction in the common tail, so that the debug locations are maintained if they are same across identical instructions.

Reviewers: aprantl, probinson, MatzeB, rob.lougher

Reviewed By: aprantl

Subscribers: andreadb, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297805 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/BranchFolding.cpp
lib/CodeGen/BranchFolding.h
test/CodeGen/X86/tail-merge-debugloc.ll [new file with mode: 0644]