Load llvm dialect in SereneContext

This commit is contained in:
Sameer Rahmani 2022-06-02 15:19:31 +01:00
parent 7b5ba7797d
commit 31c98d2b3b
2 changed files with 5 additions and 0 deletions

View File

@ -36,6 +36,7 @@
#include <llvm/IR/LLVMContext.h>
#include <llvm/Support/Host.h>
#include <mlir/Dialect/Func/IR/FuncOps.h>
#include <mlir/Dialect/LLVMIR/LLVMDialect.h>
#include <mlir/IR/MLIRContext.h>
#include <mlir/Pass/PassManager.h>
@ -160,6 +161,7 @@ public:
targetPhase(CompilationPhase::NoOptimization) {
mlirContext.getOrLoadDialect<serene::slir::SereneDialect>();
mlirContext.getOrLoadDialect<mlir::func::FuncDialect>();
mlirContext.getOrLoadDialect<mlir::LLVM::LLVMDialect>();
// We need to create one empty namespace, so that the JIT can
// start it's operation.

View File

@ -23,6 +23,9 @@
#include <mlir/Pass/Pass.h>
#define PASS_LOG(...) \
DEBUG_WITH_TYPE("PASSES", llvm::dbgs() << __VA_ARGS__ << "\n");
namespace serene::passes {
/// Return a pass to lower the serene.symbol op