};
- /// 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;
};
- /// 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;
/// 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;