blob: 17654a6ac3a20da74caf9e384e4c880df02ab91d [file] [log] [blame]
Shih-wei Liaoe264f622010-02-10 11:10:31 -08001//===-- 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"
18#include "llvm/CodeGen/GCStrategy.h"
19
20using namespace llvm;
21
22namespace {
Stephen Hinesebe69fe2015-03-23 12:10:34 -070023class OcamlGC : public GCStrategy {
24public:
25 OcamlGC();
26};
Shih-wei Liaoe264f622010-02-10 11:10:31 -080027}
28
Stephen Hinesebe69fe2015-03-23 12:10:34 -070029static GCRegistry::Add<OcamlGC> X("ocaml", "ocaml 3.10-compatible GC");
Shih-wei Liaoe264f622010-02-10 11:10:31 -080030
Stephen Hinesebe69fe2015-03-23 12:10:34 -070031void llvm::linkOcamlGC() {}
Shih-wei Liaoe264f622010-02-10 11:10:31 -080032
33OcamlGC::OcamlGC() {
34 NeededSafePoints = 1 << GC::PostCall;
35 UsesMetadata = true;
36}