diff options
Diffstat (limited to 'lib/CodeGen/BuiltinGCs.cpp')
| -rw-r--r-- | lib/CodeGen/BuiltinGCs.cpp | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/lib/CodeGen/BuiltinGCs.cpp b/lib/CodeGen/BuiltinGCs.cpp index 3a9b20aa661d..93939e573b7b 100644 --- a/lib/CodeGen/BuiltinGCs.cpp +++ b/lib/CodeGen/BuiltinGCs.cpp @@ -12,8 +12,8 @@ // //===----------------------------------------------------------------------===// +#include "llvm/CodeGen/BuiltinGCs.h" #include "llvm/CodeGen/GCStrategy.h" -#include "llvm/CodeGen/GCs.h" #include "llvm/IR/DerivedTypes.h" #include "llvm/Support/Casting.h" @@ -28,10 +28,8 @@ namespace { class ErlangGC : public GCStrategy { public: ErlangGC() { - InitRoots = false; - NeededSafePoints = 1 << GC::PostCall; + NeededSafePoints = true; UsesMetadata = true; - CustomRoots = false; } }; @@ -41,7 +39,7 @@ public: class OcamlGC : public GCStrategy { public: OcamlGC() { - NeededSafePoints = 1 << GC::PostCall; + NeededSafePoints = true; UsesMetadata = true; } }; @@ -56,10 +54,7 @@ public: /// while introducing only minor runtime overhead. class ShadowStackGC : public GCStrategy { public: - ShadowStackGC() { - InitRoots = true; - CustomRoots = true; - } + ShadowStackGC() {} }; /// A GCStrategy which serves as an example for the usage of a statepoint based @@ -74,10 +69,8 @@ public: UseStatepoints = true; // These options are all gc.root specific, we specify them so that the // gc.root lowering code doesn't run. - InitRoots = false; - NeededSafePoints = 0; + NeededSafePoints = false; UsesMetadata = false; - CustomRoots = false; } Optional<bool> isGCManagedPointer(const Type *Ty) const override { @@ -108,10 +101,8 @@ public: UseStatepoints = true; // These options are all gc.root specific, we specify them so that the // gc.root lowering code doesn't run. - InitRoots = false; - NeededSafePoints = 0; + NeededSafePoints = false; UsesMetadata = false; - CustomRoots = false; } Optional<bool> isGCManagedPointer(const Type *Ty) const override { @@ -136,9 +127,5 @@ static GCRegistry::Add<StatepointGC> D("statepoint-example", "an example strategy for statepoint"); static GCRegistry::Add<CoreCLRGC> E("coreclr", "CoreCLR-compatible GC"); -// Provide hooks to ensure the containing library is fully loaded. -void llvm::linkErlangGC() {} -void llvm::linkOcamlGC() {} -void llvm::linkShadowStackGC() {} -void llvm::linkStatepointExampleGC() {} -void llvm::linkCoreCLRGC() {} +// Provide hook to ensure the containing library is fully loaded. +void llvm::linkAllBuiltinGCs() {} |
