[llvm] e805b7c - [llvm][NFC] Remove remaining deprecated alignment functions from CodeGen
Guillaume Chatelet via llvm-commits
llvm-commits at lists.llvm.org
Fri May 7 03:22:50 PDT 2021
Author: Guillaume Chatelet
Date: 2021-05-07T10:22:41Z
New Revision: e805b7c2d63c1f8b74f228718a55536f54ddd1c0
URL: https://github.com/llvm/llvm-project/commit/e805b7c2d63c1f8b74f228718a55536f54ddd1c0
DIFF: https://github.com/llvm/llvm-project/commit/e805b7c2d63c1f8b74f228718a55536f54ddd1c0.diff
LOG: [llvm][NFC] Remove remaining deprecated alignment functions from CodeGen
Differential Revision: https://reviews.llvm.org/D102058
Added:
Modified:
llvm/include/llvm/CodeGen/MachineFrameInfo.h
llvm/include/llvm/CodeGen/MachineMemOperand.h
llvm/include/llvm/CodeGen/SelectionDAGNodes.h
llvm/lib/CodeGen/MachineOperand.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/CodeGen/MachineFrameInfo.h b/llvm/include/llvm/CodeGen/MachineFrameInfo.h
index adde482e644c..355181f606eb 100644
--- a/llvm/include/llvm/CodeGen/MachineFrameInfo.h
+++ b/llvm/include/llvm/CodeGen/MachineFrameInfo.h
@@ -461,12 +461,6 @@ class MachineFrameInfo {
Objects[ObjectIdx+NumFixedObjects].Size = Size;
}
- LLVM_ATTRIBUTE_DEPRECATED(inline unsigned getObjectAlignment(int ObjectIdx)
- const,
- "Use getObjectAlign instead") {
- return getObjectAlign(ObjectIdx).value();
- }
-
/// Return the alignment of the specified stack object.
Align getObjectAlign(int ObjectIdx) const {
assert(unsigned(ObjectIdx + NumFixedObjects) < Objects.size() &&
@@ -485,12 +479,6 @@ class MachineFrameInfo {
ensureMaxAlignment(Alignment);
}
- LLVM_ATTRIBUTE_DEPRECATED(inline void setObjectAlignment(int ObjectIdx,
- unsigned Align),
- "Use the version that takes Align instead") {
- setObjectAlignment(ObjectIdx, assumeAligned(Align));
- }
-
/// Return the underlying Alloca of the specified
/// stack object if it exists. Returns 0 if none exists.
const AllocaInst* getObjectAllocation(int ObjectIdx) const {
@@ -574,12 +562,6 @@ class MachineFrameInfo {
/// Set the correction for frame offsets.
void setOffsetAdjustment(int Adj) { OffsetAdjustment = Adj; }
- /// Return the alignment in bytes that this function must be aligned to,
- /// which is greater than the default stack alignment provided by the target.
- LLVM_ATTRIBUTE_DEPRECATED(unsigned getMaxAlignment() const,
- "Use getMaxAlign instead") {
- return MaxAlignment.value();
- }
/// Return the alignment in bytes that this function must be aligned to,
/// which is greater than the default stack alignment provided by the target.
Align getMaxAlign() const { return MaxAlignment; }
@@ -587,11 +569,6 @@ class MachineFrameInfo {
/// Make sure the function is at least Align bytes aligned.
void ensureMaxAlignment(Align Alignment);
- LLVM_ATTRIBUTE_DEPRECATED(inline void ensureMaxAlignment(unsigned Align),
- "Use the version that uses Align instead") {
- ensureMaxAlignment(assumeAligned(Align));
- }
-
/// Return true if this function adjusts the stack -- e.g.,
/// when calling another function. This is only valid during and after
/// prolog/epilog code insertion.
@@ -756,24 +733,10 @@ class MachineFrameInfo {
/// a nonnegative identifier to represent it.
int CreateStackObject(uint64_t Size, Align Alignment, bool isSpillSlot,
const AllocaInst *Alloca = nullptr, uint8_t ID = 0);
- LLVM_ATTRIBUTE_DEPRECATED(
- inline int CreateStackObject(uint64_t Size, unsigned Alignment,
- bool isSpillSlot,
- const AllocaInst *Alloca = nullptr,
- uint8_t ID = 0),
- "Use CreateStackObject that takes an Align instead") {
- return CreateStackObject(Size, assumeAligned(Alignment), isSpillSlot,
- Alloca, ID);
- }
/// Create a new statically sized stack object that represents a spill slot,
/// returning a nonnegative identifier to represent it.
int CreateSpillStackObject(uint64_t Size, Align Alignment);
- LLVM_ATTRIBUTE_DEPRECATED(
- inline int CreateSpillStackObject(uint64_t Size, unsigned Alignment),
- "Use CreateSpillStackObject that takes an Align instead") {
- return CreateSpillStackObject(Size, assumeAligned(Alignment));
- }
/// Remove or mark dead a statically sized stack object.
void RemoveStackObject(int ObjectIdx) {
@@ -785,12 +748,6 @@ class MachineFrameInfo {
/// created. This must be created whenever a variable sized object is
/// created, whether or not the index returned is actually used.
int CreateVariableSizedObject(Align Alignment, const AllocaInst *Alloca);
- /// FIXME: Remove this function when transition to Align is over.
- LLVM_ATTRIBUTE_DEPRECATED(int CreateVariableSizedObject(
- unsigned Alignment, const AllocaInst *Alloca),
- "Use the version that takes an Align instead") {
- return CreateVariableSizedObject(assumeAligned(Alignment), Alloca);
- }
/// Returns a reference to call saved info vector for the current function.
const std::vector<CalleeSavedInfo> &getCalleeSavedInfo() const {
diff --git a/llvm/include/llvm/CodeGen/MachineMemOperand.h b/llvm/include/llvm/CodeGen/MachineMemOperand.h
index fe33fb5f4283..0823164c32c1 100644
--- a/llvm/include/llvm/CodeGen/MachineMemOperand.h
+++ b/llvm/include/llvm/CodeGen/MachineMemOperand.h
@@ -223,18 +223,10 @@ class MachineMemOperand {
/// Return the size in bits of the memory reference.
uint64_t getSizeInBits() const { return Size * 8; }
- 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;
- LLVM_ATTRIBUTE_DEPRECATED(uint64_t getBaseAlignment() const,
- "Use getBaseAlign instead") {
- return BaseAlign.value();
- }
-
/// Return the minimum known alignment in bytes of the base address, without
/// the offset.
Align getBaseAlign() const { return BaseAlign; }
@@ -276,7 +268,7 @@ class MachineMemOperand {
/// Returns true if this memory operation doesn't have any ordering
/// constraints other than normal aliasing. Volatile and (ordered) atomic
- /// memory operations can't be reordered.
+ /// memory operations can't be reordered.
bool isUnordered() const {
return (getOrdering() == AtomicOrdering::NotAtomic ||
getOrdering() == AtomicOrdering::Unordered) &&
diff --git a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h b/llvm/include/llvm/CodeGen/SelectionDAGNodes.h
index 87e74ba799bf..155affadd73b 100644
--- a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/llvm/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -1262,10 +1262,6 @@ class MemSDNode : public SDNode {
/// Returns alignment and volatility of the memory access
Align getOriginalAlign() const { return MMO->getBaseAlign(); }
Align getAlign() const { return MMO->getAlign(); }
- LLVM_ATTRIBUTE_DEPRECATED(unsigned getOriginalAlignment() const,
- "Use getOriginalAlign() instead") {
- return MMO->getBaseAlign().value();
- }
// FIXME: Remove once transition to getAlign is over.
unsigned getAlignment() const { return MMO->getAlign().value(); }
diff --git a/llvm/lib/CodeGen/MachineOperand.cpp b/llvm/lib/CodeGen/MachineOperand.cpp
index ee3cdadf85b8..766915cd0871 100644
--- a/llvm/lib/CodeGen/MachineOperand.cpp
+++ b/llvm/lib/CodeGen/MachineOperand.cpp
@@ -1060,10 +1060,6 @@ void MachineMemOperand::refineAlignment(const MachineMemOperand *MMO) {
}
}
-/// getAlignment - Return the minimum known alignment in bytes of the
-/// actual memory reference.
-uint64_t MachineMemOperand::getAlignment() const { return getAlign().value(); }
-
/// getAlign - Return the minimum known alignment in bytes of the
/// actual memory reference.
Align MachineMemOperand::getAlign() const {
More information about the llvm-commits
mailing list