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"
|
2015-01-26 18:26:35 +00:00
|
|
|
#include "llvm/CodeGen/GCStrategy.h"
|
2008-08-17 12:56:54 +00:00
|
|
|
|
|
|
|
using namespace llvm;
|
|
|
|
|
|
|
|
namespace {
|
2015-01-16 23:16:12 +00:00
|
|
|
class OcamlGC : public GCStrategy {
|
|
|
|
public:
|
|
|
|
OcamlGC();
|
|
|
|
};
|
2008-08-17 12:56:54 +00:00
|
|
|
}
|
|
|
|
|
2015-01-16 23:16:12 +00:00
|
|
|
static GCRegistry::Add<OcamlGC> X("ocaml", "ocaml 3.10-compatible GC");
|
2008-08-17 12:56:54 +00:00
|
|
|
|
2015-01-16 23:16:12 +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;
|
|
|
|
}
|