Skip to content

Commit

Permalink
[Alignment][NFC] Remove documentation and FIXME for deprecated functions
Browse files Browse the repository at this point in the history
  • Loading branch information
gchatelet committed Apr 3, 2020
1 parent 937040d commit 4824b5e
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 52 deletions.
6 changes: 1 addition & 5 deletions llvm/include/llvm/CodeGen/MachineFrameInfo.h
Expand Up @@ -460,8 +460,6 @@ class MachineFrameInfo {
Objects[ObjectIdx+NumFixedObjects].Size = Size;
}

/// Return the alignment of the specified stack object.
/// FIXME: Remove this function once transition to Align is over.
LLVM_ATTRIBUTE_DEPRECATED(inline unsigned getObjectAlignment(int ObjectIdx)
const,
"Use getObjectAlign instead") {
Expand All @@ -486,8 +484,6 @@ class MachineFrameInfo {
ensureMaxAlignment(Alignment);
}

/// setObjectAlignment - Change the alignment of the specified stack object.
/// FIXME: Remove this function once transition to Align is over.
LLVM_ATTRIBUTE_DEPRECATED(inline void setObjectAlignment(int ObjectIdx,
unsigned Align),
"Use the version that takes Align instead") {
Expand Down Expand Up @@ -589,7 +585,7 @@ class MachineFrameInfo {

/// Make sure the function is at least Align bytes aligned.
void ensureMaxAlignment(Align Alignment);
/// FIXME: Remove this once transition to Align is over.

LLVM_ATTRIBUTE_DEPRECATED(inline void ensureMaxAlignment(unsigned Align),
"Use the version that uses Align instead") {
ensureMaxAlignment(assumeAligned(Align));
Expand Down
1 change: 0 additions & 1 deletion llvm/include/llvm/CodeGen/MachineFunction.h
Expand Up @@ -818,7 +818,6 @@ class MachineFunction {
AtomicOrdering Ordering = AtomicOrdering::NotAtomic,
AtomicOrdering FailureOrdering = AtomicOrdering::NotAtomic);

/// FIXME: Remove once transition to Align is over.
LLVM_ATTRIBUTE_DEPRECATED(
inline MachineMemOperand *getMachineMemOperand(
MachinePointerInfo PtrInfo, MachineMemOperand::Flags f, uint64_t s,
Expand Down
6 changes: 0 additions & 6 deletions llvm/include/llvm/CodeGen/MachineMemOperand.h
Expand Up @@ -222,19 +222,13 @@ class MachineMemOperand {
/// Return the size in bits of the memory reference.
uint64_t getSizeInBits() const { return Size * 8; }

/// Return the minimum known alignment in bytes of the actual memory
/// reference.
/// FIXME: Remove once transition to Align is over.
LLVM_ATTRIBUTE_DEPRECATED(uint64_t getAlignment() const,
"Use getAlign instead");

/// Return the minimum known alignment in bytes of the actual memory
/// reference.
Align getAlign() const;

/// Return the minimum known alignment in bytes of the base address, without
/// the offset.
/// FIXME: Remove once transition to Align is over.
LLVM_ATTRIBUTE_DEPRECATED(uint64_t getBaseAlignment() const,
"Use getBaseAlign instead") {
return BaseAlign.value();
Expand Down
1 change: 0 additions & 1 deletion llvm/include/llvm/IR/GlobalObject.h
Expand Up @@ -82,7 +82,6 @@ class GlobalObject : public GlobalValue {
return decodeMaybeAlign(AlignmentData);
}

/// FIXME: Remove this setter once the migration to MaybeAlign is over.
LLVM_ATTRIBUTE_DEPRECATED(void setAlignment(unsigned Align),
"Please use `void setAlignment(MaybeAlign Align)`");
void setAlignment(MaybeAlign Align);
Expand Down
40 changes: 3 additions & 37 deletions llvm/include/llvm/IR/IRBuilder.h
Expand Up @@ -520,8 +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.
/// FIXME: Remove this function once transition to Align is over.
/// Use the version that takes Align instead of this one.
LLVM_ATTRIBUTE_DEPRECATED(
CallInst *CreateElementUnorderedAtomicMemSet(
Value *Ptr, Value *Val, uint64_t Size, unsigned Alignment,
Expand All @@ -544,8 +542,6 @@ class IRBuilderBase {
TBAATag, ScopeTag, NoAliasTag);
}

/// FIXME: Remove this function once transition to Align is over.
/// Use the version that takes Align instead of this one.
LLVM_ATTRIBUTE_DEPRECATED(
CallInst *CreateElementUnorderedAtomicMemSet(
Value *Ptr, Value *Val, Value *Size, unsigned Alignment,
Expand All @@ -569,8 +565,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.
/// FIXME: Remove this function once transition to Align is over.
/// Use the version that takes MaybeAlign instead of this one.
LLVM_ATTRIBUTE_DEPRECATED(
CallInst *CreateMemCpy(Value *Dst, unsigned DstAlign, Value *Src,
unsigned SrcAlign, uint64_t Size,
Expand All @@ -595,8 +589,6 @@ class IRBuilderBase {
NoAliasTag);
}

/// FIXME: Remove this function once transition to Align is over.
/// Use the version that takes MaybeAlign instead of this one.
LLVM_ATTRIBUTE_DEPRECATED(
CallInst *CreateMemCpy(Value *Dst, unsigned DstAlign, Value *Src,
unsigned SrcAlign, Value *Size,
Expand Down Expand Up @@ -629,8 +621,6 @@ class IRBuilderBase {
MDNode *TBAAStructTag = nullptr, MDNode *ScopeTag = nullptr,
MDNode *NoAliasTag = nullptr);

/// FIXME: Remove this function once transition to Align is over.
/// Use the version that takes Align instead of this one.
LLVM_ATTRIBUTE_DEPRECATED(CallInst *CreateElementUnorderedAtomicMemCpy(
Value *Dst, unsigned DstAlign, Value *Src,
unsigned SrcAlign, uint64_t Size,
Expand All @@ -644,8 +634,6 @@ class IRBuilderBase {
TBAATag, TBAAStructTag, ScopeTag, NoAliasTag);
}

/// FIXME: Remove this function once transition to Align is over.
/// Use the version that takes Align instead of this one.
LLVM_ATTRIBUTE_DEPRECATED(CallInst *CreateElementUnorderedAtomicMemCpy(
Value *Dst, unsigned DstAlign, Value *Src,
unsigned SrcAlign, Value *Size,
Expand All @@ -659,14 +647,6 @@ class IRBuilderBase {
TBAAStructTag, ScopeTag, NoAliasTag);
}

/// Create and insert a memmove between the specified
/// pointers.
///
/// 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.
/// FIXME: Remove this function once transition to Align is over.
/// Use the version that takes MaybeAlign instead of this one.
LLVM_ATTRIBUTE_DEPRECATED(
CallInst *CreateMemMove(
Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign,
Expand All @@ -685,8 +665,7 @@ class IRBuilderBase {
return CreateMemMove(Dst, DstAlign, Src, SrcAlign, getInt64(Size),
isVolatile, TBAATag, ScopeTag, NoAliasTag);
}
/// FIXME: Remove this function once transition to Align is over.
/// Use the version that takes MaybeAlign instead of this one.

LLVM_ATTRIBUTE_DEPRECATED(
CallInst *CreateMemMove(
Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign,
Expand Down Expand Up @@ -717,8 +696,6 @@ class IRBuilderBase {
MDNode *TBAAStructTag = nullptr, MDNode *ScopeTag = nullptr,
MDNode *NoAliasTag = nullptr);

/// FIXME: Remove this function once transition to Align is over.
/// Use the version that takes Align instead of this one.
LLVM_ATTRIBUTE_DEPRECATED(CallInst *CreateElementUnorderedAtomicMemMove(
Value *Dst, unsigned DstAlign, Value *Src,
unsigned SrcAlign, uint64_t Size,
Expand All @@ -732,8 +709,6 @@ class IRBuilderBase {
TBAATag, TBAAStructTag, ScopeTag, NoAliasTag);
}

/// FIXME: Remove this function once transition to Align is over.
/// Use the version that takes Align instead of this one.
LLVM_ATTRIBUTE_DEPRECATED(CallInst *CreateElementUnorderedAtomicMemMove(
Value *Dst, unsigned DstAlign, Value *Src,
unsigned SrcAlign, Value *Size,
Expand Down Expand Up @@ -1747,11 +1722,6 @@ class IRBuilderBase {
return Insert(new StoreInst(Val, Ptr, isVolatile));
}

/// Provided to resolve 'CreateAlignedLoad(Ptr, Align, "...")'
/// correctly, instead of converting the string to 'bool' for the isVolatile
/// parameter.
/// FIXME: Remove this function once transition to Align is over.
/// Use the version that takes MaybeAlign instead of this one.
LLVM_ATTRIBUTE_DEPRECATED(LoadInst *CreateAlignedLoad(Type *Ty, Value *Ptr,
unsigned Align,
const char *Name),
Expand All @@ -1764,8 +1734,7 @@ class IRBuilderBase {
LI->setAlignment(Align);
return LI;
}
/// FIXME: Remove this function once transition to Align is over.
/// Use the version that takes MaybeAlign instead of this one.

LLVM_ATTRIBUTE_DEPRECATED(LoadInst *CreateAlignedLoad(Type *Ty, Value *Ptr,
unsigned Align,
const Twine &Name = ""),
Expand All @@ -1778,8 +1747,7 @@ class IRBuilderBase {
LI->setAlignment(Align);
return LI;
}
/// FIXME: Remove this function once transition to Align is over.
/// Use the version that takes MaybeAlign instead of this one.

LLVM_ATTRIBUTE_DEPRECATED(LoadInst *CreateAlignedLoad(Type *Ty, Value *Ptr,
unsigned Align,
bool isVolatile,
Expand Down Expand Up @@ -1837,8 +1805,6 @@ class IRBuilderBase {
Align, isVolatile, Name);
}

/// FIXME: Remove this function once transition to Align is over.
/// Use the version that takes MaybeAlign instead of this one.
LLVM_ATTRIBUTE_DEPRECATED(
StoreInst *CreateAlignedStore(Value *Val, Value *Ptr, unsigned Align,
bool isVolatile = false),
Expand Down
2 changes: 0 additions & 2 deletions llvm/include/llvm/IR/InstrTypes.h
Expand Up @@ -1588,8 +1588,6 @@ class CallBase : public Instruction {
MaybeAlign getRetAlign() const { return Attrs.getRetAlignment(); }

/// Extract the alignment for a call or parameter (0=unknown).
/// FIXME: Remove this function once transition to Align is over.
/// Use getParamAlign() instead.
LLVM_ATTRIBUTE_DEPRECATED(unsigned getParamAlignment(unsigned ArgNo) const,
"Use getParamAlign() instead") {
if (const auto MA = Attrs.getParamAlignment(ArgNo))
Expand Down

0 comments on commit 4824b5e

Please sign in to comment.