mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-20 03:23:01 +02:00
Modify the mapping from landing pad to call sites to accept more than one call
site. llvm-svn: 141226
This commit is contained in:
parent
94f80818c1
commit
7a40520a37
@ -5250,7 +5250,7 @@ void SelectionDAGBuilder::LowerCallTo(ImmutableCallSite CS, SDValue Callee,
|
|||||||
unsigned CallSiteIndex = MMI.getCurrentCallSite();
|
unsigned CallSiteIndex = MMI.getCurrentCallSite();
|
||||||
if (CallSiteIndex) {
|
if (CallSiteIndex) {
|
||||||
MMI.setCallSiteBeginLabel(BeginLabel, CallSiteIndex);
|
MMI.setCallSiteBeginLabel(BeginLabel, CallSiteIndex);
|
||||||
LPadToCallSiteMap[LandingPad] = CallSiteIndex;
|
LPadToCallSiteMap[LandingPad].push_back(CallSiteIndex);
|
||||||
|
|
||||||
// Now that the call site is handled, stop tracking it.
|
// Now that the call site is handled, stop tracking it.
|
||||||
MMI.setCurrentCallSite(0);
|
MMI.setCurrentCallSite(0);
|
||||||
|
@ -320,8 +320,8 @@ public:
|
|||||||
/// GFI - Garbage collection metadata for the function.
|
/// GFI - Garbage collection metadata for the function.
|
||||||
GCFunctionInfo *GFI;
|
GCFunctionInfo *GFI;
|
||||||
|
|
||||||
/// LPadToBeginLabelMap - Map a landing pad to the begin label.
|
/// LPadToCallSiteMap - Map a landing pad to the call site indexes.
|
||||||
DenseMap<MachineBasicBlock*, unsigned> LPadToCallSiteMap;
|
DenseMap<MachineBasicBlock*, SmallVector<unsigned, 4> > LPadToCallSiteMap;
|
||||||
|
|
||||||
/// HasTailCall - This is set to true if a call in the current
|
/// HasTailCall - This is set to true if a call in the current
|
||||||
/// block has been translated as a tail call. In this case,
|
/// block has been translated as a tail call. In this case,
|
||||||
|
@ -691,6 +691,9 @@ void SelectionDAGISel::PrepareEHLandingPad() {
|
|||||||
// landing pad can thus be detected via the MachineModuleInfo.
|
// landing pad can thus be detected via the MachineModuleInfo.
|
||||||
MCSymbol *Label = MF->getMMI().addLandingPad(MBB);
|
MCSymbol *Label = MF->getMMI().addLandingPad(MBB);
|
||||||
|
|
||||||
|
// Assign the call site to the landing pad's begin label.
|
||||||
|
MF->getMMI().setCallSiteLandingPad(Label, SDB->LPadToCallSiteMap[MBB]);
|
||||||
|
|
||||||
const MCInstrDesc &II = TM.getInstrInfo()->get(TargetOpcode::EH_LABEL);
|
const MCInstrDesc &II = TM.getInstrInfo()->get(TargetOpcode::EH_LABEL);
|
||||||
BuildMI(*MBB, FuncInfo->InsertPt, SDB->getCurDebugLoc(), II)
|
BuildMI(*MBB, FuncInfo->InsertPt, SDB->getCurDebugLoc(), II)
|
||||||
.addSym(Label);
|
.addSym(Label);
|
||||||
|
Loading…
Reference in New Issue
Block a user