Skip to content

Commit

Permalink
[Alignment][NFC] Remove deprecated functions introduced in 10.0.0
Browse files Browse the repository at this point in the history
Summary:
24 March 2020: LLVM 10.0.0 is out.
I gathered all deprecated function introduced between 9 and 10 and cleaned them up so they will be removed from 11.

> git log -p -S LLVM_ATTRIBUTE_DEPRECATED llvmorg-9.0.0..llvmorg-10.0.0

Reviewers: courbet

Subscribers: hiraditya, jfb, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77409
  • Loading branch information
gchatelet committed Apr 6, 2020
1 parent 9bc5b1a commit 39cfba9
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 78 deletions.
2 changes: 0 additions & 2 deletions llvm/include/llvm/IR/GlobalObject.h
Expand Up @@ -82,8 +82,6 @@ class GlobalObject : public GlobalValue {
return decodeMaybeAlign(AlignmentData);
}

LLVM_ATTRIBUTE_DEPRECATED(void setAlignment(unsigned Align),
"Please use `void setAlignment(MaybeAlign Align)`");
void setAlignment(MaybeAlign Align);

unsigned getGlobalObjectSubClassData() const {
Expand Down
62 changes: 0 additions & 62 deletions llvm/include/llvm/IR/IRBuilder.h
Expand Up @@ -520,17 +520,6 @@ class IRBuilderBase {
/// If the pointer isn't an i8*, it will be converted. If a TBAA tag is
/// specified, it will be added to the instruction. Likewise with alias.scope
/// and noalias tags.
LLVM_ATTRIBUTE_DEPRECATED(
CallInst *CreateElementUnorderedAtomicMemSet(
Value *Ptr, Value *Val, uint64_t Size, unsigned Alignment,
uint32_t ElementSize, MDNode *TBAATag = nullptr,
MDNode *ScopeTag = nullptr, MDNode *NoAliasTag = nullptr),
"Use the version that takes Align instead of this one") {
return CreateElementUnorderedAtomicMemSet(Ptr, Val, getInt64(Size),
Align(Alignment), ElementSize,
TBAATag, ScopeTag, NoAliasTag);
}

CallInst *CreateElementUnorderedAtomicMemSet(Value *Ptr, Value *Val,
uint64_t Size, Align Alignment,
uint32_t ElementSize,
Expand All @@ -542,17 +531,6 @@ class IRBuilderBase {
TBAATag, ScopeTag, NoAliasTag);
}

LLVM_ATTRIBUTE_DEPRECATED(
CallInst *CreateElementUnorderedAtomicMemSet(
Value *Ptr, Value *Val, Value *Size, unsigned Alignment,
uint32_t ElementSize, MDNode *TBAATag = nullptr,
MDNode *ScopeTag = nullptr, MDNode *NoAliasTag = nullptr),
"Use the version that takes Align instead of this one") {
return CreateElementUnorderedAtomicMemSet(Ptr, Val, Size, Align(Alignment),
ElementSize, TBAATag, ScopeTag,
NoAliasTag);
}

CallInst *CreateElementUnorderedAtomicMemSet(Value *Ptr, Value *Val,
Value *Size, Align Alignment,
uint32_t ElementSize,
Expand All @@ -565,19 +543,6 @@ class IRBuilderBase {
/// If the pointers aren't i8*, they will be converted. If a TBAA tag is
/// specified, it will be added to the instruction. Likewise with alias.scope
/// and noalias tags.
LLVM_ATTRIBUTE_DEPRECATED(
CallInst *CreateMemCpy(Value *Dst, unsigned DstAlign, Value *Src,
unsigned SrcAlign, uint64_t Size,
bool isVolatile = false, MDNode *TBAATag = nullptr,
MDNode *TBAAStructTag = nullptr,
MDNode *ScopeTag = nullptr,
MDNode *NoAliasTag = nullptr),
"Use the version that takes MaybeAlign instead") {
return CreateMemCpy(Dst, MaybeAlign(DstAlign), Src, MaybeAlign(SrcAlign),
getInt64(Size), isVolatile, TBAATag, TBAAStructTag,
ScopeTag, NoAliasTag);
}

CallInst *CreateMemCpy(Value *Dst, MaybeAlign DstAlign, Value *Src,
MaybeAlign SrcAlign, uint64_t Size,
bool isVolatile = false, MDNode *TBAATag = nullptr,
Expand All @@ -589,14 +554,6 @@ class IRBuilderBase {
NoAliasTag);
}

LLVM_ATTRIBUTE_DEPRECATED(
CallInst *CreateMemCpy(Value *Dst, unsigned DstAlign, Value *Src,
unsigned SrcAlign, Value *Size,
bool isVolatile = false, MDNode *TBAATag = nullptr,
MDNode *TBAAStructTag = nullptr,
MDNode *ScopeTag = nullptr,
MDNode *NoAliasTag = nullptr),
"Use the version that takes MaybeAlign instead");
CallInst *CreateMemCpy(Value *Dst, MaybeAlign DstAlign, Value *Src,
MaybeAlign SrcAlign, Value *Size,
bool isVolatile = false, MDNode *TBAATag = nullptr,
Expand Down Expand Up @@ -647,16 +604,6 @@ class IRBuilderBase {
TBAAStructTag, ScopeTag, NoAliasTag);
}

LLVM_ATTRIBUTE_DEPRECATED(
CallInst *CreateMemMove(
Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign,
uint64_t Size, bool isVolatile = false, MDNode *TBAATag = nullptr,
MDNode *ScopeTag = nullptr, MDNode *NoAliasTag = nullptr),
"Use the version that takes MaybeAlign") {
return CreateMemMove(Dst, MaybeAlign(DstAlign), Src, MaybeAlign(SrcAlign),
getInt64(Size), isVolatile, TBAATag, ScopeTag,
NoAliasTag);
}
CallInst *CreateMemMove(Value *Dst, MaybeAlign DstAlign, Value *Src,
MaybeAlign SrcAlign, uint64_t Size,
bool isVolatile = false, MDNode *TBAATag = nullptr,
Expand All @@ -666,15 +613,6 @@ class IRBuilderBase {
isVolatile, TBAATag, ScopeTag, NoAliasTag);
}

LLVM_ATTRIBUTE_DEPRECATED(
CallInst *CreateMemMove(
Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign,
Value *Size, bool isVolatile = false, MDNode *TBAATag = nullptr,
MDNode *ScopeTag = nullptr, MDNode *NoAliasTag = nullptr),
"Use the version that takes MaybeAlign") {
return CreateMemMove(Dst, MaybeAlign(DstAlign), Src, MaybeAlign(SrcAlign),
Size, isVolatile, TBAATag, ScopeTag, NoAliasTag);
}
CallInst *CreateMemMove(Value *Dst, MaybeAlign DstAlign, Value *Src,
MaybeAlign SrcAlign, Value *Size,
bool isVolatile = false, MDNode *TBAATag = nullptr,
Expand Down
4 changes: 0 additions & 4 deletions llvm/lib/IR/Globals.cpp
Expand Up @@ -120,10 +120,6 @@ unsigned GlobalValue::getAddressSpace() const {
return PtrTy->getAddressSpace();
}

void GlobalObject::setAlignment(unsigned Align) {
setAlignment(MaybeAlign(Align));
}

void GlobalObject::setAlignment(MaybeAlign Align) {
assert((!Align || Align <= MaximumAlignment) &&
"Alignment is greater than MaximumAlignment!");
Expand Down
10 changes: 0 additions & 10 deletions llvm/lib/IR/IRBuilder.cpp
Expand Up @@ -134,16 +134,6 @@ CallInst *IRBuilderBase::CreateElementUnorderedAtomicMemSet(
return CI;
}

CallInst *IRBuilderBase::CreateMemCpy(Value *Dst, unsigned DstAlign, Value *Src,
unsigned SrcAlign, Value *Size,
bool isVolatile, MDNode *TBAATag,
MDNode *TBAAStructTag, MDNode *ScopeTag,
MDNode *NoAliasTag) {
return CreateMemCpy(Dst, MaybeAlign(DstAlign), Src, MaybeAlign(SrcAlign),
Size, isVolatile, TBAATag, TBAAStructTag, ScopeTag,
NoAliasTag);
}

CallInst *IRBuilderBase::CreateMemCpy(Value *Dst, MaybeAlign DstAlign,
Value *Src, MaybeAlign SrcAlign,
Value *Size, bool isVolatile,
Expand Down

0 comments on commit 39cfba9

Please sign in to comment.