Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions include/NeuraDialect/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# Set TableGen include paths
set(MLIR_TABLEGEN_INCLUDES
${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/include/NeuraDialect
${CMAKE_CURRENT_BINARY_DIR}/include/NeuraDialect
${MLIR_MAIN_INCLUDE_DIR}
${MLIR_INCLUDE_DIR})

add_mlir_dialect(Neura neura)

set(LLVM_TARGET_DEFINITIONS NeuraPasses.td)
Expand Down
4 changes: 2 additions & 2 deletions include/NeuraDialect/NeuraOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def Neura_LoadIndexedOp: Op<NeuraDialect, "load_indexed", [AttrSizedOperandSegme
Example:
%value = neura.load_indexed %base [%arg1, %arg2] : f32
}];
let arguments = (ins Arg<AnyMemRef, "the load operation">:$base, Variadic<AnyType>:$indices, Optional<AnyType>:$predicate);
let arguments = (ins AnyType:$base, Variadic<AnyType>:$indices, Optional<AnyType>:$predicate);
let results = (outs AnyType:$result);
let assemblyFormat = "$base `[` $indices `:` type($indices) `]` type($base) ($predicate^ `:` type($predicate))? attr-dict `:` type($result)";
}
Expand All @@ -139,7 +139,7 @@ def Neura_StoreIndexedOp: Op<NeuraDialect, "store_indexed", [AttrSizedOperandSeg
Example:
neura.store_indexed %value, %base [%arg1, %arg2] : f32
}];
let arguments = (ins AnyType:$value, Arg<AnyMemRef, "the store operation">:$base, Variadic<AnyType>:$indices, Optional<AnyType>:$predicate);
let arguments = (ins AnyType:$value, AnyType:$base, Variadic<AnyType>:$indices, Optional<AnyType>:$predicate);
let results = (outs);
let assemblyFormat = "$value `to` $base `[` $indices `:` type($indices) `]` type($base) ($predicate^ `:` type($predicate))? attr-dict `:` type($value)";
}
Expand Down
16 changes: 0 additions & 16 deletions lib/Conversion/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,6 @@ add_subdirectory(LlvmToNeura)
add_subdirectory(MemRefToNeura)
add_subdirectory(BuiltinToNeura)

# add_mlir_library(
# MLIRNeuraConversion

# DEPENDS
# MLIRNeuraTransformsIncGen

# LINK_LIBS PUBLIC
# MLIRIR
# MLIRPass
# MLIRSupport
# MLIRTransforms
# MLIRNeura
# MLIRNeuraArithToNeuraPass
# MLIRNeuraLlvmToNeuraPass
# ${dialect_libs}
# )
add_library(MLIRConversion INTERFACE)

add_dependencies(MLIRConversion MLIRConversionIncGen)
Expand Down
17 changes: 0 additions & 17 deletions lib/NeuraDialect/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
# Set include paths for TableGen
set(MLIR_TABLEGEN_INCLUDES
"-I${PROJECT_SOURCE_DIR}/include"
"-I${PROJECT_SOURCE_DIR}/include/NeuraDialect"
"-I${CMAKE_CURRENT_BINARY_DIR}/include/NeuraDialect")

# Generate TableGen files
set(LLVM_TARGET_DEFINITIONS ${PROJECT_SOURCE_DIR}/include/NeuraDialect/Neura.td)
mlir_tablegen(Neura.h.inc -gen-op-decls ${MLIR_TABLEGEN_INCLUDES})
mlir_tablegen(Neura.cpp.inc -gen-op-defs ${MLIR_TABLEGEN_INCLUDES})
mlir_tablegen(NeuraDialect.h.inc -gen-dialect-decls ${MLIR_TABLEGEN_INCLUDES})
mlir_tablegen(NeuraDialect.cpp.inc -gen-dialect-defs ${MLIR_TABLEGEN_INCLUDES})
mlir_tablegen(NeuraTypes.h.inc -gen-typedef-decls ${MLIR_TABLEGEN_INCLUDES})
mlir_tablegen(NeuraTypes.cpp.inc -gen-typedef-defs ${MLIR_TABLEGEN_INCLUDES})
add_public_tablegen_target(MLIRNeuraDialectIncGen)

# Add the dialect library
add_mlir_dialect_library(MLIRNeura
Neura.cpp
Expand All @@ -27,7 +11,6 @@ add_mlir_dialect_library(MLIRNeura
${PROJECT_SOURCE_DIR}/include/NeuraDialect

DEPENDS
MLIRNeuraDialectIncGen
MLIRNeuraTransformsIncGen
MLIRConversionIncGen

Expand Down
2 changes: 2 additions & 0 deletions lib/NeuraDialect/Transforms/LeveragePredicatedValuePass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "mlir/IR/PatternMatch.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
#include "llvm/Support/raw_ostream.h"

using namespace mlir;

Expand Down Expand Up @@ -38,6 +39,7 @@ struct LeveragePredicatedValuePass
if (block == &block->getParent()->front()) {
return;
}

for (BlockArgument arg : block->getArguments()) {
Type origType = arg.getType();

Expand Down
Loading