diff options
author | Philip Reames <listmail@philipreames.com> | 2014-12-10 00:30:11 +0000 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2014-12-10 00:30:11 +0000 |
commit | f3108ce3e8fa2f6440810512d53d84ed869569fb (patch) | |
tree | 74b4cee8968801dea24fec7c03cc0b5188733811 | |
parent | e4814d0dee213a31a2f975cd91941b9dc7ff6390 (diff) | |
download | bcm5719-llvm-f3108ce3e8fa2f6440810512d53d84ed869569fb.tar.gz bcm5719-llvm-f3108ce3e8fa2f6440810512d53d84ed869569fb.zip |
Extend some comments around GCModuleInfo, GCFunctionInfo, & GCStrategy
Nothing particularly interesting here, just documenting the way the code currently works before I start changing it...
llvm-svn: 223866
-rw-r--r-- | llvm/include/llvm/CodeGen/GCMetadata.h | 9 | ||||
-rw-r--r-- | llvm/include/llvm/CodeGen/GCStrategy.h | 4 |
2 files changed, 8 insertions, 5 deletions
diff --git a/llvm/include/llvm/CodeGen/GCMetadata.h b/llvm/include/llvm/CodeGen/GCMetadata.h index ddcc823ecd9..27e4219ec93 100644 --- a/llvm/include/llvm/CodeGen/GCMetadata.h +++ b/llvm/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<GCPoint>::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<GCStrategy*> strategy_map_type; typedef std::vector<std::unique_ptr<GCStrategy>> list_type; diff --git a/llvm/include/llvm/CodeGen/GCStrategy.h b/llvm/include/llvm/CodeGen/GCStrategy.h index fa6c6f5d275..3bc2069ca1e 100644 --- a/llvm/include/llvm/CodeGen/GCStrategy.h +++ b/llvm/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<std::unique_ptr<GCFunctionInfo>> list_type; |