Skip to content

Commit

Permalink
Using compiler enum instead of runtime enum. (iree-org#7410)
Browse files Browse the repository at this point in the history
Drops a dep on compiler->runtime.
  • Loading branch information
benvanik authored Oct 20, 2021
1 parent d0ae854 commit ab58d17
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion iree/compiler/Dialect/VM/Conversion/StandardToVM/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ cc_library(
"ConvertStandardToVM.h",
],
deps = [
"//iree/base",
"//iree/compiler/Dialect/Util/IR",
"//iree/compiler/Dialect/VM/Conversion",
"//iree/compiler/Dialect/VM/IR",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ iree_cc_library(
MLIRStandard
MLIRTransformUtils
MLIRTransforms
iree::base
iree::compiler::Dialect::Util::IR
iree::compiler::Dialect::VM::Conversion
iree::compiler::Dialect::VM::IR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include "iree/compiler/Dialect/VM/Conversion/StandardToVM/ConvertStandardToVM.h"

#include "iree/base/api.h"
#include "iree/compiler/Dialect/Util/IR/UtilTypes.h"
#include "iree/compiler/Dialect/VM/Conversion/TargetOptions.h"
#include "iree/compiler/Dialect/VM/Conversion/TypeConverter.h"
Expand Down Expand Up @@ -739,8 +738,9 @@ class AssertOpConversion : public OpConversionPattern<AssertOp> {
AssertOpAdaptor operands(newOperands, srcOp->getAttrDictionary());
auto status = rewriter.create<IREE::VM::ConstI32Op>(
srcOp.getLoc(),
rewriter.getIntegerAttr(rewriter.getIntegerType(32),
IREE_STATUS_FAILED_PRECONDITION));
rewriter.getIntegerAttr(
rewriter.getIntegerType(32),
static_cast<int32_t>(IREE::Util::StatusCode::FailedPrecondition)));
// TODO(benvanik): invert cond_fail instead.
auto invertedCondition = rewriter.createOrFold<IREE::VM::XorI32Op>(
srcOp.getLoc(), operands.arg().getType(), operands.arg(),
Expand Down

0 comments on commit ab58d17

Please sign in to comment.