LLVM  3.7.0
OcamlGC.cpp
Go to the documentation of this file.
1 //===-- OcamlGC.cpp - Ocaml frametable GC strategy ------------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file implements lowering for the llvm.gc* intrinsics compatible with
11 // Objective Caml 3.10.0, which uses a liveness-accurate static stack map.
12 //
13 // The frametable emitter is in OcamlGCPrinter.cpp.
14 //
15 //===----------------------------------------------------------------------===//
16 
17 #include "llvm/CodeGen/GCs.h"
19 
20 using namespace llvm;
21 
22 namespace {
23 class OcamlGC : public GCStrategy {
24 public:
25  OcamlGC();
26 };
27 }
28 
29 static GCRegistry::Add<OcamlGC> X("ocaml", "ocaml 3.10-compatible GC");
30 
32 
33 OcamlGC::OcamlGC() {
34  NeededSafePoints = 1 << GC::PostCall;
35  UsesMetadata = true;
36 }
void linkOcamlGC()
Creates an ocaml-compatible garbage collector.
Definition: OcamlGC.cpp:31
Instr is the return address of a call.
Definition: GCStrategy.h:69
GCStrategy describes a garbage collector algorithm's code generation requirements, and provides overridable hooks for those needs which cannot be abstractly described.
Definition: GCStrategy.h:78
A static registration template.
Definition: Registry.h:201
static GCRegistry::Add< OcamlGC > X("ocaml","ocaml 3.10-compatible GC")