-
-
- void %llvm.eh.sjlj.callsite(i32)
-
-
-
The SJLJ front-end allocates call site indices for invoke instrucitons.
- These values are passed to the back-end via the
- llvm.eh.sjlj.callsite
- intrinsic, where they are used to build the LSDA call-site table.
-
-
-
Asm Table Formats
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h
index f30cb821c1a..0d15a959791 100644
--- a/include/llvm/CodeGen/MachineFunction.h
+++ b/include/llvm/CodeGen/MachineFunction.h
@@ -115,15 +115,6 @@ class MachineFunction {
// The alignment of the function.
unsigned Alignment;
- // The currently active call_site value
- unsigned CallSiteIndex;
-
- // The largest call_site value encountered
- unsigned MaxCallSiteIndex;
-
- // Call sites mapped to corresponding landing pads
- std::map
LandingPadCallSiteIndexMap;
-
public:
MachineFunction(Function *Fn, const TargetMachine &TM);
~MachineFunction();
@@ -169,41 +160,6 @@ public:
///
void setAlignment(unsigned A) { Alignment = A; }
- /// getCallSiteIndex() - Get the current call site index
- ///
- unsigned getCallSiteIndex() { return CallSiteIndex; }
-
- /// setCallSiteIndex() - Set the current call site index
- ///
- void setCallSiteIndex(unsigned Idx) {
- CallSiteIndex = Idx;
- if (CallSiteIndex > MaxCallSiteIndex)
- MaxCallSiteIndex = CallSiteIndex;
- }
-
- /// getMaxCallSiteIndex() - Get the largest call site index issued
- ///
- unsigned getMaxCallSiteIndex() { return MaxCallSiteIndex; }
-
- /// setCallSiteIndexLandingPad() - Map the call site to a landing pad
- ///
- void setLandingPadCallSiteIndex(MachineBasicBlock *LandingPad,
- unsigned CallSite) {
- LandingPadCallSiteIndexMap[LandingPad] = CallSite;
- }
-
- /// getCallSiteIndexLandingPad() - Get landing pad for the call site index
- ///
- unsigned getLandingPadCallSiteIndex(MachineBasicBlock *LandingPad) {
- return LandingPadCallSiteIndexMap[LandingPad];
- }
-
- /// getCallSiteCount() - Get the count of call site entries
- ///
- unsigned getCallSiteCount() {
- return LandingPadCallSiteIndexMap.size();
- }
-
/// MachineFunctionInfo - Keep track of various per-function pieces of
/// information for backends that would like to do so.
///
diff --git a/include/llvm/Intrinsics.td b/include/llvm/Intrinsics.td
index 9c4fe1f9b08..552254f7b58 100644
--- a/include/llvm/Intrinsics.td
+++ b/include/llvm/Intrinsics.td
@@ -310,9 +310,6 @@ let Properties = [IntrNoMem] in {
def int_eh_sjlj_longjmp : Intrinsic<[llvm_void_ty], [llvm_ptr_ty]>;
def int_eh_sjlj_lsda : Intrinsic<[llvm_ptr_ty]>;
}
-let Properties = [IntrWriteMem] in {
- def int_eh_sjlj_callsite: Intrinsic<[llvm_void_ty], [llvm_i32_ty]>;
-}
//===---------------- Generic Variable Attribute Intrinsics----------------===//
//
diff --git a/lib/CodeGen/AsmPrinter/DwarfException.cpp b/lib/CodeGen/AsmPrinter/DwarfException.cpp
index dacaf1b8fdb..1d773ee53e7 100644
--- a/lib/CodeGen/AsmPrinter/DwarfException.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfException.cpp
@@ -640,9 +640,6 @@ void DwarfException::EmitExceptionTable() {
Asm->EmitULEB128Bytes(SizeSites);
Asm->EOL("Call-site table length");
-
- assert(MF->getCallSiteCount() == CallSites.size());
-
// Emit the landing pad site information.
unsigned idx = 0;
for (SmallVectorImpl::const_iterator
diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp
index 9efec1c1caa..5958ae253dc 100644
--- a/lib/CodeGen/MachineFunction.cpp
+++ b/lib/CodeGen/MachineFunction.cpp
@@ -93,9 +93,6 @@ MachineFunction::MachineFunction(Function *F,
MachineConstantPool(TM.getTargetData());
Alignment = TM.getTargetLowering()->getFunctionAlignment(F);
- CallSiteIndex = 0;
- MaxCallSiteIndex = 0;
-
// Set up jump table.
const TargetData &TD = *TM.getTargetData();
bool IsPic = TM.getRelocationModel() == Reloc::PIC_;
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
index ebcc2a5a5d7..1ba63c01808 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
@@ -4084,11 +4084,6 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
Offset));
return 0;
}
- case Intrinsic::eh_sjlj_callsite: {
- MachineFunction &MF = DAG.getMachineFunction();
- MF.setCallSiteIndex(cast(getValue(I.getOperand(1)))->getZExtValue());
- return 0;
- }
case Intrinsic::convertff:
case Intrinsic::convertfsi:
case Intrinsic::convertfui:
@@ -4452,14 +4447,10 @@ void SelectionDAGLowering::LowerCallTo(CallSite CS, SDValue Callee,
}
if (LandingPad && MMI) {
- MachineFunction &MF = DAG.getMachineFunction();
// Insert a label before the invoke call to mark the try range. This can be
// used to detect deletion of the invoke via the MachineModuleInfo.
BeginLabel = MMI->NextLabelID();
- // Map this landing pad to the current call site entry
- MF.setLandingPadCallSiteIndex(LandingPad, MF.getCallSiteIndex());
-
// Both PendingLoads and PendingExports must be flushed here;
// this call might not return.
(void)getRoot();