diff --git a/empty b/empty new file mode 100644 index 0000000000000..c6cac69265af1 --- /dev/null +++ b/empty @@ -0,0 +1 @@ +empty diff --git a/mlir/include/mlir/IR/Value.h b/mlir/include/mlir/IR/Value.h index dbcc10d4f4df8..5e7d625e1bc55 100644 --- a/mlir/include/mlir/IR/Value.h +++ b/mlir/include/mlir/IR/Value.h @@ -134,12 +134,12 @@ class Value { /// If this value is the result of an operation, return the operation that /// defines it. - Operation *getDefiningOp() const; + Operation *getDefiningOp(); /// If this value is the result of an operation of type OpTy, return the /// operation that defines it. template - OpTy getDefiningOp() const { + OpTy getDefiningOp() { return llvm::dyn_cast_or_null(getDefiningOp()); } @@ -158,12 +158,12 @@ class Value { //===--------------------------------------------------------------------===// /// Drop all uses of this object from their respective owners. - void dropAllUses() const { return impl->dropAllUses(); } + void dropAllUses() { return impl->dropAllUses(); } /// Replace all uses of 'this' value with the new value, updating anything in /// the IR that uses 'this' to use the other value instead. When this returns /// there are zero uses of 'this'. - void replaceAllUsesWith(Value newValue) const { + void replaceAllUsesWith(Value newValue) { impl->replaceAllUsesWith(newValue); } diff --git a/mlir/lib/Conversion/ControlFlowToSPIRV/ControlFlowToSPIRV.cpp b/mlir/lib/Conversion/ControlFlowToSPIRV/ControlFlowToSPIRV.cpp index 8907756d33845..995eecfc3e9c3 100644 --- a/mlir/lib/Conversion/ControlFlowToSPIRV/ControlFlowToSPIRV.cpp +++ b/mlir/lib/Conversion/ControlFlowToSPIRV/ControlFlowToSPIRV.cpp @@ -34,7 +34,7 @@ static LogicalResult legalizeBlockArguments(Block &block, Operation *op, const TypeConverter &converter) { auto builder = OpBuilder::atBlockBegin(&block); for (unsigned i = 0; i < block.getNumArguments(); ++i) { - const auto arg = block.getArgument(i); + BlockArgument arg = block.getArgument(i); if (converter.isLegal(arg.getType())) continue; Type ty = arg.getType(); diff --git a/mlir/lib/IR/Value.cpp b/mlir/lib/IR/Value.cpp index 6b5195da5e47b..bc4d32f522133 100644 --- a/mlir/lib/IR/Value.cpp +++ b/mlir/lib/IR/Value.cpp @@ -17,7 +17,7 @@ using namespace mlir::detail; /// If this value is the result of an Operation, return the operation that /// defines it. -Operation *Value::getDefiningOp() const { +Operation *Value::getDefiningOp() { if (auto result = llvm::dyn_cast(*this)) return result.getOwner(); return nullptr;