8#ifndef TRITON_TRITONTOLLVM_HPP
9#define TRITON_TRITONTOLLVM_HPP
15#include <unordered_map>
20#include <llvm/IR/IRBuilder.h>
21#include <llvm/IR/LLVMContext.h>
22#include <llvm/IR/LegacyPassManager.h>
23#include <llvm/IR/Module.h>
24#include <llvm/Transforms/IPO/PassManagerBuilder.h>
48 llvm::LLVMContext& llvmContext;
51 std::shared_ptr<llvm::Module> llvmModule;
54 llvm::IRBuilder<> llvmIR;
57 std::map<triton::ast::SharedAbstractNode, llvm::Value*> llvmVars;
67 TRITON_EXPORT
TritonToLLVM(llvm::LLVMContext& llvmContext);
Converts a Triton's AST to LVM IR.
TRITON_EXPORT std::shared_ptr< llvm::Module > convert(const triton::ast::SharedAbstractNode &node, const char *fname="__triton", bool optimize=false)
Lifts a symbolic expression and all its references to LLVM format. fname represents the name of the L...
std::shared_ptr< triton::ast::AbstractNode > SharedAbstractNode
Shared Abstract Node.