Add a function for profiling to run at shutdown. Unlike the existing API, this
[llvm/stm8.git] / lib / CodeGen / OcamlGC.cpp
blob48db200c513cd2a54d6767d017848e97d5e03897
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.
13 // The frametable emitter is in OcamlGCPrinter.cpp.
15 //===----------------------------------------------------------------------===//
17 #include "llvm/CodeGen/GCs.h"
18 #include "llvm/CodeGen/GCStrategy.h"
20 using namespace llvm;
22 namespace {
23 class OcamlGC : public GCStrategy {
24 public:
25 OcamlGC();
29 static GCRegistry::Add<OcamlGC>
30 X("ocaml", "ocaml 3.10-compatible GC");
32 void llvm::linkOcamlGC() { }
34 OcamlGC::OcamlGC() {
35 NeededSafePoints = 1 << GC::PostCall;
36 UsesMetadata = true;