LLVM API Documentation

OcamlGC.cpp
Go to the documentation of this file.
00001 //===-- OcamlGC.cpp - Ocaml frametable GC strategy ------------------------===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This file implements lowering for the llvm.gc* intrinsics compatible with
00011 // Objective Caml 3.10.0, which uses a liveness-accurate static stack map.
00012 //
00013 // The frametable emitter is in OcamlGCPrinter.cpp.
00014 //
00015 //===----------------------------------------------------------------------===//
00016 
00017 #include "llvm/CodeGen/GCs.h"
00018 #include "llvm/CodeGen/GCStrategy.h"
00019 
00020 using namespace llvm;
00021 
00022 namespace {
00023   class OcamlGC : public GCStrategy {
00024   public:
00025     OcamlGC();
00026   };
00027 }
00028 
00029 static GCRegistry::Add<OcamlGC>
00030 X("ocaml", "ocaml 3.10-compatible GC");
00031 
00032 void llvm::linkOcamlGC() { }
00033 
00034 OcamlGC::OcamlGC() {
00035   NeededSafePoints = 1 << GC::PostCall;
00036   UsesMetadata = true;
00037 }