mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 00:21:03 +00:00
GCStrategy should not own GCFunctionInfo
This change moves the ownership and access of GCFunctionInfo (the object which describes the safepoints associated with a safepoint under GCRoot) to GCModuleInfo. Previously, this was owned by GCStrategy which was in turned owned by GCModuleInfo. This made GCStrategy module specific which is 'surprising' given it's name and other purposes. There's a few more changes needed, but we're getting towards the point we can reuse GCStrategy for gc.statepoint as well. p.s. The style of this code ends up being a mess. I was trying to move code around without otherwise changing much. Once I get the ownership structure rearranged, I will go through and fixup spacing, naming, comments etc. Differential Revision: http://reviews.llvm.org/D6587 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223994 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -55,16 +55,10 @@ namespace llvm {
|
||||
/// 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;
|
||||
typedef list_type::iterator iterator;
|
||||
|
||||
private:
|
||||
friend class GCModuleInfo;
|
||||
std::string Name;
|
||||
|
||||
list_type Functions;
|
||||
|
||||
protected:
|
||||
unsigned NeededSafePoints; ///< Bitmask of required safe points.
|
||||
bool CustomReadBarriers; ///< Default is to insert loads.
|
||||
@@ -126,15 +120,6 @@ namespace llvm {
|
||||
/// the back-end (assembler, JIT, or otherwise).
|
||||
bool usesMetadata() const { return UsesMetadata; }
|
||||
|
||||
/// begin/end - Iterators for function metadata.
|
||||
///
|
||||
iterator begin() { return Functions.begin(); }
|
||||
iterator end() { return Functions.end(); }
|
||||
|
||||
/// insertFunctionMetadata - Creates metadata for a function.
|
||||
///
|
||||
GCFunctionInfo *insertFunctionInfo(const Function &F);
|
||||
|
||||
/// initializeCustomLowering/performCustomLowering - If any of the actions
|
||||
/// are set to custom, performCustomLowering must be overriden to transform
|
||||
/// the corresponding actions to LLVM IR. initializeCustomLowering is
|
||||
|
Reference in New Issue
Block a user