diff options
author | Dan Gohman <gohman@apple.com> | 2010-04-20 00:48:35 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-04-20 00:48:35 +0000 |
commit | 8ba3aa7f9c5048c31172788f98ad2b90ffad565a (patch) | |
tree | 684d0f201d34df6e4c12aa63b2cd7eb4680a8926 /lib/CodeGen/SelectionDAG/FastISel.cpp | |
parent | 8a39ed75ec57c7fabde318c0d45fac014ac287f4 (diff) | |
download | external_llvm-8ba3aa7f9c5048c31172788f98ad2b90ffad565a.zip external_llvm-8ba3aa7f9c5048c31172788f98ad2b90ffad565a.tar.gz external_llvm-8ba3aa7f9c5048c31172788f98ad2b90ffad565a.tar.bz2 |
Sink DebugLoc handling out of SelectionDAGISel into FastISel and
SelectionDAGBuilder, where it doesn't have to be as complicated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101848 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/FastISel.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp index c791c45..cd72fe7 100644 --- a/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/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; } |