xo-jit: fix: xo::ref::rp -> xo::rp
This commit is contained in:
parent
1f0c0cb71d
commit
7e088e0262
6 changed files with 13 additions and 11 deletions
|
|
@ -51,7 +51,7 @@ namespace xo {
|
|||
**/
|
||||
class IrPipeline : public ref::Refcount {
|
||||
public:
|
||||
explicit IrPipeline(ref::rp<LlvmContext> llvm_cx);
|
||||
explicit IrPipeline(rp<LlvmContext> llvm_cx);
|
||||
|
||||
void run_pipeline(llvm::Function & fn);
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ namespace xo {
|
|||
// ----- transforms (also adapted from kaleidescope.cpp) ------
|
||||
|
||||
/** keepalive for contained llvm::LLVMContext **/
|
||||
ref::rp<LlvmContext> llvm_cx_;
|
||||
rp<LlvmContext> llvm_cx_;
|
||||
|
||||
/** manages all the passes+analaysis (?) **/
|
||||
std::unique_ptr<llvm::FunctionPassManager> llvm_fpmgr_;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ namespace xo {
|
|||
**/
|
||||
class LlvmContext : public ref::Refcount {
|
||||
public:
|
||||
static xo::ref::rp<LlvmContext> make();
|
||||
static rp<LlvmContext> make();
|
||||
|
||||
llvm::LLVMContext & llvm_cx_ref() { return *llvm_cx_; }
|
||||
std::unique_ptr<llvm::LLVMContext> & llvm_cx() { return llvm_cx_; }
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ namespace xo {
|
|||
public:
|
||||
/* tracking KaleidoscopeJIT::Create() here.. */
|
||||
static llvm::Expected<std::unique_ptr<MachPipeline>> make_aux();
|
||||
static xo::ref::rp<MachPipeline> make();
|
||||
static rp<MachPipeline> make();
|
||||
|
||||
// ----- access -----
|
||||
|
||||
|
|
@ -192,7 +192,7 @@ namespace xo {
|
|||
* jit_->addModule()
|
||||
* Note that this makes the module itself unavailable to us
|
||||
**/
|
||||
xo::ref::rp<IrPipeline> ir_pipeline_;
|
||||
rp<IrPipeline> ir_pipeline_;
|
||||
|
||||
/** owns + manages core "global" llvm data,
|
||||
* including type- and constant- unique-ing tables.
|
||||
|
|
@ -200,7 +200,7 @@ namespace xo {
|
|||
* Not threadsafe, but ok to have multiple threads,
|
||||
* each with its own LLVMContext
|
||||
**/
|
||||
ref::rp<LlvmContext> llvm_cx_;
|
||||
rp<LlvmContext> llvm_cx_;
|
||||
|
||||
/** builder for intermediate-representation objects **/
|
||||
std::unique_ptr<llvm::IRBuilder<>> llvm_toplevel_ir_builder_;
|
||||
|
|
@ -213,7 +213,7 @@ namespace xo {
|
|||
std::unique_ptr<llvm::Module> llvm_module_;
|
||||
|
||||
/** map global names to functions/variables **/
|
||||
ref::rp<GlobalEnv> global_env_;
|
||||
rp<GlobalEnv> global_env_;
|
||||
|
||||
/** map variable names (formal parameters) to
|
||||
* corresponding llvm IR.
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace xo {
|
||||
namespace jit {
|
||||
IrPipeline::IrPipeline(ref::rp<LlvmContext> llvm_cx)
|
||||
IrPipeline::IrPipeline(rp<LlvmContext> llvm_cx)
|
||||
{
|
||||
using std::make_unique;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace xo {
|
||||
namespace jit {
|
||||
xo::ref::rp<LlvmContext>
|
||||
rp<LlvmContext>
|
||||
LlvmContext::make() {
|
||||
return new LlvmContext();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ namespace xo {
|
|||
));
|
||||
} /*make*/
|
||||
|
||||
xo::ref::rp<MachPipeline>
|
||||
rp<MachPipeline>
|
||||
MachPipeline::make() {
|
||||
static llvm::ExitOnError llvm_exit_on_err;
|
||||
|
||||
|
|
@ -729,7 +729,9 @@ namespace xo {
|
|||
|
||||
/* generate function body */
|
||||
|
||||
auto block = llvm::BasicBlock::Create(llvm_cx_->llvm_cx_ref(), "entry", llvm_fn);
|
||||
auto block = llvm::BasicBlock::Create(llvm_cx_->llvm_cx_ref(),
|
||||
"entry",
|
||||
llvm_fn);
|
||||
|
||||
ir_builder.SetInsertPoint(block);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue