Skip to content

Commit 836ce9d

Browse files
committed
[opaque pointer types] Remove deprecated Instruction/IRBuilder APIs.
Removes deprecated overloads of LoadInst constructor, CallInst::create, InvokeInst::Create, IRBuilder::CreateCall, IRBuilder::CreateInvoke. (Leaving around deprecated IRBuilder::CreateLoad for now.) Differential Revision: https://reviews.llvm.org/D76269
1 parent 2d32ee0 commit 836ce9d

File tree

2 files changed

+0
-168
lines changed

2 files changed

+0
-168
lines changed

llvm/include/llvm/IR/IRBuilder.h

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,28 +1006,6 @@ class IRBuilderBase {
10061006
NormalDest, UnwindDest, Args, Name);
10071007
}
10081008

1009-
// Deprecated [opaque pointer types]
1010-
InvokeInst *CreateInvoke(Value *Callee, BasicBlock *NormalDest,
1011-
BasicBlock *UnwindDest, ArrayRef<Value *> Args,
1012-
ArrayRef<OperandBundleDef> OpBundles,
1013-
const Twine &Name = "") {
1014-
return CreateInvoke(
1015-
cast<FunctionType>(
1016-
cast<PointerType>(Callee->getType())->getElementType()),
1017-
Callee, NormalDest, UnwindDest, Args, OpBundles, Name);
1018-
}
1019-
1020-
// Deprecated [opaque pointer types]
1021-
InvokeInst *CreateInvoke(Value *Callee, BasicBlock *NormalDest,
1022-
BasicBlock *UnwindDest,
1023-
ArrayRef<Value *> Args = None,
1024-
const Twine &Name = "") {
1025-
return CreateInvoke(
1026-
cast<FunctionType>(
1027-
cast<PointerType>(Callee->getType())->getElementType()),
1028-
Callee, NormalDest, UnwindDest, Args, Name);
1029-
}
1030-
10311009
/// \brief Create a callbr instruction.
10321010
CallBrInst *CreateCallBr(FunctionType *Ty, Value *Callee,
10331011
BasicBlock *DefaultDest,
@@ -2349,23 +2327,6 @@ class IRBuilderBase {
23492327
OpBundles, Name, FPMathTag);
23502328
}
23512329

2352-
// Deprecated [opaque pointer types]
2353-
CallInst *CreateCall(Value *Callee, ArrayRef<Value *> Args = None,
2354-
const Twine &Name = "", MDNode *FPMathTag = nullptr) {
2355-
return CreateCall(
2356-
cast<FunctionType>(Callee->getType()->getPointerElementType()), Callee,
2357-
Args, Name, FPMathTag);
2358-
}
2359-
2360-
// Deprecated [opaque pointer types]
2361-
CallInst *CreateCall(Value *Callee, ArrayRef<Value *> Args,
2362-
ArrayRef<OperandBundleDef> OpBundles,
2363-
const Twine &Name = "", MDNode *FPMathTag = nullptr) {
2364-
return CreateCall(
2365-
cast<FunctionType>(Callee->getType()->getPointerElementType()), Callee,
2366-
Args, OpBundles, Name, FPMathTag);
2367-
}
2368-
23692330
CallInst *CreateConstrainedFPCall(
23702331
Function *Callee, ArrayRef<Value *> Args, const Twine &Name = "",
23712332
Optional<RoundingMode> Rounding = None,

llvm/include/llvm/IR/Instructions.h

Lines changed: 0 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -199,40 +199,6 @@ class LoadInst : public UnaryInstruction {
199199
MaybeAlign Align, AtomicOrdering Order, SyncScope::ID SSID,
200200
BasicBlock *InsertAtEnd);
201201

202-
// Deprecated [opaque pointer types]
203-
explicit LoadInst(Value *Ptr, const Twine &NameStr = "",
204-
Instruction *InsertBefore = nullptr)
205-
: LoadInst(Ptr->getType()->getPointerElementType(), Ptr, NameStr,
206-
InsertBefore) {}
207-
LoadInst(Value *Ptr, const Twine &NameStr, BasicBlock *InsertAtEnd)
208-
: LoadInst(Ptr->getType()->getPointerElementType(), Ptr, NameStr,
209-
InsertAtEnd) {}
210-
LoadInst(Value *Ptr, const Twine &NameStr, bool isVolatile,
211-
Instruction *InsertBefore = nullptr)
212-
: LoadInst(Ptr->getType()->getPointerElementType(), Ptr, NameStr,
213-
isVolatile, InsertBefore) {}
214-
LoadInst(Value *Ptr, const Twine &NameStr, bool isVolatile,
215-
BasicBlock *InsertAtEnd)
216-
: LoadInst(Ptr->getType()->getPointerElementType(), Ptr, NameStr,
217-
isVolatile, InsertAtEnd) {}
218-
LoadInst(Value *Ptr, const Twine &NameStr, bool isVolatile, MaybeAlign Align,
219-
Instruction *InsertBefore = nullptr)
220-
: LoadInst(Ptr->getType()->getPointerElementType(), Ptr, NameStr,
221-
isVolatile, Align, InsertBefore) {}
222-
LoadInst(Value *Ptr, const Twine &NameStr, bool isVolatile, MaybeAlign Align,
223-
BasicBlock *InsertAtEnd)
224-
: LoadInst(Ptr->getType()->getPointerElementType(), Ptr, NameStr,
225-
isVolatile, Align, InsertAtEnd) {}
226-
LoadInst(Value *Ptr, const Twine &NameStr, bool isVolatile, MaybeAlign Align,
227-
AtomicOrdering Order, SyncScope::ID SSID = SyncScope::System,
228-
Instruction *InsertBefore = nullptr)
229-
: LoadInst(Ptr->getType()->getPointerElementType(), Ptr, NameStr,
230-
isVolatile, Align, Order, SSID, InsertBefore) {}
231-
LoadInst(Value *Ptr, const Twine &NameStr, bool isVolatile, MaybeAlign Align,
232-
AtomicOrdering Order, SyncScope::ID SSID, BasicBlock *InsertAtEnd)
233-
: LoadInst(Ptr->getType()->getPointerElementType(), Ptr, NameStr,
234-
isVolatile, Align, Order, SSID, InsertAtEnd) {}
235-
236202
/// Return true if this is a load from a volatile memory location.
237203
bool isVolatile() const { return getSubclassDataFromInstruction() & 1; }
238204

@@ -1543,58 +1509,6 @@ class CallInst : public CallBase {
15431509
NameStr, InsertAtEnd);
15441510
}
15451511

1546-
// Deprecated [opaque pointer types]
1547-
static CallInst *Create(Value *Func, const Twine &NameStr = "",
1548-
Instruction *InsertBefore = nullptr) {
1549-
return Create(cast<FunctionType>(
1550-
cast<PointerType>(Func->getType())->getElementType()),
1551-
Func, NameStr, InsertBefore);
1552-
}
1553-
1554-
// Deprecated [opaque pointer types]
1555-
static CallInst *Create(Value *Func, ArrayRef<Value *> Args,
1556-
const Twine &NameStr,
1557-
Instruction *InsertBefore = nullptr) {
1558-
return Create(cast<FunctionType>(
1559-
cast<PointerType>(Func->getType())->getElementType()),
1560-
Func, Args, NameStr, InsertBefore);
1561-
}
1562-
1563-
// Deprecated [opaque pointer types]
1564-
static CallInst *Create(Value *Func, ArrayRef<Value *> Args,
1565-
ArrayRef<OperandBundleDef> Bundles = None,
1566-
const Twine &NameStr = "",
1567-
Instruction *InsertBefore = nullptr) {
1568-
return Create(cast<FunctionType>(
1569-
cast<PointerType>(Func->getType())->getElementType()),
1570-
Func, Args, Bundles, NameStr, InsertBefore);
1571-
}
1572-
1573-
// Deprecated [opaque pointer types]
1574-
static CallInst *Create(Value *Func, const Twine &NameStr,
1575-
BasicBlock *InsertAtEnd) {
1576-
return Create(cast<FunctionType>(
1577-
cast<PointerType>(Func->getType())->getElementType()),
1578-
Func, NameStr, InsertAtEnd);
1579-
}
1580-
1581-
// Deprecated [opaque pointer types]
1582-
static CallInst *Create(Value *Func, ArrayRef<Value *> Args,
1583-
const Twine &NameStr, BasicBlock *InsertAtEnd) {
1584-
return Create(cast<FunctionType>(
1585-
cast<PointerType>(Func->getType())->getElementType()),
1586-
Func, Args, NameStr, InsertAtEnd);
1587-
}
1588-
1589-
// Deprecated [opaque pointer types]
1590-
static CallInst *Create(Value *Func, ArrayRef<Value *> Args,
1591-
ArrayRef<OperandBundleDef> Bundles,
1592-
const Twine &NameStr, BasicBlock *InsertAtEnd) {
1593-
return Create(cast<FunctionType>(
1594-
cast<PointerType>(Func->getType())->getElementType()),
1595-
Func, Args, Bundles, NameStr, InsertAtEnd);
1596-
}
1597-
15981512
/// Create a clone of \p CI with a different set of operand bundles and
15991513
/// insert it before \p InsertPt.
16001514
///
@@ -3804,49 +3718,6 @@ class InvokeInst : public CallBase {
38043718
IfException, Args, Bundles, NameStr, InsertAtEnd);
38053719
}
38063720

3807-
// Deprecated [opaque pointer types]
3808-
static InvokeInst *Create(Value *Func, BasicBlock *IfNormal,
3809-
BasicBlock *IfException, ArrayRef<Value *> Args,
3810-
const Twine &NameStr,
3811-
Instruction *InsertBefore = nullptr) {
3812-
return Create(cast<FunctionType>(
3813-
cast<PointerType>(Func->getType())->getElementType()),
3814-
Func, IfNormal, IfException, Args, None, NameStr,
3815-
InsertBefore);
3816-
}
3817-
3818-
// Deprecated [opaque pointer types]
3819-
static InvokeInst *Create(Value *Func, BasicBlock *IfNormal,
3820-
BasicBlock *IfException, ArrayRef<Value *> Args,
3821-
ArrayRef<OperandBundleDef> Bundles = None,
3822-
const Twine &NameStr = "",
3823-
Instruction *InsertBefore = nullptr) {
3824-
return Create(cast<FunctionType>(
3825-
cast<PointerType>(Func->getType())->getElementType()),
3826-
Func, IfNormal, IfException, Args, Bundles, NameStr,
3827-
InsertBefore);
3828-
}
3829-
3830-
// Deprecated [opaque pointer types]
3831-
static InvokeInst *Create(Value *Func, BasicBlock *IfNormal,
3832-
BasicBlock *IfException, ArrayRef<Value *> Args,
3833-
const Twine &NameStr, BasicBlock *InsertAtEnd) {
3834-
return Create(cast<FunctionType>(
3835-
cast<PointerType>(Func->getType())->getElementType()),
3836-
Func, IfNormal, IfException, Args, NameStr, InsertAtEnd);
3837-
}
3838-
3839-
// Deprecated [opaque pointer types]
3840-
static InvokeInst *Create(Value *Func, BasicBlock *IfNormal,
3841-
BasicBlock *IfException, ArrayRef<Value *> Args,
3842-
ArrayRef<OperandBundleDef> Bundles,
3843-
const Twine &NameStr, BasicBlock *InsertAtEnd) {
3844-
return Create(cast<FunctionType>(
3845-
cast<PointerType>(Func->getType())->getElementType()),
3846-
Func, IfNormal, IfException, Args, Bundles, NameStr,
3847-
InsertAtEnd);
3848-
}
3849-
38503721
/// Create a clone of \p II with a different set of operand bundles and
38513722
/// insert it before \p InsertPt.
38523723
///

0 commit comments

Comments
 (0)