diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-05-15 16:12:01 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-05-15 16:12:01 +0000 |
commit | f1925cb05c0bab13cb79e1075389bb580c7f7d4a (patch) | |
tree | 27ff19b150054afb54a833bf23ea73ec985857ba /include/llvm/CodeGen/MachineConstantPool.h | |
parent | f1d2337be1adf74888d1709977fdeda393c8d532 (diff) | |
download | external_llvm-f1925cb05c0bab13cb79e1075389bb580c7f7d4a.zip external_llvm-f1925cb05c0bab13cb79e1075389bb580c7f7d4a.tar.gz external_llvm-f1925cb05c0bab13cb79e1075389bb580c7f7d4a.tar.bz2 |
Doxygenify the comments, bringing the file level comments down to be attached
with the class that it documents. Patch suggested by Vladimir Prus.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28304 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineConstantPool.h')
-rw-r--r-- | include/llvm/CodeGen/MachineConstantPool.h | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/include/llvm/CodeGen/MachineConstantPool.h b/include/llvm/CodeGen/MachineConstantPool.h index bccb146..9c729b2 100644 --- a/include/llvm/CodeGen/MachineConstantPool.h +++ b/include/llvm/CodeGen/MachineConstantPool.h @@ -7,15 +7,8 @@ // //===----------------------------------------------------------------------===// // -// The MachineConstantPool class keeps track of constants referenced by a -// function which must be spilled to memory. This is used for constants which -// are unable to be used directly as operands to instructions, which typically -// include floating point and large integer constants. -// -// Instructions reference the address of these constant pool constants through -// the use of MO_ConstantPoolIndex values. When emitting assembly or machine -// code, these virtual address references are converted to refer to the -// address of the function constant pool values. +/// @file This file declares the MachineConstantPool class which is an abstract +/// constant pool to keep track of constants referenced by a function. // //===----------------------------------------------------------------------===// @@ -30,22 +23,32 @@ namespace llvm { class Constant; class TargetData; -/// MachineConstantPoolEntry - One entry in the constant pool. -/// +/// This class is a data container for one entry in a MachineConstantPool. +/// It contains a pointer to the value and an offset from the start of +/// the constant pool. +/// @brief An entry in a MachineConstantPool struct MachineConstantPoolEntry { - /// Val - The constant itself. - Constant *Val; - /// Offset - The offset of the constant from the start of the constant pool. - unsigned Offset; - + Constant *Val; ///< The constant itself. + unsigned Offset; ///< The offset of the constant from the start of the pool. MachineConstantPoolEntry(Constant *V, unsigned O) : Val(V), Offset(O) {} }; +/// The MachineConstantPool class keeps track of constants referenced by a +/// function which must be spilled to memory. This is used for constants which +/// are unable to be used directly as operands to instructions, which typically +/// include floating point and large integer constants. +/// +/// Instructions reference the address of these constant pool constants through +/// the use of MO_ConstantPoolIndex values. When emitting assembly or machine +/// code, these virtual address references are converted to refer to the +/// address of the function constant pool values. +/// @brief The machine constant pool. class MachineConstantPool { - const TargetData *TD; - unsigned PoolAlignment; - std::vector<MachineConstantPoolEntry> Constants; + const TargetData *TD; ///< The machine's TargetData. + unsigned PoolAlignment; ///< The alignment for the pool. + std::vector<MachineConstantPoolEntry> Constants; ///< The pool of constants. public: + /// @brief The only constructor. MachineConstantPool(const TargetData *td) : TD(td), PoolAlignment(1) {} /// getConstantPoolAlignment - Return the log2 of the alignment required by @@ -54,11 +57,9 @@ public: /// getConstantPoolIndex - Create a new entry in the constant pool or return /// an existing one. User must specify an alignment in bytes for the object. - /// unsigned getConstantPoolIndex(Constant *C, unsigned Alignment); /// isEmpty - Return true if this constant pool contains no constants. - /// bool isEmpty() const { return Constants.empty(); } const std::vector<MachineConstantPoolEntry> &getConstants() const { |