Start trying to make InstCombine preserve more debug info. The idea here is to set...
authorEli Friedman <eli.friedman@gmail.com>
Wed, 18 May 2011 01:28:27 +0000 (01:28 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Wed, 18 May 2011 01:28:27 +0000 (01:28 +0000)
commitef819d0ed8c9df3da633e8c1240e582a7879bb94
tree3c485c63e96490b2b75e90a76968ed8a1cd52f1e
parent3e22cb9ec30cd9b1be9b0f50e400f512124997e5
Start trying to make InstCombine preserve more debug info.  The idea here is to set the debug location on the IRBuilder, which will be then right location in most cases.  This should magically give many transformations debug locations, and fixing places which are missing a debug location will usually just means changing the code creating it to use the IRBuilder.

As an example, the change to InstCombineCalls catches a common case where a call to a bitcast of a function is rewritten.

Chris, does this approach look reasonable?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131516 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCalls.cpp
lib/Transforms/InstCombine/InstructionCombining.cpp
test/Transforms/InstCombine/call.ll