mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
Factor GC metadata table assembly generation out of Collector in preparation for splitting AsmPrinter into its own library.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54881 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
46
lib/CodeGen/OcamlGC.cpp
Normal file
46
lib/CodeGen/OcamlGC.cpp
Normal file
@ -0,0 +1,46 @@
|
||||
//===-- OcamlCollector.cpp - Ocaml frametable emitter ---------------------===//
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/CodeGen/GCs.h"
|
||||
#include "llvm/CodeGen/AsmPrinter.h"
|
||||
#include "llvm/CodeGen/GCStrategy.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Target/TargetAsmInfo.h"
|
||||
#include "llvm/Target/TargetData.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
|
||||
class VISIBILITY_HIDDEN OcamlCollector : public Collector {
|
||||
public:
|
||||
OcamlCollector();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
static CollectorRegistry::Add<OcamlCollector>
|
||||
X("ocaml", "ocaml 3.10-compatible collector");
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
Collector *llvm::createOcamlCollector() {
|
||||
return new OcamlCollector();
|
||||
}
|
||||
|
||||
OcamlCollector::OcamlCollector() {
|
||||
NeededSafePoints = 1 << GC::PostCall;
|
||||
UsesMetadata = true;
|
||||
}
|
Reference in New Issue
Block a user