mirror of
https://github.com/RPCS3/llvm.git
synced 2025-05-13 08:56:04 +00:00
fix documentation comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269225 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6d6b3df09a
commit
678ba5a117
@ -30,12 +30,11 @@ class raw_ostream;
|
|||||||
class MachineFunction;
|
class MachineFunction;
|
||||||
class ModuleSlotTracker;
|
class ModuleSlotTracker;
|
||||||
|
|
||||||
/// MachinePointerInfo - This class contains a discriminated union of
|
/// This class contains a discriminated union of information about pointers in
|
||||||
/// information about pointers in memory operands, relating them back to LLVM IR
|
/// memory operands, relating them back to LLVM IR or to virtual locations (such
|
||||||
/// or to virtual locations (such as frame indices) that are exposed during
|
/// as frame indices) that are exposed during codegen.
|
||||||
/// codegen.
|
|
||||||
struct MachinePointerInfo {
|
struct MachinePointerInfo {
|
||||||
/// V - This is the IR pointer value for the access, or it is null if unknown.
|
/// This is the IR pointer value for the access, or it is null if unknown.
|
||||||
/// If this is null, then the access is to a pointer in the default address
|
/// If this is null, then the access is to a pointer in the default address
|
||||||
/// space.
|
/// space.
|
||||||
PointerUnion<const Value *, const PseudoSourceValue *> V;
|
PointerUnion<const Value *, const PseudoSourceValue *> V;
|
||||||
@ -57,34 +56,30 @@ struct MachinePointerInfo {
|
|||||||
return MachinePointerInfo(V.get<const PseudoSourceValue*>(), Offset+O);
|
return MachinePointerInfo(V.get<const PseudoSourceValue*>(), Offset+O);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// getAddrSpace - Return the LLVM IR address space number that this pointer
|
/// Return the LLVM IR address space number that this pointer points into.
|
||||||
/// points into.
|
|
||||||
unsigned getAddrSpace() const;
|
unsigned getAddrSpace() const;
|
||||||
|
|
||||||
/// getConstantPool - Return a MachinePointerInfo record that refers to the
|
/// Return a MachinePointerInfo record that refers to the constant pool.
|
||||||
/// constant pool.
|
|
||||||
static MachinePointerInfo getConstantPool(MachineFunction &MF);
|
static MachinePointerInfo getConstantPool(MachineFunction &MF);
|
||||||
|
|
||||||
/// getFixedStack - Return a MachinePointerInfo record that refers to the
|
/// Return a MachinePointerInfo record that refers to the specified
|
||||||
/// the specified FrameIndex.
|
/// FrameIndex.
|
||||||
static MachinePointerInfo getFixedStack(MachineFunction &MF, int FI,
|
static MachinePointerInfo getFixedStack(MachineFunction &MF, int FI,
|
||||||
int64_t Offset = 0);
|
int64_t Offset = 0);
|
||||||
|
|
||||||
/// getJumpTable - Return a MachinePointerInfo record that refers to a
|
/// Return a MachinePointerInfo record that refers to a jump table entry.
|
||||||
/// jump table entry.
|
|
||||||
static MachinePointerInfo getJumpTable(MachineFunction &MF);
|
static MachinePointerInfo getJumpTable(MachineFunction &MF);
|
||||||
|
|
||||||
/// getGOT - Return a MachinePointerInfo record that refers to a
|
/// Return a MachinePointerInfo record that refers to a GOT entry.
|
||||||
/// GOT entry.
|
|
||||||
static MachinePointerInfo getGOT(MachineFunction &MF);
|
static MachinePointerInfo getGOT(MachineFunction &MF);
|
||||||
|
|
||||||
/// getStack - stack pointer relative access.
|
/// Stack pointer relative access.
|
||||||
static MachinePointerInfo getStack(MachineFunction &MF, int64_t Offset);
|
static MachinePointerInfo getStack(MachineFunction &MF, int64_t Offset);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
/// MachineMemOperand - A description of a memory reference used in the backend.
|
/// A description of a memory reference used in the backend.
|
||||||
/// Instead of holding a StoreInst or LoadInst, this class holds the address
|
/// Instead of holding a StoreInst or LoadInst, this class holds the address
|
||||||
/// Value of the reference along with a byte size and offset. This allows it
|
/// Value of the reference along with a byte size and offset. This allows it
|
||||||
/// to describe lowered loads and stores. Also, the special PseudoSourceValue
|
/// to describe lowered loads and stores. Also, the special PseudoSourceValue
|
||||||
@ -118,8 +113,8 @@ public:
|
|||||||
MOMaxBits = 8
|
MOMaxBits = 8
|
||||||
};
|
};
|
||||||
|
|
||||||
/// MachineMemOperand - Construct an MachineMemOperand object with the
|
/// Construct a MachineMemOperand object with the specified PtrInfo, flags,
|
||||||
/// specified PtrInfo, flags, size, and base alignment.
|
/// size, and base alignment.
|
||||||
MachineMemOperand(MachinePointerInfo PtrInfo, unsigned flags, uint64_t s,
|
MachineMemOperand(MachinePointerInfo PtrInfo, unsigned flags, uint64_t s,
|
||||||
unsigned base_alignment,
|
unsigned base_alignment,
|
||||||
const AAMDNodes &AAInfo = AAMDNodes(),
|
const AAMDNodes &AAInfo = AAMDNodes(),
|
||||||
@ -127,8 +122,8 @@ public:
|
|||||||
|
|
||||||
const MachinePointerInfo &getPointerInfo() const { return PtrInfo; }
|
const MachinePointerInfo &getPointerInfo() const { return PtrInfo; }
|
||||||
|
|
||||||
/// getValue - Return the base address of the memory access. This may either
|
/// Return the base address of the memory access. This may either be a normal
|
||||||
/// be a normal LLVM IR Value, or one of the special values used in CodeGen.
|
/// LLVM IR Value, or one of the special values used in CodeGen.
|
||||||
/// Special values are those obtained via
|
/// Special values are those obtained via
|
||||||
/// PseudoSourceValue::getFixedStack(int), PseudoSourceValue::getStack, and
|
/// PseudoSourceValue::getFixedStack(int), PseudoSourceValue::getStack, and
|
||||||
/// other PseudoSourceValue member functions which return objects which stand
|
/// other PseudoSourceValue member functions which return objects which stand
|
||||||
@ -142,34 +137,33 @@ public:
|
|||||||
|
|
||||||
const void *getOpaqueValue() const { return PtrInfo.V.getOpaqueValue(); }
|
const void *getOpaqueValue() const { return PtrInfo.V.getOpaqueValue(); }
|
||||||
|
|
||||||
/// getFlags - Return the raw flags of the source value, \see MemOperandFlags.
|
/// Return the raw flags of the source value, \see MemOperandFlags.
|
||||||
unsigned int getFlags() const { return Flags & ((1 << MOMaxBits) - 1); }
|
unsigned int getFlags() const { return Flags & ((1 << MOMaxBits) - 1); }
|
||||||
|
|
||||||
/// Bitwise OR the current flags with the given flags.
|
/// Bitwise OR the current flags with the given flags.
|
||||||
void setFlags(unsigned f) { Flags |= (f & ((1 << MOMaxBits) - 1)); }
|
void setFlags(unsigned f) { Flags |= (f & ((1 << MOMaxBits) - 1)); }
|
||||||
|
|
||||||
/// getOffset - For normal values, this is a byte offset added to the base
|
/// For normal values, this is a byte offset added to the base address.
|
||||||
/// address. For PseudoSourceValue::FPRel values, this is the FrameIndex
|
/// For PseudoSourceValue::FPRel values, this is the FrameIndex number.
|
||||||
/// number.
|
|
||||||
int64_t getOffset() const { return PtrInfo.Offset; }
|
int64_t getOffset() const { return PtrInfo.Offset; }
|
||||||
|
|
||||||
unsigned getAddrSpace() const { return PtrInfo.getAddrSpace(); }
|
unsigned getAddrSpace() const { return PtrInfo.getAddrSpace(); }
|
||||||
|
|
||||||
/// getSize - Return the size in bytes of the memory reference.
|
/// Return the size in bytes of the memory reference.
|
||||||
uint64_t getSize() const { return Size; }
|
uint64_t getSize() const { return Size; }
|
||||||
|
|
||||||
/// getAlignment - Return the minimum known alignment in bytes of the
|
/// Return the minimum known alignment in bytes of the actual memory
|
||||||
/// actual memory reference.
|
/// reference.
|
||||||
uint64_t getAlignment() const;
|
uint64_t getAlignment() const;
|
||||||
|
|
||||||
/// getBaseAlignment - Return the minimum known alignment in bytes of the
|
/// Return the minimum known alignment in bytes of the base address, without
|
||||||
/// base address, without the offset.
|
/// the offset.
|
||||||
uint64_t getBaseAlignment() const { return (1u << (Flags >> MOMaxBits)) >> 1; }
|
uint64_t getBaseAlignment() const { return (1u << (Flags >> MOMaxBits)) >> 1; }
|
||||||
|
|
||||||
/// getAAInfo - Return the AA tags for the memory reference.
|
/// Return the AA tags for the memory reference.
|
||||||
AAMDNodes getAAInfo() const { return AAInfo; }
|
AAMDNodes getAAInfo() const { return AAInfo; }
|
||||||
|
|
||||||
/// getRanges - Return the range tag for the memory reference.
|
/// Return the range tag for the memory reference.
|
||||||
const MDNode *getRanges() const { return Ranges; }
|
const MDNode *getRanges() const { return Ranges; }
|
||||||
|
|
||||||
bool isLoad() const { return Flags & MOLoad; }
|
bool isLoad() const { return Flags & MOLoad; }
|
||||||
@ -178,23 +172,23 @@ public:
|
|||||||
bool isNonTemporal() const { return Flags & MONonTemporal; }
|
bool isNonTemporal() const { return Flags & MONonTemporal; }
|
||||||
bool isInvariant() const { return Flags & MOInvariant; }
|
bool isInvariant() const { return Flags & MOInvariant; }
|
||||||
|
|
||||||
/// isUnordered - Returns true if this memory operation doesn't have any
|
/// Returns true if this memory operation doesn't have any ordering
|
||||||
/// ordering constraints other than normal aliasing. Volatile and atomic
|
/// constraints other than normal aliasing. Volatile and atomic memory
|
||||||
/// memory operations can't be reordered.
|
/// operations can't be reordered.
|
||||||
///
|
///
|
||||||
/// Currently, we don't model the difference between volatile and atomic
|
/// Currently, we don't model the difference between volatile and atomic
|
||||||
/// operations. They should retain their ordering relative to all memory
|
/// operations. They should retain their ordering relative to all memory
|
||||||
/// operations.
|
/// operations.
|
||||||
bool isUnordered() const { return !isVolatile(); }
|
bool isUnordered() const { return !isVolatile(); }
|
||||||
|
|
||||||
/// refineAlignment - Update this MachineMemOperand to reflect the alignment
|
/// Update this MachineMemOperand to reflect the alignment of MMO, if it has a
|
||||||
/// of MMO, if it has a greater alignment. This must only be used when the
|
/// greater alignment. This must only be used when the new alignment applies
|
||||||
/// new alignment applies to all users of this MachineMemOperand.
|
/// to all users of this MachineMemOperand.
|
||||||
void refineAlignment(const MachineMemOperand *MMO);
|
void refineAlignment(const MachineMemOperand *MMO);
|
||||||
|
|
||||||
/// setValue - Change the SourceValue for this MachineMemOperand. This
|
/// Change the SourceValue for this MachineMemOperand. This should only be
|
||||||
/// should only be used when an object is being relocated and all references
|
/// used when an object is being relocated and all references to it are being
|
||||||
/// to it are being updated.
|
/// updated.
|
||||||
void setValue(const Value *NewSV) { PtrInfo.V = NewSV; }
|
void setValue(const Value *NewSV) { PtrInfo.V = NewSV; }
|
||||||
void setValue(const PseudoSourceValue *NewSV) { PtrInfo.V = NewSV; }
|
void setValue(const PseudoSourceValue *NewSV) { PtrInfo.V = NewSV; }
|
||||||
void setOffset(int64_t NewOffset) { PtrInfo.Offset = NewOffset; }
|
void setOffset(int64_t NewOffset) { PtrInfo.Offset = NewOffset; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user