2008-08-17 18:44:35 +00:00
|
|
|
//===-- OcamlGC.cpp - Ocaml frametable GC strategy ------------------------===//
|
2008-08-17 12:56:54 +00:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file implements lowering for the llvm.gc* intrinsics compatible with
|
|
|
|
// Objective Caml 3.10.0, which uses a liveness-accurate static stack map.
|
2009-01-16 06:53:46 +00:00
|
|
|
//
|
2008-08-17 18:44:35 +00:00
|
|
|
// The frametable emitter is in OcamlGCPrinter.cpp.
|
2008-08-17 12:56:54 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
2009-01-16 06:53:46 +00:00
|
|
|
|
2008-08-17 12:56:54 +00:00
|
|
|
#include "llvm/CodeGen/GCs.h"
|
|
|
|
#include "llvm/CodeGen/GCStrategy.h"
|
|
|
|
|
|
|
|
using namespace llvm;
|
|
|
|
|
|
|
|
namespace {
|
2009-10-25 06:33:48 +00:00
|
|
|
class OcamlGC : public GCStrategy {
|
2008-08-17 12:56:54 +00:00
|
|
|
public:
|
2008-08-17 18:44:35 +00:00
|
|
|
OcamlGC();
|
2008-08-17 12:56:54 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2008-08-17 18:44:35 +00:00
|
|
|
static GCRegistry::Add<OcamlGC>
|
|
|
|
X("ocaml", "ocaml 3.10-compatible GC");
|
2008-08-17 12:56:54 +00:00
|
|
|
|
2008-08-17 18:44:35 +00:00
|
|
|
void llvm::linkOcamlGC() { }
|
2008-08-17 12:56:54 +00:00
|
|
|
|
2008-08-17 18:44:35 +00:00
|
|
|
OcamlGC::OcamlGC() {
|
2008-08-17 12:56:54 +00:00
|
|
|
NeededSafePoints = 1 << GC::PostCall;
|
|
|
|
UsesMetadata = true;
|
|
|
|
}
|