From: Philip Reames Date: Wed, 10 Dec 2014 00:30:11 +0000 (+0000) Subject: Extend some comments around GCModuleInfo, GCFunctionInfo, & GCStrategy X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f8225ab80f1a0e1f1e3a2d4af6cb229832459cbe;p=oota-llvm.git Extend some comments around GCModuleInfo, GCFunctionInfo, & GCStrategy Nothing particularly interesting here, just documenting the way the code currently works before I start changing it... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223866 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/CodeGen/GCMetadata.h b/include/llvm/CodeGen/GCMetadata.h index ddcc823ecd9..27e4219ec93 100644 --- a/include/llvm/CodeGen/GCMetadata.h +++ b/include/llvm/CodeGen/GCMetadata.h @@ -80,8 +80,8 @@ namespace llvm { }; - /// GCFunctionInfo - Garbage collection metadata for a single function. - /// + /// Garbage collection metadata for a single function. Currently, this + /// information only applies to GCStrategies which use GCRoot. class GCFunctionInfo { public: typedef std::vector::iterator iterator; @@ -161,8 +161,9 @@ namespace llvm { }; - /// GCModuleInfo - Garbage collection metadata for a whole module. - /// + /// An analysis pass which caches information about the entire Module. + /// Records both the function level information used by GCRoots and a + /// cache of the 'active' gc strategy objects for the current Module. class GCModuleInfo : public ImmutablePass { typedef StringMap strategy_map_type; typedef std::vector> list_type; diff --git a/include/llvm/CodeGen/GCStrategy.h b/include/llvm/CodeGen/GCStrategy.h index fa6c6f5d275..3bc2069ca1e 100644 --- a/include/llvm/CodeGen/GCStrategy.h +++ b/include/llvm/CodeGen/GCStrategy.h @@ -51,7 +51,9 @@ namespace llvm { /// GCStrategy describes a garbage collector algorithm's code generation /// requirements, and provides overridable hooks for those needs which cannot - /// be abstractly described. + /// be abstractly described. GCStrategy objects currently must be looked up + /// through the GCModuleInfo analysis pass. They are owned by the analysis + /// pass and recreated every time that pass is invalidated. class GCStrategy { public: typedef std::vector> list_type;