17#include <llvm/IR/LLVMContext.h>
18#include <llvm/IR/Module.h>
31 this->
liftToLLVM(stream, expr->getAst(), fname, optimize);
38 llvm::LLVMContext context;
44 auto llvmModule = lifter.
convert(node, fname, optimize);
48 llvm::raw_string_ostream llvmStream(dump);
49 llvmModule->print(llvmStream,
nullptr);
57 llvm::LLVMContext context;
62 auto llvmModule = ttllvm.
convert(node,
"__tmp",
true);
63 return llvmtt.
convert(llvmModule.get(),
"__tmp");
Converts a LLVM IR to a Triton AST.
TRITON_EXPORT triton::ast::SharedAbstractNode convert(llvm::Module *llvmModule, const char *fname="__triton")
Converts a given function from an LLVM module to a Triton AST.
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...
TRITON_EXPORT triton::ast::SharedAbstractNode simplifyAstViaLLVM(const triton::ast::SharedAbstractNode &node) const
Lifts and simplify an AST using LLVM.
TRITON_EXPORT LiftingToLLVM()
Constructor.
TRITON_EXPORT std::ostream & liftToLLVM(std::ostream &stream, const triton::engines::symbolic::SharedSymbolicExpression &expr, 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.
std::shared_ptr< triton::engines::symbolic::SymbolicExpression > SharedSymbolicExpression
Shared Symbolic Expression.