OSDN Git Service

GCStrategy should not own GCFunctionInfo
authorPhilip Reames <listmail@philipreames.com>
Thu, 11 Dec 2014 01:47:23 +0000 (01:47 +0000)
committerPhilip Reames <listmail@philipreames.com>
Thu, 11 Dec 2014 01:47:23 +0000 (01:47 +0000)
commit5e62b8471ddf73ae0efef706c339b5a474d48a8c
tree2155a190f2d453cc1534c07601ba7d4937e1040e
parenta40cc0b50cc417a3030567a8d50910eb68d40eb1
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
include/llvm/CodeGen/GCMetadata.h
include/llvm/CodeGen/GCMetadataPrinter.h
include/llvm/CodeGen/GCStrategy.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp
lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp
lib/CodeGen/GCMetadata.cpp
lib/CodeGen/GCMetadataPrinter.cpp
lib/CodeGen/GCStrategy.cpp