blob: 024946d1436245c02b3168bca766b2eaae67060b [file] [log] [blame]
Yiannis Tsiouris477de3a2013-03-25 13:47:46 +00001//===-- ErlangGC.cpp - Erlang/OTP GC strategy -------------------*- C++ -*-===//
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 the Erlang/OTP runtime-compatible garbage collector
11// (e.g. defines safe points, root initialization etc.)
12//
13// The frametable emitter is in ErlangGCPrinter.cpp.
14//
15//===----------------------------------------------------------------------===//
16
17#include "llvm/CodeGen/GCs.h"
18#include "llvm/CodeGen/GCStrategy.h"
19#include "llvm/CodeGen/MachineInstrBuilder.h"
20#include "llvm/MC/MCContext.h"
21#include "llvm/MC/MCSymbol.h"
22#include "llvm/Target/TargetInstrInfo.h"
23#include "llvm/Target/TargetMachine.h"
Stephen Hines37ed9c12014-12-01 14:51:49 -080024#include "llvm/Target/TargetSubtargetInfo.h"
Yiannis Tsiouris477de3a2013-03-25 13:47:46 +000025
26using namespace llvm;
27
28namespace {
29
Stephen Hinesebe69fe2015-03-23 12:10:34 -070030class ErlangGC : public GCStrategy {
31public:
32 ErlangGC();
33};
Yiannis Tsiouris477de3a2013-03-25 13:47:46 +000034}
35
Stephen Hinesebe69fe2015-03-23 12:10:34 -070036static GCRegistry::Add<ErlangGC> X("erlang",
37 "erlang-compatible garbage collector");
Yiannis Tsiouris477de3a2013-03-25 13:47:46 +000038
Stephen Hinesebe69fe2015-03-23 12:10:34 -070039void llvm::linkErlangGC() {}
Yiannis Tsiouris477de3a2013-03-25 13:47:46 +000040
41ErlangGC::ErlangGC() {
42 InitRoots = false;
43 NeededSafePoints = 1 << GC::PostCall;
44 UsesMetadata = true;
45 CustomRoots = false;
Yiannis Tsiouris477de3a2013-03-25 13:47:46 +000046}