diff options
author | Philip Reames <listmail@philipreames.com> | 2016-01-19 03:57:18 +0000 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2016-01-19 03:57:18 +0000 |
commit | 31955002975b5ae9e4130d0fbeb954bbeb0f95f0 (patch) | |
tree | 3e04060270c70ddd2ec9d4dc2062006ea8174940 /llvm/lib/CodeGen/CoreCLRGC.cpp | |
parent | e708747129f89eb8ff4500f6284c420c63f77302 (diff) | |
download | bcm5719-llvm-31955002975b5ae9e4130d0fbeb954bbeb0f95f0.tar.gz bcm5719-llvm-31955002975b5ae9e4130d0fbeb954bbeb0f95f0.zip |
[GC] Consolidate all built in GCs into a single file [NFC]
Combine a bunch of small files into a single, still rather small, file. The primary purpose of this is to get all of the static initializers into a single file so as to have a well defined order of initialization.
llvm-svn: 258109
Diffstat (limited to 'llvm/lib/CodeGen/CoreCLRGC.cpp')
-rw-r--r-- | llvm/lib/CodeGen/CoreCLRGC.cpp | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/llvm/lib/CodeGen/CoreCLRGC.cpp b/llvm/lib/CodeGen/CoreCLRGC.cpp deleted file mode 100644 index ff7c0d5dc0a..00000000000 --- a/llvm/lib/CodeGen/CoreCLRGC.cpp +++ /dev/null @@ -1,54 +0,0 @@ -//===-- CoreCLRGC.cpp - CoreCLR Runtime GC Strategy -----------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains a GCStrategy for the CoreCLR Runtime. -// The strategy is similar to Statepoint-example GC, but differs from it in -// certain aspects, such as: -// 1) Base-pointers need not be explicitly tracked and reported for -// interior pointers -// 2) Uses a different format for encoding stack-maps -// 3) Location of Safe-point polls: polls are only needed before loop-back edges -// and before tail-calls (not needed at function-entry) -// -// The above differences in behavior are to be implemented in upcoming checkins. -// -//===----------------------------------------------------------------------===// - -#include "llvm/CodeGen/GCStrategy.h" -#include "llvm/IR/DerivedTypes.h" -#include "llvm/IR/Value.h" - -using namespace llvm; - -namespace { -class CoreCLRGC : public GCStrategy { -public: - CoreCLRGC() { - 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; - UsesMetadata = false; - CustomRoots = false; - } - Optional<bool> isGCManagedPointer(const Type *Ty) const override { - // Method is only valid on pointer typed values. - const PointerType *PT = cast<PointerType>(Ty); - // We pick addrspace(1) as our GC managed heap. - return (1 == PT->getAddressSpace()); - } -}; -} - -static GCRegistry::Add<CoreCLRGC> X("coreclr", "CoreCLR-compatible GC"); - -namespace llvm { -void linkCoreCLRGC() {} -} |