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 | e450d7444df4a430b2afae8ebf69d152b8f41e17 (patch) | |
tree | a5efd35fcee157ae61b7b6aa8a86fcafb01d22af /llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | |
parent | aedb8a35355f451564975865694314ea20c8a37c (diff) | |
download | bcm5719-llvm-e450d7444df4a430b2afae8ebf69d152b8f41e17.tar.gz bcm5719-llvm-e450d7444df4a430b2afae8ebf69d152b8f41e17.zip |
Sink DebugLoc handling out of SelectionDAGISel into FastISel and
SelectionDAGBuilder, where it doesn't have to be as complicated.
llvm-svn: 101848
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
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; } |