It turns out most of the thumb2 instructions are not allowed to touch SP. The semanti...
[llvm/avr.git] / lib / CodeGen / OcamlGC.cpp
blobf7bc9f3d31dd2b7447d18f64ef51b5b683c6394e
1 //===-- OcamlGC.cpp - Ocaml frametable GC strategy ------------------------===//
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 lowering for the llvm.gc* intrinsics compatible with
11 // Objective Caml 3.10.0, which uses a liveness-accurate static stack map.
13 // The frametable emitter is in OcamlGCPrinter.cpp.
15 //===----------------------------------------------------------------------===//
17 #include "llvm/CodeGen/GCs.h"
18 #include "llvm/CodeGen/GCStrategy.h"
19 #include "llvm/Support/Compiler.h"
21 using namespace llvm;
23 namespace {
24 class VISIBILITY_HIDDEN OcamlGC : public GCStrategy {
25 public:
26 OcamlGC();
30 static GCRegistry::Add<OcamlGC>
31 X("ocaml", "ocaml 3.10-compatible GC");
33 void llvm::linkOcamlGC() { }
35 OcamlGC::OcamlGC() {
36 NeededSafePoints = 1 << GC::PostCall;
37 UsesMetadata = true;