[SelectionDAG] Consolidate (t|T)ransferDbgValues methods, NFC (reapply)
authorVedant Kumar <vsk@apple.com>
Fri, 17 Nov 2017 01:48:33 +0000 (01:48 +0000)
committerVedant Kumar <vsk@apple.com>
Fri, 17 Nov 2017 01:48:33 +0000 (01:48 +0000)
commit4d7f2b02d63b940ec45c39c4f63351a0f332cd25
treede1a444630a7be5805e1f73849ab1888785abad5
parentbec3765bea45a393e38932d35f50dba60b361d27
[SelectionDAG] Consolidate (t|T)ransferDbgValues methods, NFC (reapply)

TransferDbgValues (capital 'T') is wired into ReplaceAllUsesWith, and
transferDbgValues (lowercase 't') is used elsewhere (e.g in Legalize).

Both functions should be doing the exact same thing. This patch
consolidates the logic into one place.

This was reverted in r318455 because some newly introduced asserts,
which I thought were NFC, were firing. I filed PR35338. For now I've
weakened the asserts.

Testing: check-llvm, check-clang, and a stage2 Rel+Deb build of clang

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

llvm-svn: 318498
llvm/include/llvm/CodeGen/SelectionDAG.h
llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp