Skip to content

Commit

Permalink
Assign node order numbers to results of call instruction lowering. Th…
Browse files Browse the repository at this point in the history
…is should improve src line debug info when sdisel is used. rdar://9199118

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128728 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Evan Cheng committed Apr 1, 2011
1 parent c2db19e commit 8380c03
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4927,15 +4927,19 @@ void SelectionDAGBuilder::LowerCallTo(ImmutableCallSite CS, SDValue Callee,
DAG.getNode(ISD::MERGE_VALUES, getCurDebugLoc(),
DAG.getVTList(&RetTys[0], RetTys.size()),
&ReturnValues[0], ReturnValues.size()));

}

// As a special case, a null chain means that a tail call has been emitted and
// the DAG root is already updated.
if (Result.second.getNode())
DAG.setRoot(Result.second);
else
if (!Result.second.getNode()) {
HasTailCall = true;
++SDNodeOrder;
AssignOrderingToNode(DAG.getRoot().getNode());
} else {
DAG.setRoot(Result.second);
++SDNodeOrder;
AssignOrderingToNode(Result.second.getNode());
}

if (LandingPad) {
// Insert a label at the end of the invoke call to mark the try range. This
Expand Down

0 comments on commit 8380c03

Please sign in to comment.