1 //===-- OcamlCollector.cpp - Ocaml frametable emitter ---------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
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.
13 //===----------------------------------------------------------------------===//
15 #include "llvm/CodeGen/GCs.h"
16 #include "llvm/CodeGen/AsmPrinter.h"
17 #include "llvm/CodeGen/GCStrategy.h"
18 #include "llvm/Module.h"
19 #include "llvm/Target/TargetAsmInfo.h"
20 #include "llvm/Target/TargetData.h"
21 #include "llvm/Target/TargetMachine.h"
27 class VISIBILITY_HIDDEN OcamlCollector : public Collector {
34 static CollectorRegistry::Add<OcamlCollector>
35 X("ocaml", "ocaml 3.10-compatible collector");
37 // -----------------------------------------------------------------------------
39 Collector *llvm::createOcamlCollector() {
40 return new OcamlCollector();
43 OcamlCollector::OcamlCollector() {
44 NeededSafePoints = 1 << GC::PostCall;