1193323Sed//===-- OcamlGC.cpp - Ocaml frametable GC strategy ------------------------===//
2193323Sed//
3193323Sed//                     The LLVM Compiler Infrastructure
4193323Sed//
5193323Sed// This file is distributed under the University of Illinois Open Source
6193323Sed// License. See LICENSE.TXT for details.
7193323Sed//
8193323Sed//===----------------------------------------------------------------------===//
9193323Sed//
10193323Sed// This file implements lowering for the llvm.gc* intrinsics compatible with
11193323Sed// Objective Caml 3.10.0, which uses a liveness-accurate static stack map.
12193323Sed//
13193323Sed// The frametable emitter is in OcamlGCPrinter.cpp.
14193323Sed//
15193323Sed//===----------------------------------------------------------------------===//
16193323Sed
17193323Sed#include "llvm/CodeGen/GCs.h"
18193323Sed#include "llvm/CodeGen/GCStrategy.h"
19193323Sed
20193323Sedusing namespace llvm;
21193323Sed
22193323Sednamespace {
23198892Srdivacky  class OcamlGC : public GCStrategy {
24193323Sed  public:
25193323Sed    OcamlGC();
26193323Sed  };
27193323Sed}
28193323Sed
29193323Sedstatic GCRegistry::Add<OcamlGC>
30193323SedX("ocaml", "ocaml 3.10-compatible GC");
31193323Sed
32193323Sedvoid llvm::linkOcamlGC() { }
33193323Sed
34193323SedOcamlGC::OcamlGC() {
35193323Sed  NeededSafePoints = 1 << GC::PostCall;
36193323Sed  UsesMetadata = true;
37193323Sed}
38