OSDN Git Service

[SimplifyCFG] Merge debug locations when hoisting an instruction from a then/else...
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Thu, 15 Dec 2016 20:01:26 +0000 (20:01 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Thu, 15 Dec 2016 20:01:26 +0000 (20:01 +0000)
commit84ecaa6c567659938d80954ef8289bb7b38f5cab
tree902102d9d4fab7aacbb235e7ea1faa15882a98f4
parentf192c5da476d093b98bef5450bfbf2749aeafb86
[SimplifyCFG] Merge debug locations when hoisting an instruction from a then/else branch. NFC.

Now that a new API to merge debug locations has been committed at r289661 (see
review D26256 for more details), we can use it to "improve" the code added by
revision r280995.

Instead of nulling the debugloc of a commoned instruction, we use the 'merged'
debug location. At the moment, this is just a no functional change since
function `DILocation::getMergedLocation()` is just a stub and would always
return a null location.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289862 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/SimplifyCFG.cpp