Doxygenize the documentation comments
There were many // comment used to document classes, functions etc. but
those are not picked up by doxygen which expects /// comments. This
converts many comments from // to /// in order to improve the generated
documentation.
BUG=
R=jvoung@chromium.org, kschimpf@google.com
Review URL: https://codereview.chromium.org/1216963007.
diff --git a/src/IceDefs.h b/src/IceDefs.h
index 2ee41a7..17e2fb1 100644
--- a/src/IceDefs.h
+++ b/src/IceDefs.h
@@ -6,10 +6,11 @@
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
-//
-// This file declares various useful types and classes that have widespread use
-// across Subzero. Every Subzero source file is expected to include IceDefs.h.
-//
+///
+/// \file
+/// This file declares various useful types and classes that have widespread use
+/// across Subzero. Every Subzero source file is expected to include IceDefs.h.
+///
//===----------------------------------------------------------------------===//
#ifndef SUBZERO_SRC_ICEDEFS_H
@@ -147,18 +148,18 @@
typedef std::vector<VariableDeclaration *> VariableDeclarationList;
-// SizeT is for holding small-ish limits like number of source
-// operands in an instruction. It is used instead of size_t (which
-// may be 64-bits wide) when we want to save space.
+/// SizeT is for holding small-ish limits like number of source
+/// operands in an instruction. It is used instead of size_t (which
+/// may be 64-bits wide) when we want to save space.
typedef uint32_t SizeT;
-// InstNumberT is for holding an instruction number. Instruction
-// numbers are used for representing Variable live ranges.
+/// InstNumberT is for holding an instruction number. Instruction
+/// numbers are used for representing Variable live ranges.
typedef int32_t InstNumberT;
-// A LiveBeginEndMapEntry maps a Variable::Number value to an
-// Inst::Number value, giving the instruction number that begins or
-// ends a variable's live range.
+/// A LiveBeginEndMapEntry maps a Variable::Number value to an
+/// Inst::Number value, giving the instruction number that begins or
+/// ends a variable's live range.
typedef std::pair<SizeT, InstNumberT> LiveBeginEndMapEntry;
typedef std::vector<LiveBeginEndMapEntry,
CfgLocalAllocator<LiveBeginEndMapEntry>> LiveBeginEndMap;
@@ -167,9 +168,9 @@
typedef uint32_t TimerStackIdT;
typedef uint32_t TimerIdT;
-// Use alignas(MaxCacheLineSize) to isolate variables/fields that
-// might be contended while multithreading. Assumes the maximum cache
-// line size is 64.
+/// Use alignas(MaxCacheLineSize) to isolate variables/fields that
+/// might be contended while multithreading. Assumes the maximum cache
+/// line size is 64.
enum { MaxCacheLineSize = 64 };
// Use ICE_CACHELINE_BOUNDARY to force the next field in a declaration
// list to be aligned to the next cache line.
@@ -178,26 +179,26 @@
#define ICE_CACHELINE_BOUNDARY \
__attribute__((aligned(MaxCacheLineSize + 0))) int : 0
-// PNaCl is ILP32, so theoretically we should only need 32-bit offsets.
+/// PNaCl is ILP32, so theoretically we should only need 32-bit offsets.
typedef int32_t RelocOffsetT;
enum { RelocAddrSize = 4 };
enum LivenessMode {
- // Basic version of live-range-end calculation. Marks the last uses
- // of variables based on dataflow analysis. Records the set of
- // live-in and live-out variables for each block. Identifies and
- // deletes dead instructions (primarily stores).
+ /// Basic version of live-range-end calculation. Marks the last uses
+ /// of variables based on dataflow analysis. Records the set of
+ /// live-in and live-out variables for each block. Identifies and
+ /// deletes dead instructions (primarily stores).
Liveness_Basic,
- // In addition to Liveness_Basic, also calculate the complete
- // live range for each variable in a form suitable for interference
- // calculation and register allocation.
+ /// In addition to Liveness_Basic, also calculate the complete
+ /// live range for each variable in a form suitable for interference
+ /// calculation and register allocation.
Liveness_Intervals
};
enum RegAllocKind {
- RAK_Global, // full, global register allocation
- RAK_InfOnly // allocation only for infinite-weight Variables
+ RAK_Global, /// full, global register allocation
+ RAK_InfOnly /// allocation only for infinite-weight Variables
};
enum VerboseItem {
@@ -221,9 +222,9 @@
typedef uint32_t VerboseMask;
enum FileType {
- FT_Elf, // ELF .o file
- FT_Asm, // Assembly .s file
- FT_Iasm // "Integrated assembler" .byte-style .s file
+ FT_Elf, /// ELF .o file
+ FT_Asm, /// Assembly .s file
+ FT_Iasm /// "Integrated assembler" .byte-style .s file
};
typedef llvm::raw_ostream Ostream;
@@ -233,10 +234,10 @@
enum ErrorCodes { EC_None = 0, EC_Args, EC_Bitcode, EC_Translation };
-// Wrapper around std::error_code for allowing multiple errors to be
-// folded into one. The current implementation keeps track of the
-// first error, which is likely to be the most useful one, and this
-// could be extended to e.g. collect a vector of errors.
+/// Wrapper around std::error_code for allowing multiple errors to be
+/// folded into one. The current implementation keeps track of the
+/// first error, which is likely to be the most useful one, and this
+/// could be extended to e.g. collect a vector of errors.
class ErrorCode : public std::error_code {
ErrorCode(const ErrorCode &) = delete;
ErrorCode &operator=(const ErrorCode &) = delete;
@@ -255,7 +256,7 @@
bool HasError = false;
};
-// Reverse range adaptors written in terms of llvm::make_range().
+/// Reverse range adaptors written in terms of llvm::make_range().
template <typename T>
llvm::iterator_range<typename T::const_reverse_iterator>
reverse_range(const T &Container) {
@@ -266,7 +267,7 @@
return llvm::make_range(Container.rbegin(), Container.rend());
}
-// Options for pooling and randomization of immediates
+/// Options for pooling and randomization of immediates.
enum RandomizeAndPoolImmediatesEnum { RPI_None, RPI_Randomize, RPI_Pool };
} // end of namespace Ice