LLVM API Documentation
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 #include "llvm/Support/Compiler.h" 00020 00021 using namespace llvm; 00022 00023 namespace { 00024 class VISIBILITY_HIDDEN OcamlGC : public GCStrategy { 00025 public: 00026 OcamlGC(); 00027 }; 00028 } 00029 00030 static GCRegistry::Add<OcamlGC> 00031 X("ocaml", "ocaml 3.10-compatible GC"); 00032 00033 void llvm::linkOcamlGC() { } 00034 00035 OcamlGC::OcamlGC() { 00036 NeededSafePoints = 1 << GC::PostCall; 00037 UsesMetadata = true; 00038 }