[mlir][LLVMIR] Do not create pseudo debug file name using llvm::Instruction
authorMin-Yih Hsu <minyihh@uci.edu>
Mon, 19 Sep 2022 21:50:14 +0000 (14:50 -0700)
committerMin-Yih Hsu <minyihh@uci.edu>
Wed, 21 Sep 2022 16:46:58 +0000 (09:46 -0700)
commit006a752a3c033950eb16db6b63574c309fa43241
tree18df233d4d2c7c3e7ec6874d1861827506c7d75a
parentc136d8582b3ddc507432663c2d6027ee51d62283
[mlir][LLVMIR] Do not create pseudo debug file name using llvm::Instruction

Previously in mlir-translate, if debug info was absent in a
llvm::Instruction, we tried to create one using the name of its defined
value in a textual LLVM IR file as the (pseudo) debug file name.
However, in order to get that name, we need to call out to LLVM's
SlotTracker, which, surprisingly, took a lot of time. Judging from
the usefulness of such pseudo debug file name and the performance penalty
during translation, this patch simply use "imported-bitcode" as the
debug file name in these case. Eliminating the need of using (expensive)
LLVM value numbering.

Differential Revision: https://reviews.llvm.org/D134305
mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
mlir/test/Target/LLVMIR/Import/basic.ll