From 930b9f0bcb60c49c68e7b71f55c5185262844afd Mon Sep 17 00:00:00 2001 From: Maksim Levental Date: Fri, 27 Dec 2024 17:21:25 -0600 Subject: [PATCH 1/3] [mlir][scf] DCE `ensureLoopTerminator` More dead code in headers... --- mlir/include/mlir/Dialect/SCF/IR/SCF.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/mlir/include/mlir/Dialect/SCF/IR/SCF.h b/mlir/include/mlir/Dialect/SCF/IR/SCF.h index b62c941797947..ba648181daecb 100644 --- a/mlir/include/mlir/Dialect/SCF/IR/SCF.h +++ b/mlir/include/mlir/Dialect/SCF/IR/SCF.h @@ -40,12 +40,6 @@ void buildTerminatedBody(OpBuilder &builder, Location loc); namespace mlir { namespace scf { -// Insert `loop.yield` at the end of the only region's only block if it -// does not have a terminator already. If a new `loop.yield` is inserted, -// the location is specified by `loc`. If the region is empty, insert a new -// block first. -void ensureLoopTerminator(Region ®ion, Builder &builder, Location loc); - /// Returns the loop parent of an induction variable. If the provided value is /// not an induction variable, then return nullptr. ForOp getForInductionVarOwner(Value val); From d836186198f952e430a0c0c6daf00c02779feba3 Mon Sep 17 00:00:00 2001 From: Maksim Levental Date: Fri, 27 Dec 2024 22:28:59 -0600 Subject: [PATCH 2/3] Update LLVMAttrDefs.td --- mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td b/mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td index e8eeafd09a9cb..92499f88c6b1a 100644 --- a/mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td +++ b/mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td @@ -1162,8 +1162,7 @@ def LLVM_TargetFeaturesAttr : LLVM_Attr<"TargetFeatures", "target_features"> let parameters = (ins OptionalArrayRefParameter<"StringAttr">:$features); let builders = [ - TypeBuilder<(ins "::llvm::StringRef":$features)>, - TypeBuilder<(ins "::llvm::ArrayRef<::llvm::StringRef>":$features)> + TypeBuilder<(ins "::llvm::StringRef":$features)> ]; let extraClassDeclaration = [{ From 9cbe62583d8020b243bf92c84faab8e71d86e8b8 Mon Sep 17 00:00:00 2001 From: Maksim Levental Date: Fri, 27 Dec 2024 22:30:45 -0600 Subject: [PATCH 3/3] Update LLVMAttrDefs.td --- mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td b/mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td index 92499f88c6b1a..e8eeafd09a9cb 100644 --- a/mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td +++ b/mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td @@ -1162,7 +1162,8 @@ def LLVM_TargetFeaturesAttr : LLVM_Attr<"TargetFeatures", "target_features"> let parameters = (ins OptionalArrayRefParameter<"StringAttr">:$features); let builders = [ - TypeBuilder<(ins "::llvm::StringRef":$features)> + TypeBuilder<(ins "::llvm::StringRef":$features)>, + TypeBuilder<(ins "::llvm::ArrayRef<::llvm::StringRef>":$features)> ]; let extraClassDeclaration = [{