From 7e088e02621b3472bb92d22f93e83c4f1512bab2 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Mon, 5 Aug 2024 14:55:52 -0400 Subject: [PATCH] xo-jit: fix: xo::ref::rp -> xo::rp --- include/xo/jit/IrPipeline.hpp | 4 ++-- include/xo/jit/LlvmContext.hpp | 2 +- include/xo/jit/MachPipeline.hpp | 8 ++++---- src/jit/IrPipeline.cpp | 2 +- src/jit/LlvmContext.cpp | 2 +- src/jit/MachPipeline.cpp | 6 ++++-- 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/include/xo/jit/IrPipeline.hpp b/include/xo/jit/IrPipeline.hpp index d8234e6b..5268d088 100644 --- a/include/xo/jit/IrPipeline.hpp +++ b/include/xo/jit/IrPipeline.hpp @@ -51,7 +51,7 @@ namespace xo { **/ class IrPipeline : public ref::Refcount { public: - explicit IrPipeline(ref::rp llvm_cx); + explicit IrPipeline(rp 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 llvm_cx_; + rp llvm_cx_; /** manages all the passes+analaysis (?) **/ std::unique_ptr llvm_fpmgr_; diff --git a/include/xo/jit/LlvmContext.hpp b/include/xo/jit/LlvmContext.hpp index cf594c82..ac577b9e 100644 --- a/include/xo/jit/LlvmContext.hpp +++ b/include/xo/jit/LlvmContext.hpp @@ -24,7 +24,7 @@ namespace xo { **/ class LlvmContext : public ref::Refcount { public: - static xo::ref::rp make(); + static rp make(); llvm::LLVMContext & llvm_cx_ref() { return *llvm_cx_; } std::unique_ptr & llvm_cx() { return llvm_cx_; } diff --git a/include/xo/jit/MachPipeline.hpp b/include/xo/jit/MachPipeline.hpp index 11589e8c..d6ae4ea2 100644 --- a/include/xo/jit/MachPipeline.hpp +++ b/include/xo/jit/MachPipeline.hpp @@ -67,7 +67,7 @@ namespace xo { public: /* tracking KaleidoscopeJIT::Create() here.. */ static llvm::Expected> make_aux(); - static xo::ref::rp make(); + static rp make(); // ----- access ----- @@ -192,7 +192,7 @@ namespace xo { * jit_->addModule() * Note that this makes the module itself unavailable to us **/ - xo::ref::rp ir_pipeline_; + rp 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 llvm_cx_; + rp llvm_cx_; /** builder for intermediate-representation objects **/ std::unique_ptr> llvm_toplevel_ir_builder_; @@ -213,7 +213,7 @@ namespace xo { std::unique_ptr llvm_module_; /** map global names to functions/variables **/ - ref::rp global_env_; + rp global_env_; /** map variable names (formal parameters) to * corresponding llvm IR. diff --git a/src/jit/IrPipeline.cpp b/src/jit/IrPipeline.cpp index 285edbe3..cefd9766 100644 --- a/src/jit/IrPipeline.cpp +++ b/src/jit/IrPipeline.cpp @@ -4,7 +4,7 @@ namespace xo { namespace jit { - IrPipeline::IrPipeline(ref::rp llvm_cx) + IrPipeline::IrPipeline(rp llvm_cx) { using std::make_unique; diff --git a/src/jit/LlvmContext.cpp b/src/jit/LlvmContext.cpp index 19349aca..1e4ad007 100644 --- a/src/jit/LlvmContext.cpp +++ b/src/jit/LlvmContext.cpp @@ -4,7 +4,7 @@ namespace xo { namespace jit { - xo::ref::rp + rp LlvmContext::make() { return new LlvmContext(); } diff --git a/src/jit/MachPipeline.cpp b/src/jit/MachPipeline.cpp index 9c6bb1cd..15852aee 100644 --- a/src/jit/MachPipeline.cpp +++ b/src/jit/MachPipeline.cpp @@ -60,7 +60,7 @@ namespace xo { )); } /*make*/ - xo::ref::rp + rp 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);