From e450d7444df4a430b2afae8ebf69d152b8f41e17 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 20 Apr 2010 00:48:35 +0000 Subject: Sink DebugLoc handling out of SelectionDAGISel into FastISel and SelectionDAGBuilder, where it doesn't have to be as complicated. llvm-svn: 101848 --- llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/SelectionDAG/FastISel.cpp') diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp index c791c45c0e0..cd72fe7003d 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -552,14 +552,21 @@ bool FastISel::SelectBitCast(const User *I) { bool FastISel::SelectInstruction(const Instruction *I) { + DL = I->getDebugLoc(); + // First, try doing target-independent selection. - if (SelectOperator(I, I->getOpcode())) + if (SelectOperator(I, I->getOpcode())) { + DL = DebugLoc(); return true; + } // Next, try calling the target to attempt to handle the instruction. - if (TargetSelectInstruction(I)) + if (TargetSelectInstruction(I)) { + DL = DebugLoc(); return true; + } + DL = DebugLoc(); return false; } -- cgit v1.2.3