summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-10-04 22:00:35 +0000
committerBill Wendling <isanbard@gmail.com>2011-10-04 22:00:35 +0000
commit3d11aa7e7566d1f38da584679e62102bbef4d116 (patch)
treed247a707c01c6881e9becf47eb77968c76257d3a /llvm/lib/CodeGen
parent10f2de32614f57d23268b2a86bc2e8d039e37e48 (diff)
downloadbcm5719-llvm-3d11aa7e7566d1f38da584679e62102bbef4d116.tar.gz
bcm5719-llvm-3d11aa7e7566d1f38da584679e62102bbef4d116.zip
Create a mapping between the landing pad basic block and the call site index for later use.
llvm-svn: 141125
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp2
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h3
2 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index daefaf0fa05..6eb862a0525 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -5250,6 +5250,8 @@ void SelectionDAGBuilder::LowerCallTo(ImmutableCallSite CS, SDValue Callee,
unsigned CallSiteIndex = MMI.getCurrentCallSite();
if (CallSiteIndex) {
MMI.setCallSiteBeginLabel(BeginLabel, CallSiteIndex);
+ LPadToCallSiteMap[LandingPad] = CallSiteIndex;
+
// Now that the call site is handled, stop tracking it.
MMI.setCurrentCallSite(0);
}
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
index 9039f4defa8..521e4d39384 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
@@ -320,6 +320,9 @@ public:
/// GFI - Garbage collection metadata for the function.
GCFunctionInfo *GFI;
+ /// LPadToBeginLabelMap - Map a landing pad to the begin label.
+ DenseMap<MachineBasicBlock*, unsigned> LPadToCallSiteMap;
+
/// HasTailCall - This is set to true if a call in the current
/// block has been translated as a tail call. In this case,
/// no subsequent DAG nodes should be created.
OpenPOWER on IntegriCloud