xo-jit: + MachPipeline::xsession()
This commit is contained in:
parent
09d884737d
commit
585e4cc35c
2 changed files with 10 additions and 0 deletions
|
|
@ -43,6 +43,7 @@
|
|||
#include "llvm/Transforms/Scalar/GVN.h"
|
||||
#include "llvm/Transforms/Scalar/Reassociate.h"
|
||||
#include "llvm/Transforms/Scalar/SimplifyCFG.h"
|
||||
#include <llvm/ExecutionEngine/Orc/Core.h>
|
||||
|
||||
|
||||
namespace xo {
|
||||
|
|
@ -57,6 +58,7 @@ namespace xo {
|
|||
using Expression = xo::ast::Expression;
|
||||
using Lambda = xo::ast::Lambda;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using ExecutionSession = llvm::orc::ExecutionSession;
|
||||
using DataLayout = llvm::DataLayout;
|
||||
//using ConstantInterface = xo::ast::ConstantInterface;
|
||||
|
||||
|
|
@ -73,6 +75,8 @@ namespace xo {
|
|||
|
||||
/** target triple = string describing target host for codegen **/
|
||||
const std::string & target_triple() const;
|
||||
/** execution session (run jit-generated machine code in this process) **/
|
||||
const ExecutionSession * xsession() const;
|
||||
/** data layout = rules for alignment/padding; specific to target host **/
|
||||
const DataLayout & data_layout() const;
|
||||
/** append function names defined in attached module to *p_v
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ namespace xo {
|
|||
using xo::reflect::Reflect;
|
||||
using xo::reflect::StructMember;
|
||||
using xo::reflect::TypeDescr;
|
||||
using llvm::orc::ExecutionSession;
|
||||
using llvm::DataLayout;
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
|
|
@ -96,6 +97,11 @@ namespace xo {
|
|||
ir_pipeline_ = new IrPipeline(llvm_cx_);
|
||||
} /*recreate_llvm_ir_pipeline*/
|
||||
|
||||
const ExecutionSession *
|
||||
MachPipeline::xsession() const {
|
||||
return this->jit_->xsession();
|
||||
}
|
||||
|
||||
/** identifies target host/architecture for machine code.
|
||||
* e.g. "x86_64-unknown-linux-gnu"
|
||||
**/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue