Skip to content
This repository was archived by the owner on Sep 2, 2018. It is now read-only.

Commit 678ba5a

Browse files
committed
fix documentation comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269225 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 6d6b3df commit 678ba5a

File tree

1 file changed

+35
-41
lines changed

1 file changed

+35
-41
lines changed

include/llvm/CodeGen/MachineMemOperand.h

Lines changed: 35 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,11 @@ class raw_ostream;
3030
class MachineFunction;
3131
class ModuleSlotTracker;
3232

33-
/// MachinePointerInfo - This class contains a discriminated union of
34-
/// information about pointers in memory operands, relating them back to LLVM IR
35-
/// or to virtual locations (such as frame indices) that are exposed during
36-
/// codegen.
33+
/// This class contains a discriminated union of information about pointers in
34+
/// memory operands, relating them back to LLVM IR or to virtual locations (such
35+
/// as frame indices) that are exposed during codegen.
3736
struct MachinePointerInfo {
38-
/// V - This is the IR pointer value for the access, or it is null if unknown.
37+
/// This is the IR pointer value for the access, or it is null if unknown.
3938
/// If this is null, then the access is to a pointer in the default address
4039
/// space.
4140
PointerUnion<const Value *, const PseudoSourceValue *> V;
@@ -57,34 +56,30 @@ struct MachinePointerInfo {
5756
return MachinePointerInfo(V.get<const PseudoSourceValue*>(), Offset+O);
5857
}
5958

60-
/// getAddrSpace - Return the LLVM IR address space number that this pointer
61-
/// points into.
59+
/// Return the LLVM IR address space number that this pointer points into.
6260
unsigned getAddrSpace() const;
6361

64-
/// getConstantPool - Return a MachinePointerInfo record that refers to the
65-
/// constant pool.
62+
/// Return a MachinePointerInfo record that refers to the constant pool.
6663
static MachinePointerInfo getConstantPool(MachineFunction &MF);
6764

68-
/// getFixedStack - Return a MachinePointerInfo record that refers to the
69-
/// the specified FrameIndex.
65+
/// Return a MachinePointerInfo record that refers to the specified
66+
/// FrameIndex.
7067
static MachinePointerInfo getFixedStack(MachineFunction &MF, int FI,
7168
int64_t Offset = 0);
7269

73-
/// getJumpTable - Return a MachinePointerInfo record that refers to a
74-
/// jump table entry.
70+
/// Return a MachinePointerInfo record that refers to a jump table entry.
7571
static MachinePointerInfo getJumpTable(MachineFunction &MF);
7672

77-
/// getGOT - Return a MachinePointerInfo record that refers to a
78-
/// GOT entry.
73+
/// Return a MachinePointerInfo record that refers to a GOT entry.
7974
static MachinePointerInfo getGOT(MachineFunction &MF);
8075

81-
/// getStack - stack pointer relative access.
76+
/// Stack pointer relative access.
8277
static MachinePointerInfo getStack(MachineFunction &MF, int64_t Offset);
8378
};
8479

8580

8681
//===----------------------------------------------------------------------===//
87-
/// MachineMemOperand - A description of a memory reference used in the backend.
82+
/// A description of a memory reference used in the backend.
8883
/// Instead of holding a StoreInst or LoadInst, this class holds the address
8984
/// Value of the reference along with a byte size and offset. This allows it
9085
/// to describe lowered loads and stores. Also, the special PseudoSourceValue
@@ -118,17 +113,17 @@ class MachineMemOperand {
118113
MOMaxBits = 8
119114
};
120115

121-
/// MachineMemOperand - Construct an MachineMemOperand object with the
122-
/// specified PtrInfo, flags, size, and base alignment.
116+
/// Construct a MachineMemOperand object with the specified PtrInfo, flags,
117+
/// size, and base alignment.
123118
MachineMemOperand(MachinePointerInfo PtrInfo, unsigned flags, uint64_t s,
124119
unsigned base_alignment,
125120
const AAMDNodes &AAInfo = AAMDNodes(),
126121
const MDNode *Ranges = nullptr);
127122

128123
const MachinePointerInfo &getPointerInfo() const { return PtrInfo; }
129124

130-
/// getValue - Return the base address of the memory access. This may either
131-
/// be a normal LLVM IR Value, or one of the special values used in CodeGen.
125+
/// Return the base address of the memory access. This may either be a normal
126+
/// LLVM IR Value, or one of the special values used in CodeGen.
132127
/// Special values are those obtained via
133128
/// PseudoSourceValue::getFixedStack(int), PseudoSourceValue::getStack, and
134129
/// other PseudoSourceValue member functions which return objects which stand
@@ -142,34 +137,33 @@ class MachineMemOperand {
142137

143138
const void *getOpaqueValue() const { return PtrInfo.V.getOpaqueValue(); }
144139

145-
/// getFlags - Return the raw flags of the source value, \see MemOperandFlags.
140+
/// Return the raw flags of the source value, \see MemOperandFlags.
146141
unsigned int getFlags() const { return Flags & ((1 << MOMaxBits) - 1); }
147142

148143
/// Bitwise OR the current flags with the given flags.
149144
void setFlags(unsigned f) { Flags |= (f & ((1 << MOMaxBits) - 1)); }
150145

151-
/// getOffset - For normal values, this is a byte offset added to the base
152-
/// address. For PseudoSourceValue::FPRel values, this is the FrameIndex
153-
/// number.
146+
/// For normal values, this is a byte offset added to the base address.
147+
/// For PseudoSourceValue::FPRel values, this is the FrameIndex number.
154148
int64_t getOffset() const { return PtrInfo.Offset; }
155149

156150
unsigned getAddrSpace() const { return PtrInfo.getAddrSpace(); }
157151

158-
/// getSize - Return the size in bytes of the memory reference.
152+
/// Return the size in bytes of the memory reference.
159153
uint64_t getSize() const { return Size; }
160154

161-
/// getAlignment - Return the minimum known alignment in bytes of the
162-
/// actual memory reference.
155+
/// Return the minimum known alignment in bytes of the actual memory
156+
/// reference.
163157
uint64_t getAlignment() const;
164158

165-
/// getBaseAlignment - Return the minimum known alignment in bytes of the
166-
/// base address, without the offset.
159+
/// Return the minimum known alignment in bytes of the base address, without
160+
/// the offset.
167161
uint64_t getBaseAlignment() const { return (1u << (Flags >> MOMaxBits)) >> 1; }
168162

169-
/// getAAInfo - Return the AA tags for the memory reference.
163+
/// Return the AA tags for the memory reference.
170164
AAMDNodes getAAInfo() const { return AAInfo; }
171165

172-
/// getRanges - Return the range tag for the memory reference.
166+
/// Return the range tag for the memory reference.
173167
const MDNode *getRanges() const { return Ranges; }
174168

175169
bool isLoad() const { return Flags & MOLoad; }
@@ -178,23 +172,23 @@ class MachineMemOperand {
178172
bool isNonTemporal() const { return Flags & MONonTemporal; }
179173
bool isInvariant() const { return Flags & MOInvariant; }
180174

181-
/// isUnordered - Returns true if this memory operation doesn't have any
182-
/// ordering constraints other than normal aliasing. Volatile and atomic
183-
/// memory operations can't be reordered.
175+
/// Returns true if this memory operation doesn't have any ordering
176+
/// constraints other than normal aliasing. Volatile and atomic memory
177+
/// operations can't be reordered.
184178
///
185179
/// Currently, we don't model the difference between volatile and atomic
186180
/// operations. They should retain their ordering relative to all memory
187181
/// operations.
188182
bool isUnordered() const { return !isVolatile(); }
189183

190-
/// refineAlignment - Update this MachineMemOperand to reflect the alignment
191-
/// of MMO, if it has a greater alignment. This must only be used when the
192-
/// new alignment applies to all users of this MachineMemOperand.
184+
/// Update this MachineMemOperand to reflect the alignment of MMO, if it has a
185+
/// greater alignment. This must only be used when the new alignment applies
186+
/// to all users of this MachineMemOperand.
193187
void refineAlignment(const MachineMemOperand *MMO);
194188

195-
/// setValue - Change the SourceValue for this MachineMemOperand. This
196-
/// should only be used when an object is being relocated and all references
197-
/// to it are being updated.
189+
/// Change the SourceValue for this MachineMemOperand. This should only be
190+
/// used when an object is being relocated and all references to it are being
191+
/// updated.
198192
void setValue(const Value *NewSV) { PtrInfo.V = NewSV; }
199193
void setValue(const PseudoSourceValue *NewSV) { PtrInfo.V = NewSV; }
200194
void setOffset(int64_t NewOffset) { PtrInfo.Offset = NewOffset; }

0 commit comments

Comments
 (0)