Eliminate extfunc/cfgfunc/mlfunc as a concept, and just use 'func' instead.
authorChris Lattner <clattner@google.com>
Wed, 2 Jan 2019 18:20:00 +0000 (10:20 -0800)
committerjpienaar <jpienaar@google.com>
Fri, 29 Mar 2019 21:51:37 +0000 (14:51 -0700)
The entire compiler now looks at structural properties of the function (e.g.
does it have one block, does it contain an if/for stmt, etc) so the only thing
holding up this difference is round tripping through the parser/printer syntax.
Removing this shrinks the compile by ~140LOC.

This is step 31/n towards merging instructions and statements.  The last step
is updating the docs, which I will do as a separate patch in order to split it
from this mostly mechanical patch.

PiperOrigin-RevId: 227540453

48 files changed:
mlir/include/mlir/IR/BuiltinOps.h
mlir/include/mlir/IR/Function.h
mlir/lib/Analysis/Verifier.cpp
mlir/lib/IR/AsmPrinter.cpp
mlir/lib/IR/BuiltinOps.cpp
mlir/lib/IR/Function.cpp
mlir/lib/Parser/Parser.cpp
mlir/lib/Parser/TokenKinds.def
mlir/lib/Transforms/LowerIfAndFor.cpp
mlir/test/IR/affine-map.mlir
mlir/test/IR/core-ops.mlir
mlir/test/IR/invalid-ops.mlir
mlir/test/IR/invalid.mlir
mlir/test/IR/memory-ops.mlir
mlir/test/IR/op-stats.mlir
mlir/test/IR/parser.mlir
mlir/test/IR/repro_b120295301.mlir
mlir/test/Target/llvmir.mlir
mlir/test/Transforms/Vectorize/compose_maps.mlir
mlir/test/Transforms/Vectorize/lower_vector_transfers.mlir
mlir/test/Transforms/Vectorize/materialize.mlir
mlir/test/Transforms/Vectorize/materialize_vectors_1d_to_1d.mlir
mlir/test/Transforms/Vectorize/materialize_vectors_2d_to_1d.mlir
mlir/test/Transforms/Vectorize/materialize_vectors_2d_to_2d.mlir
mlir/test/Transforms/Vectorize/vector_utils.mlir
mlir/test/Transforms/Vectorize/vectorize_1d.mlir
mlir/test/Transforms/Vectorize/vectorize_2d.mlir
mlir/test/Transforms/Vectorize/vectorize_3d.mlir
mlir/test/Transforms/Vectorize/vectorize_outer_loop_2d.mlir
mlir/test/Transforms/Vectorize/vectorize_outer_loop_transpose_2d.mlir
mlir/test/Transforms/Vectorize/vectorize_transpose_2d.mlir
mlir/test/Transforms/canonicalize.mlir
mlir/test/Transforms/compose-affine-maps.mlir
mlir/test/Transforms/constant-fold.mlir
mlir/test/Transforms/cse.mlir
mlir/test/Transforms/dma-generate.mlir
mlir/test/Transforms/loop-fusion.mlir
mlir/test/Transforms/loop-tiling.mlir
mlir/test/Transforms/lower-affine-apply.mlir
mlir/test/Transforms/lowerIfAndFor.mlir
mlir/test/Transforms/memref-bound-check.mlir
mlir/test/Transforms/memref-dataflow-opt.mlir
mlir/test/Transforms/memref-dependence-check.mlir
mlir/test/Transforms/pipeline-data-transfer.mlir
mlir/test/Transforms/simplify.mlir
mlir/test/Transforms/slicing_utils.mlir
mlir/test/Transforms/unroll-jam.mlir
mlir/test/Transforms/unroll.mlir

index 88c17d9ca915def4a881cac245c1b59f770d82f7..1ab6f7ee82d40dff3736cfe50d863f52d395591c 100644 (file)
@@ -105,7 +105,6 @@ public:
   // Hooks to customize behavior of this op.
   static bool parse(OpAsmParser *parser, OperationState *result);
   void print(OpAsmPrinter *p) const;
-  bool verify() const;
 
   /// Return the block this branch jumps to.
   Block *getDest();
index 464ffd803e91f7ee1a09e678cd33bf4f96a00892..db85a8e55dbcbeadaf5c94af83bd55d04d4802b4 100644 (file)
@@ -47,23 +47,15 @@ using NamedAttribute = std::pair<Identifier, Attribute>;
 /// This is the base class for all of the MLIR function types.
 class Function : public llvm::ilist_node_with_parent<Function, Module> {
 public:
-  enum class Kind { ExtFunc, CFGFunc, MLFunc };
-
-  Function(Kind kind, Location location, StringRef name, FunctionType type,
+  Function(Location location, StringRef name, FunctionType type,
            ArrayRef<NamedAttribute> attrs = {});
   ~Function();
 
-  Kind getKind() const { return nameAndKind.getInt(); }
-  void setKind(Kind kind) { nameAndKind.setInt(kind); }
-
-  bool isCFG() const { return getKind() == Kind::CFGFunc; }
-  bool isML() const { return getKind() == Kind::MLFunc; }
-
   /// The source location the operation was defined or derived from.
   Location getLoc() const { return location; }
 
   /// Return the name of this function, without the @.
-  Identifier getName() const { return nameAndKind.getPointer(); }
+  Identifier getName() const { return name; }
 
   /// Return the type of this function.
   FunctionType getType() const { return type; }
@@ -75,6 +67,10 @@ public:
   Module *getModule() { return module; }
   const Module *getModule() const { return module; }
 
+  /// Add an entry block to an empty function, and set up the block arguments
+  /// to match the signature of the function.
+  void addEntryBlock();
+
   /// Unlink this function from its module and delete it.
   void erase();
 
@@ -187,8 +183,8 @@ public:
   void viewGraph() const;
 
 private:
-  /// The name of the function and the kind of function this is.
-  llvm::PointerIntPair<Identifier, 2, Kind> nameAndKind;
+  /// The name of the function.
+  Identifier name;
 
   /// The module this function is embedded into.
   Module *module = nullptr;
index fede6e5873f6ee788722481db6e231c5d2f126dd..72c3573dd1c4f43b416ed66b3eb98464ee14d318 100644 (file)
@@ -92,22 +92,9 @@ bool FuncVerifier::verify() {
   llvm::PrettyStackTraceFormat fmt("MLIR Verifier: func @%s",
                                    fn.getName().c_str());
 
-  // If this is an external function, it must be empty.
-  if (fn.getKind() == Function::Kind::ExtFunc) {
-    if (!fn.empty())
-      return failure("extfunc must not have any blocks", fn);
-
-    // nothing else to check.
-    return false;
-  }
-
+  // External functions have nothing more to check.
   if (fn.empty())
-    return failure("function must have at least one block", fn);
-
-  // ML Functions should have exactly one block.
-  // TODO(clattner): This will change real soon now.
-  if (fn.isML() && fn.getBlocks().size() != 1)
-    return fn.emitError("mlfunc should have exactly one block");
+    return false;
 
   // Verify the first block has no predecessors.
   auto *firstBB = &fn.front();
index 1ffed44a78dd089a2f42beaf1bb06ea613f8fcef..d25fde643c5b16eb71bb0f8eb9cfd5d993debdbf 100644 (file)
@@ -1072,19 +1072,7 @@ void FunctionPrinter::print() {
 }
 
 void FunctionPrinter::printFunctionSignature() {
-  switch (function->getKind()) {
-  case Function::Kind::CFGFunc:
-    os << "cfgfunc ";
-    break;
-  case Function::Kind::MLFunc:
-    os << "mlfunc ";
-    break;
-  case Function::Kind::ExtFunc:
-    os << "extfunc ";
-    break;
-  }
-
-  os << '@' << function->getName() << '(';
+  os << "func @" << function->getName() << '(';
 
   auto fnType = function->getType();
 
index 17205ff260ffd239260ce36af4d4907d52d97f59..94cfb9364f3bc8592ddd348bf4c9a90900ebedb5 100644 (file)
@@ -186,13 +186,6 @@ void BranchOp::print(OpAsmPrinter *p) const {
   p->printSuccessorAndUseList(getInstruction(), 0);
 }
 
-bool BranchOp::verify() const {
-  // ML functions do not have branching terminators.
-  if (getInstruction()->getFunction()->isML())
-    return (emitOpError("cannot occur in a ML function"), true);
-  return false;
-}
-
 Block *BranchOp::getDest() { return getInstruction()->getSuccessor(0); }
 
 void BranchOp::setDest(Block *block) {
@@ -255,9 +248,6 @@ void CondBranchOp::print(OpAsmPrinter *p) const {
 }
 
 bool CondBranchOp::verify() const {
-  // ML functions do not have branching terminators.
-  if (getInstruction()->getFunction()->isML())
-    return (emitOpError("cannot occur in a ML function"), true);
   if (!getCondition()->getType().isInteger(1))
     return emitOpError("expected condition type was boolean (i1)");
   return false;
index b7346e9389d67f89830445da34a4dfb72e341788..d2d8b51826c9a2b27301c861ee20895c6846a370 100644 (file)
 #include "llvm/ADT/StringRef.h"
 using namespace mlir;
 
-Function::Function(Kind kind, Location location, StringRef name,
-                   FunctionType type, ArrayRef<NamedAttribute> attrs)
-    : nameAndKind(Identifier::get(name, type.getContext()), kind),
-      location(location), type(type), blocks(this) {
+Function::Function(Location location, StringRef name, FunctionType type,
+                   ArrayRef<NamedAttribute> attrs)
+    : name(Identifier::get(name, type.getContext())), location(location),
+      type(type), blocks(this) {
   this->attrs = AttributeListStorage::get(attrs, getContext());
-
-  // Creating of a Function automatically populates the entry block and
-  // arguments.
-  // TODO(clattner): Unify this behavior.
-  if (kind == Kind::MLFunc) {
-    // The body of an ML Function always has one block.
-    auto *entry = new Block();
-    blocks.push_back(entry);
-
-    // Initialize the arguments.
-    entry->addArguments(type.getInputs());
-  }
 }
 
 Function::~Function() {
@@ -94,8 +82,7 @@ void llvm::ilist_traits<Function>::addNodeToList(Function *function) {
       nameBuffer.resize(originalLength);
       nameBuffer += '_';
       nameBuffer += std::to_string(module->uniquingCounter++);
-      function->nameAndKind.setPointer(
-          Identifier::get(nameBuffer, module->getContext()));
+      function->name = Identifier::get(nameBuffer, module->getContext());
     } while (
         !module->symbolTable.insert({function->getName(), function}).second);
   }
@@ -161,6 +148,15 @@ bool Function::emitError(const Twine &message) const {
 // Function implementation.
 //===----------------------------------------------------------------------===//
 
+/// Add an entry block to an empty function, and set up the block arguments
+/// to match the signature of the function.
+void Function::addEntryBlock() {
+  assert(empty() && "function already has an entry block");
+  auto *entry = new Block();
+  push_back(entry);
+  entry->addArguments(type.getInputs());
+}
+
 void Function::walkInsts(std::function<void(Instruction *)> callback) {
   struct Walker : public InstWalker<Walker> {
     std::function<void(Instruction *)> const &callback;
index 2c603740671aba651e851e695607643e8f208790..1a478258aa5e3be968ba4531108ad26578b4b2d2 100644 (file)
@@ -780,8 +780,7 @@ Function *Parser::resolveFunctionReference(StringRef nameStr, SMLoc nameLoc,
   if (!function) {
     auto &entry = state.functionForwardRefs[name];
     if (!entry)
-      entry = new Function(Function::Kind::ExtFunc,
-                           getEncodedSourceLocation(nameLoc), name, type,
+      entry = new Function(getEncodedSourceLocation(nameLoc), name, type,
                            /*attrs=*/{});
     function = entry;
   }
@@ -3159,7 +3158,7 @@ private:
                                 SmallVectorImpl<StringRef> &argNames);
   ParseResult parseFunctionSignature(StringRef &name, FunctionType &type,
                                      SmallVectorImpl<StringRef> &argNames);
-  ParseResult parseFunc(Function::Kind kind);
+  ParseResult parseFunc();
 };
 } // end anonymous namespace
 
@@ -3285,17 +3284,10 @@ ModuleParser::parseFunctionSignature(StringRef &name, FunctionType &type,
 
 /// Function declarations.
 ///
-///   ext-func ::= `extfunc` function-signature function-attributes?
-//
-///   ml-func ::= `mlfunc` function-signature function-attributes?
-///              `{` inst* return-inst `}`
-///
-///   cfg-func ::= `cfgfunc` function-signature function-attributes?
-///               `{` basic-block+ `}`
-///
+///   func ::= `func` function-signature function-attributes? `{` block+ `}`
 ///   function-attributes ::= `attributes` attribute-dict
 ///
-ParseResult ModuleParser::parseFunc(Function::Kind kind) {
+ParseResult ModuleParser::parseFunc() {
   consumeToken();
 
   StringRef name;
@@ -3315,7 +3307,7 @@ ParseResult ModuleParser::parseFunc(Function::Kind kind) {
 
   // Okay, the function signature was parsed correctly, create the function now.
   auto *function =
-      new Function(kind, getEncodedSourceLocation(loc), name, type, attrs);
+      new Function(getEncodedSourceLocation(loc), name, type, attrs);
   getModule()->getFunctions().push_back(function);
 
   // Verify no name collision / redefinition.
@@ -3324,7 +3316,7 @@ ParseResult ModuleParser::parseFunc(Function::Kind kind) {
                      "redefinition of function named '" + name.str() + "'");
 
   // External functions have no body.
-  if (kind == Function::Kind::ExtFunc)
+  if (getToken().isNot(Token::l_brace))
     return ParseSuccess;
 
   // Create the parser.
@@ -3332,13 +3324,8 @@ ParseResult ModuleParser::parseFunc(Function::Kind kind) {
 
   bool hadNamedArguments = !argNames.empty();
 
-  // CFG functions don't auto-create a block, so create one now.
-  // TODO(clattner): FIX THIS.
-  if (kind == Function::Kind::CFGFunc) {
-    auto *entry = new Block();
-    function->push_back(entry);
-    entry->addArguments(type.getInputs());
-  }
+  // Add the entry block and argument list.
+  function->addEntryBlock();
 
   // Add definitions of the function arguments.
   if (hadNamedArguments) {
@@ -3411,18 +3398,8 @@ ParseResult ModuleParser::parseModule() {
         return ParseFailure;
       break;
 
-    case Token::kw_extfunc:
-      if (parseFunc(Function::Kind::ExtFunc))
-        return ParseFailure;
-      break;
-
-    case Token::kw_cfgfunc:
-      if (parseFunc(Function::Kind::CFGFunc))
-        return ParseFailure;
-      break;
-
-    case Token::kw_mlfunc:
-      if (parseFunc(Function::Kind::MLFunc))
+    case Token::kw_func:
+      if (parseFunc())
         return ParseFailure;
       break;
     }
index 05523c1869ea6f5ecd616597e6e83985db0a0374..216442a5bd13dd661ab7308c3e3583f5b115a462 100644 (file)
@@ -89,23 +89,21 @@ TOK_OPERATOR(star,               "*")
 TOK_KEYWORD(attributes)
 TOK_KEYWORD(bf16)
 TOK_KEYWORD(ceildiv)
-TOK_KEYWORD(cfgfunc)
 TOK_KEYWORD(dense)
 TOK_KEYWORD(else)
 TOK_KEYWORD(splat)
-TOK_KEYWORD(extfunc)
 TOK_KEYWORD(f16)
 TOK_KEYWORD(f32)
 TOK_KEYWORD(f64)
 TOK_KEYWORD(false)
 TOK_KEYWORD(floordiv)
 TOK_KEYWORD(for)
+TOK_KEYWORD(func)
 TOK_KEYWORD(if)
 TOK_KEYWORD(index)
 TOK_KEYWORD(max)
 TOK_KEYWORD(memref)
 TOK_KEYWORD(min)
-TOK_KEYWORD(mlfunc)
 TOK_KEYWORD(mod)
 TOK_KEYWORD(opaque)
 TOK_KEYWORD(size)
index b2d9486996c25e843098e110b52222db3fb1fe04..0efed0a77290aa52c81bb043a3063575e488df81 100644 (file)
@@ -368,8 +368,6 @@ PassResult LowerIfAndForPass::runOnFunction(Function *function) {
     else
       lowerForInst(cast<ForInst>(inst));
 
-  // Change the kind of the function to indicate it has no If's or For's.
-  function->setKind(Function::Kind::CFGFunc);
   return success();
 }
 
index 165457cdb63b07e290b75d41c578f55078bb5985..757633024433c595ec3433c2b629078501998968 100644 (file)
 #map52 = (d0) -> (16*d0 + ((d0 + 1) * -1) + 15)
 
 // Single identity maps are removed.
-// CHECK: extfunc @f0(memref<2x4xi8, 1>)
-extfunc @f0(memref<2x4xi8, #map0, 1>)
+// CHECK: func @f0(memref<2x4xi8, 1>)
+func @f0(memref<2x4xi8, #map0, 1>)
 
 // Single identity maps are removed.
-// CHECK: extfunc @f1(memref<2x4xi8, 1>)
-extfunc @f1(memref<2x4xi8, #map1, 1>)
+// CHECK: func @f1(memref<2x4xi8, 1>)
+func @f1(memref<2x4xi8, #map1, 1>)
 
-// CHECK: extfunc @f2(memref<i8, #map{{[0-9]+}}, 1>)
-extfunc @f2(memref<i8, #map2, 1>)
+// CHECK: func @f2(memref<i8, #map{{[0-9]+}}, 1>)
+func @f2(memref<i8, #map2, 1>)
 
-// CHECK: extfunc @f3(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f3(memref<2x4xi8, #map3, 1>)
-// CHECK: extfunc @f3a(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f3a(memref<2x4xi8, #map3a, 1>)
-// CHECK: extfunc @f3b(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f3b(memref<2x4xi8, #map3b, 1>)
-// CHECK: extfunc @f3c(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f3c(memref<2x4xi8, #map3c, 1>)
-// CHECK: extfunc @f3d(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f3d(memref<2x4xi8, #map3d, 1>)
-// CHECK: extfunc @f3e(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f3e(memref<2x4xi8, #map3e, 1>)
-// CHECK: extfunc @f3f(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f3f(memref<2x4xi8, #map3f, 1>)
-// CHECK: extfunc @f3g(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f3g(memref<2x4xi8, #map3g, 1>)
-// CHECK: extfunc @f3h(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f3h(memref<2x4xi8, #map3h, 1>)
-// CHECK: extfunc @f3i(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f3i(memref<2x4xi8, #map3i, 1>)
-// CHECK: extfunc @f3j(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f3j(memref<2x4xi8, #map3j, 1>)
-// CHECK: extfunc @f3k(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f3k(memref<2x4xi8, #map3k, 1>)
-// CHECK: extfunc @f3l(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f3l(memref<2x4xi8, #map3l, 1>)
+// CHECK: func @f3(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f3(memref<2x4xi8, #map3, 1>)
+// CHECK: func @f3a(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f3a(memref<2x4xi8, #map3a, 1>)
+// CHECK: func @f3b(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f3b(memref<2x4xi8, #map3b, 1>)
+// CHECK: func @f3c(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f3c(memref<2x4xi8, #map3c, 1>)
+// CHECK: func @f3d(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f3d(memref<2x4xi8, #map3d, 1>)
+// CHECK: func @f3e(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f3e(memref<2x4xi8, #map3e, 1>)
+// CHECK: func @f3f(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f3f(memref<2x4xi8, #map3f, 1>)
+// CHECK: func @f3g(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f3g(memref<2x4xi8, #map3g, 1>)
+// CHECK: func @f3h(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f3h(memref<2x4xi8, #map3h, 1>)
+// CHECK: func @f3i(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f3i(memref<2x4xi8, #map3i, 1>)
+// CHECK: func @f3j(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f3j(memref<2x4xi8, #map3j, 1>)
+// CHECK: func @f3k(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f3k(memref<2x4xi8, #map3k, 1>)
+// CHECK: func @f3l(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f3l(memref<2x4xi8, #map3l, 1>)
 
-// CHECK: extfunc @f4(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f4(memref<2x4xi8, #map4, 1>)
+// CHECK: func @f4(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f4(memref<2x4xi8, #map4, 1>)
 
-// CHECK: extfunc @f5(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f5(memref<2x4xi8, #map5, 1>)
+// CHECK: func @f5(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f5(memref<2x4xi8, #map5, 1>)
 
-// CHECK: extfunc @f6(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f6(memref<2x4xi8, #map6, 1>)
+// CHECK: func @f6(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f6(memref<2x4xi8, #map6, 1>)
 
-// CHECK: extfunc @f7(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f7(memref<2x4xi8, #map7, 1>)
+// CHECK: func @f7(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f7(memref<2x4xi8, #map7, 1>)
 
-// CHECK: extfunc @f8(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f8(memref<2x4xi8, #map8, 1>)
+// CHECK: func @f8(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f8(memref<2x4xi8, #map8, 1>)
 
-// CHECK: extfunc @f9(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f9(memref<2x4xi8, #map9, 1>)
+// CHECK: func @f9(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f9(memref<2x4xi8, #map9, 1>)
 
-// CHECK: extfunc @f10(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f10(memref<2x4xi8, #map10, 1>)
+// CHECK: func @f10(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f10(memref<2x4xi8, #map10, 1>)
 
-// CHECK: extfunc @f11(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f11(memref<2x4xi8, #map11, 1>)
+// CHECK: func @f11(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f11(memref<2x4xi8, #map11, 1>)
 
-// CHECK: extfunc @f12(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f12(memref<2x4xi8, #map12, 1>)
+// CHECK: func @f12(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f12(memref<2x4xi8, #map12, 1>)
 
-// CHECK: extfunc @f13(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f13(memref<2x4xi8, #map13, 1>)
+// CHECK: func @f13(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f13(memref<2x4xi8, #map13, 1>)
 
-// CHECK: extfunc @f14(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f14(memref<2x4xi8, #map14, 1>)
+// CHECK: func @f14(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f14(memref<2x4xi8, #map14, 1>)
 
-// CHECK: extfunc @f15(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f15(memref<2x4xi8, #map15, 1>)
+// CHECK: func @f15(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f15(memref<2x4xi8, #map15, 1>)
 
-// CHECK: extfunc @f16(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f16(memref<2x4xi8, #map16, 1>)
+// CHECK: func @f16(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f16(memref<2x4xi8, #map16, 1>)
 
-// CHECK: extfunc @f17(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f17(memref<2x4xi8, #map17, 1>)
+// CHECK: func @f17(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f17(memref<2x4xi8, #map17, 1>)
 
-// CHECK: extfunc @f19(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f19(memref<2x4xi8, #map19, 1>)
+// CHECK: func @f19(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f19(memref<2x4xi8, #map19, 1>)
 
-// CHECK: extfunc @f20(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f20(memref<2x4xi8, #map20, 1>)
+// CHECK: func @f20(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f20(memref<2x4xi8, #map20, 1>)
 
-// CHECK: extfunc @f18(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f18(memref<2x4xi8, #map18, 1>)
+// CHECK: func @f18(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f18(memref<2x4xi8, #map18, 1>)
 
-// CHECK: extfunc @f21(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f21(memref<2x4xi8, #map21, 1>)
+// CHECK: func @f21(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f21(memref<2x4xi8, #map21, 1>)
 
-// CHECK: extfunc @f22(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f22(memref<2x4xi8, #map22, 1>)
+// CHECK: func @f22(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f22(memref<2x4xi8, #map22, 1>)
 
-// CHECK: extfunc @f23(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f23(memref<2x4xi8, #map23, 1>)
+// CHECK: func @f23(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f23(memref<2x4xi8, #map23, 1>)
 
-// CHECK: extfunc @f24(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f24(memref<2x4xi8, #map24, 1>)
+// CHECK: func @f24(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f24(memref<2x4xi8, #map24, 1>)
 
-// CHECK: extfunc @f25(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f25(memref<2x4xi8, #map25, 1>)
+// CHECK: func @f25(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f25(memref<2x4xi8, #map25, 1>)
 
-// CHECK: extfunc @f26(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f26(memref<2x4xi8, #map26, 1>)
+// CHECK: func @f26(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f26(memref<2x4xi8, #map26, 1>)
 
-// CHECK: extfunc @f29(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f29(memref<2x4xi8, #map29, 1>)
+// CHECK: func @f29(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f29(memref<2x4xi8, #map29, 1>)
 
-// CHECK: extfunc @f30(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f30(memref<2x4xi8, #map30, 1>)
+// CHECK: func @f30(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f30(memref<2x4xi8, #map30, 1>)
 
-// CHECK: extfunc @f32(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f32(memref<2x4xi8, #map32, 1>)
+// CHECK: func @f32(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f32(memref<2x4xi8, #map32, 1>)
 
-// CHECK: extfunc @f33(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f33(memref<2x4xi8, #map33, 1>)
+// CHECK: func @f33(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f33(memref<2x4xi8, #map33, 1>)
 
-// CHECK: extfunc @f34(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f34(memref<2x4xi8, #map34, 1>)
+// CHECK: func @f34(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f34(memref<2x4xi8, #map34, 1>)
 
-// CHECK: extfunc @f35(memref<2x4x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f35(memref<2x4x4xi8, #map35, 1>)
+// CHECK: func @f35(memref<2x4x4xi8, #map{{[0-9]+}}, 1>)
+func @f35(memref<2x4x4xi8, #map35, 1>)
 
-// CHECK: extfunc @f36(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f36(memref<2x4xi8, #map36, 1>)
+// CHECK: func @f36(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f36(memref<2x4xi8, #map36, 1>)
 
-// CHECK: extfunc @f37(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f37(memref<2x4xi8, #map37, 1>)
+// CHECK: func @f37(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f37(memref<2x4xi8, #map37, 1>)
 
-// CHECK: extfunc @f38(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f38(memref<2x4xi8, #map38, 1>)
+// CHECK: func @f38(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f38(memref<2x4xi8, #map38, 1>)
 
-// CHECK: extfunc @f39(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f39(memref<2x4xi8, #map39, 1>)
+// CHECK: func @f39(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f39(memref<2x4xi8, #map39, 1>)
 
-// CHECK: extfunc @f40(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f40(memref<2x4xi8, #map40, 1>)
+// CHECK: func @f40(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f40(memref<2x4xi8, #map40, 1>)
 
-// CHECK: extfunc @f41(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f41(memref<2x4xi8, #map41, 1>)
+// CHECK: func @f41(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f41(memref<2x4xi8, #map41, 1>)
 
-// CHECK: extfunc @f42(memref<2x4xi8, #map{{[0-9]+}}, 1>)
-extfunc @f42(memref<2x4xi8, #map42, 1>)
+// CHECK: func @f42(memref<2x4xi8, #map{{[0-9]+}}, 1>)
+func @f42(memref<2x4xi8, #map42, 1>)
 
-// CHECK: extfunc @f43(memref<2x4xi8, #map{{[0-9]+}}>)
-extfunc @f43(memref<2x4xi8, #map43>)
+// CHECK: func @f43(memref<2x4xi8, #map{{[0-9]+}}>)
+func @f43(memref<2x4xi8, #map43>)
 
-// CHECK: extfunc @f44(memref<2x4xi8, #map{{[0-9]+}}>)
-extfunc @f44(memref<2x4xi8, #map44>)
+// CHECK: func @f44(memref<2x4xi8, #map{{[0-9]+}}>)
+func @f44(memref<2x4xi8, #map44>)
 
-// CHECK: extfunc @f45(memref<100x100x100xi8, #map{{[0-9]+}}>)
-extfunc @f45(memref<100x100x100xi8, #map45>)
+// CHECK: func @f45(memref<100x100x100xi8, #map{{[0-9]+}}>)
+func @f45(memref<100x100x100xi8, #map45>)
 
-// CHECK: extfunc @f46(memref<100x100x100xi8, #map{{[0-9]+}}>)
-extfunc @f46(memref<100x100x100xi8, #map46>)
+// CHECK: func @f46(memref<100x100x100xi8, #map{{[0-9]+}}>)
+func @f46(memref<100x100x100xi8, #map46>)
 
-// CHECK: extfunc @f47(memref<100x100x100xi8, #map{{[0-9]+}}>)
-extfunc @f47(memref<100x100x100xi8, #map47>)
+// CHECK: func @f47(memref<100x100x100xi8, #map{{[0-9]+}}>)
+func @f47(memref<100x100x100xi8, #map47>)
 
-// CHECK: extfunc @f48(memref<100x100x100xi8, #map{{[0-9]+}}>)
-extfunc @f48(memref<100x100x100xi8, #map48>)
+// CHECK: func @f48(memref<100x100x100xi8, #map{{[0-9]+}}>)
+func @f48(memref<100x100x100xi8, #map48>)
 
-// CHECK: extfunc @f49(memref<100x100xi8, #map{{[0-9]+}}>)
-extfunc @f49(memref<100x100xi8, #map49>)
+// CHECK: func @f49(memref<100x100xi8, #map{{[0-9]+}}>)
+func @f49(memref<100x100xi8, #map49>)
 
-// CHECK: extfunc @f50(memref<100x100xi8, #map{{[0-9]+}}>)
-extfunc @f50(memref<100x100xi8, #map50>)
+// CHECK: func @f50(memref<100x100xi8, #map{{[0-9]+}}>)
+func @f50(memref<100x100xi8, #map50>)
 
-// CHECK: extfunc @f51(memref<1xi8, #map{{[0-9]+}}>)
-extfunc @f51(memref<1xi8, #map51>)
+// CHECK: func @f51(memref<1xi8, #map{{[0-9]+}}>)
+func @f51(memref<1xi8, #map51>)
 
-// CHECK: extfunc @f52(memref<1xi8, #map{{[0-9]+}}>)
-extfunc @f52(memref<1xi8, #map52>)
+// CHECK: func @f52(memref<1xi8, #map{{[0-9]+}}>)
+func @f52(memref<1xi8, #map52>)
index a8f9470edb2f6ad9932039660ce482047676e89c..27ab91074a05b293c61777bf15db050ebdddb3f8 100644 (file)
@@ -13,8 +13,8 @@
 // CHECK-DAG: #[[map_proj_d0d1_d1:map[0-9]+]] = (d0, d1) -> (d1)
 // CHECK-DAG: #[[map_proj_d0d1_d1d0:map[0-9]+]] = (d0, d1) -> (d1, d0)
 
-// CHECK-LABEL: cfgfunc @cfgfunc_with_ops(%arg0: f32) {
-cfgfunc @cfgfunc_with_ops(f32) {
+// CHECK-LABEL: func @func_with_ops(%arg0: f32) {
+func @func_with_ops(f32) {
 ^bb0(%a : f32):
   // CHECK: %0 = "getTensor"() : () -> tensor<4x4x?xf32>
   %t = "getTensor"() : () -> tensor<4x4x?xf32>
@@ -29,8 +29,8 @@ cfgfunc @cfgfunc_with_ops(f32) {
   return
 }
 
-// CHECK-LABEL: cfgfunc @standard_instrs(%arg0: tensor<4x4x?xf32>, %arg1: f32, %arg2: i32, %arg3: index) {
-cfgfunc @standard_instrs(tensor<4x4x?xf32>, f32, i32, index) {
+// CHECK-LABEL: func @standard_instrs(%arg0: tensor<4x4x?xf32>, %arg1: f32, %arg2: i32, %arg3: index) {
+func @standard_instrs(tensor<4x4x?xf32>, f32, i32, index) {
 ^bb42(%t: tensor<4x4x?xf32>, %f: f32, %i: i32, %idx : index):
   // CHECK: %0 = dim %arg0, 2 : tensor<4x4x?xf32>
   %a = "dim"(%t){index: 2} : (tensor<4x4x?xf32>) -> index
@@ -86,8 +86,8 @@ cfgfunc @standard_instrs(tensor<4x4x?xf32>, f32, i32, index) {
   // CHECK: %cst = constant 4.300000e+01 : bf16
   %9 = constant 43.0 : bf16
 
-  // CHECK: %f = constant @cfgfunc_with_ops : (f32) -> ()
-  %10 = constant @cfgfunc_with_ops : (f32) -> ()
+  // CHECK: %f = constant @func_with_ops : (f32) -> ()
+  %10 = constant @func_with_ops : (f32) -> ()
 
   // CHECK: %f_1 = constant @affine_apply : () -> ()
   %11 = constant @affine_apply : () -> ()
@@ -144,8 +144,8 @@ cfgfunc @standard_instrs(tensor<4x4x?xf32>, f32, i32, index) {
   return
 }
 
-// CHECK-LABEL: cfgfunc @affine_apply() {
-cfgfunc @affine_apply() {
+// CHECK-LABEL: func @affine_apply() {
+func @affine_apply() {
   %i = "constant"() {value: 0: index} : () -> index
   %j = "constant"() {value: 1: index} : () -> index
 
@@ -166,8 +166,8 @@ cfgfunc @affine_apply() {
   return
 }
 
-// CHECK-LABEL: cfgfunc @load_store
-cfgfunc @load_store(memref<4x4xi32>, index) {
+// CHECK-LABEL: func @load_store
+func @load_store(memref<4x4xi32>, index) {
 ^bb0(%0: memref<4x4xi32>, %1: index):
   // CHECK: %0 = load %arg0[%arg1, %arg1] : memref<4x4xi32>
   %2 = "load"(%0, %1, %1) : (memref<4x4xi32>, index, index)->i32
@@ -178,14 +178,14 @@ cfgfunc @load_store(memref<4x4xi32>, index) {
   return
 }
 
-// CHECK-LABEL: mlfunc @return_op(%arg0: i32) -> i32 {
-mlfunc @return_op(%a : i32) -> i32 {
+// CHECK-LABEL: func @return_op(%arg0: i32) -> i32 {
+func @return_op(%a : i32) -> i32 {
   // CHECK: return %arg0 : i32
   "return" (%a) : (i32)->()
 }
 
-// CHECK-LABEL: mlfunc @calls(%arg0: i32) {
-mlfunc @calls(%arg0: i32) {
+// CHECK-LABEL: func @calls(%arg0: i32) {
+func @calls(%arg0: i32) {
   // CHECK: %0 = call @return_op(%arg0) : (i32) -> i32
   %x = call @return_op(%arg0) : (i32) -> i32
   // CHECK: %1 = call @return_op(%0) : (i32) -> i32
@@ -211,8 +211,8 @@ mlfunc @calls(%arg0: i32) {
   return
 }
 
-// CHECK-LABEL: mlfunc @extract_element(%arg0: tensor<*xi32>, %arg1: tensor<4x4xf32>) -> i32 {
-mlfunc @extract_element(%arg0: tensor<*xi32>, %arg1 : tensor<4x4xf32>) -> i32 {
+// CHECK-LABEL: func @extract_element(%arg0: tensor<*xi32>, %arg1: tensor<4x4xf32>) -> i32 {
+func @extract_element(%arg0: tensor<*xi32>, %arg1 : tensor<4x4xf32>) -> i32 {
   %c0 = "constant"() {value: 0: index} : () -> index
 
   // CHECK: %0 = extract_element %arg0[%c0, %c0, %c0, %c0] : tensor<*xi32>
@@ -224,8 +224,8 @@ mlfunc @extract_element(%arg0: tensor<*xi32>, %arg1 : tensor<4x4xf32>) -> i32 {
   return %0 : i32
 }
 
-// CHECK-LABEL: mlfunc @tensor_cast(%arg0
-mlfunc @tensor_cast(%arg0: tensor<*xf32>, %arg1 : tensor<4x4xf32>, %arg2: tensor<?x?xf32>) {
+// CHECK-LABEL: func @tensor_cast(%arg0
+func @tensor_cast(%arg0: tensor<*xf32>, %arg1 : tensor<4x4xf32>, %arg2: tensor<?x?xf32>) {
   // CHECK: %0 = tensor_cast %arg0 : tensor<*xf32> to tensor<?x?xf32>
   %0 = tensor_cast %arg0 : tensor<*xf32> to tensor<?x?xf32>
 
@@ -241,8 +241,8 @@ mlfunc @tensor_cast(%arg0: tensor<*xf32>, %arg1 : tensor<4x4xf32>, %arg2: tensor
   return
 }
 
-// CHECK-LABEL: mlfunc @memref_cast(%arg0
-mlfunc @memref_cast(%arg0: memref<4xf32>, %arg1 : memref<?xf32>) {
+// CHECK-LABEL: func @memref_cast(%arg0
+func @memref_cast(%arg0: memref<4xf32>, %arg1 : memref<?xf32>) {
   // CHECK: %0 = memref_cast %arg0 : memref<4xf32> to memref<?xf32>
   %0 = memref_cast %arg0 : memref<4xf32> to memref<?xf32>
 
@@ -251,8 +251,8 @@ mlfunc @memref_cast(%arg0: memref<4xf32>, %arg1 : memref<?xf32>) {
   return
 }
 
-// CHECK-LABEL: mlfunc @test_dimop(%arg0
-mlfunc @test_dimop(%arg0: tensor<4x4x?xf32>) {
+// CHECK-LABEL: func @test_dimop(%arg0
+func @test_dimop(%arg0: tensor<4x4x?xf32>) {
   // CHECK: %0 = dim %arg0, 2 : tensor<4x4x?xf32>
   %0 = dim %arg0, 2 : tensor<4x4x?xf32>
   // use dim as an affine_int to ensure type correctness
@@ -261,8 +261,8 @@ mlfunc @test_dimop(%arg0: tensor<4x4x?xf32>) {
 }
 
 
-// CHECK-LABEL: mlfunc @test_vector_transfer_ops(%arg0
-mlfunc @test_vector_transfer_ops(%arg0: memref<?x?xf32>) {
+// CHECK-LABEL: func @test_vector_transfer_ops(%arg0
+func @test_vector_transfer_ops(%arg0: memref<?x?xf32>) {
   %c3 = constant 3 : index
   %cst = constant 3.0 : f32
   // CHECK: %0 = vector_transfer_read %arg0, %c3, %c3 {permutation_map: #[[map_proj_d0d1_d0]]} : (memref<?x?xf32>, index, index) -> vector<128xf32>
index 17788b5f2238a14b894c123c083b3503a615758e..fbed9a7b718c9b087dab5f4bcabb2e2d095f38c6 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: mlir-opt %s -split-input-file -verify
 
-cfgfunc @dim(tensor<1xf32>) {
+func @dim(tensor<1xf32>) {
 ^bb(%0: tensor<1xf32>):
   "dim"(%0){index: "xyz"} : (tensor<1xf32>)->i32 // expected-error {{'dim' op requires an integer attribute named 'index'}}
   return
@@ -8,7 +8,7 @@ cfgfunc @dim(tensor<1xf32>) {
 
 // -----
 
-cfgfunc @dim2(tensor<1xf32>) {
+func @dim2(tensor<1xf32>) {
 ^bb(%0: tensor<1xf32>):
   "dim"(){index: "xyz"} : ()->i32 // expected-error {{'dim' op requires a single operand}}
   return
@@ -16,7 +16,7 @@ cfgfunc @dim2(tensor<1xf32>) {
 
 // -----
 
-cfgfunc @dim3(tensor<1xf32>) {
+func @dim3(tensor<1xf32>) {
 ^bb(%0: tensor<1xf32>):
   "dim"(%0){index: 1} : (tensor<1xf32>)->i32 // expected-error {{'dim' op index is out of range}}
   return
@@ -24,7 +24,7 @@ cfgfunc @dim3(tensor<1xf32>) {
 
 // -----
 
-cfgfunc @constant() {
+func @constant() {
 ^bb:
   %x = "constant"(){value: "xyz"} : () -> i32 // expected-error {{'constant' op requires 'value' to be an integer for an integer result type}}
   return
@@ -32,7 +32,7 @@ cfgfunc @constant() {
 
 // -----
 
-cfgfunc @constant_out_of_range() {
+func @constant_out_of_range() {
 ^bb:
   %x = "constant"(){value: 100} : () -> i1 // expected-error {{'constant' op requires 'value' to be an integer within the range of the integer result type}}
   return
@@ -40,7 +40,7 @@ cfgfunc @constant_out_of_range() {
 
 // -----
 
-cfgfunc @affine_apply_no_map() {
+func @affine_apply_no_map() {
 ^bb0:
   %i = "constant"() {value: 0} : () -> index
   %x = "affine_apply" (%i) { } : (index) -> (index) //  expected-error {{'affine_apply' op requires an affine map}}
@@ -49,7 +49,7 @@ cfgfunc @affine_apply_no_map() {
 
 // -----
 
-cfgfunc @affine_apply_wrong_operand_count() {
+func @affine_apply_wrong_operand_count() {
 ^bb0:
   %i = "constant"() {value: 0} : () -> index
   %x = "affine_apply" (%i) {map: (d0, d1) -> ((d0 + 1), (d1 + 2))} : (index) -> (index) //  expected-error {{'affine_apply' op operand count and affine map dimension and symbol count must match}}
@@ -58,7 +58,7 @@ cfgfunc @affine_apply_wrong_operand_count() {
 
 // -----
 
-cfgfunc @affine_apply_wrong_result_count() {
+func @affine_apply_wrong_result_count() {
 ^bb0:
   %i = "constant"() {value: 0} : () -> index
   %j = "constant"() {value: 1} : () -> index
@@ -68,7 +68,7 @@ cfgfunc @affine_apply_wrong_result_count() {
 
 // -----
 
-cfgfunc @unknown_custom_op() {
+func @unknown_custom_op() {
 ^bb0:
   %i = crazyThing() {value: 0} : () -> index  // expected-error {{custom op 'crazyThing' is unknown}}
   return
@@ -76,7 +76,7 @@ cfgfunc @unknown_custom_op() {
 
 // -----
 
-cfgfunc @bad_alloc_wrong_dynamic_dim_count() {
+func @bad_alloc_wrong_dynamic_dim_count() {
 ^bb0:
   %0 = "constant"() {value: 7} : () -> index
   // Test alloc with wrong number of dynamic dimensions.
@@ -86,7 +86,7 @@ cfgfunc @bad_alloc_wrong_dynamic_dim_count() {
 
 // -----
 
-cfgfunc @bad_alloc_wrong_symbol_count() {
+func @bad_alloc_wrong_symbol_count() {
 ^bb0:
   %0 = "constant"() {value: 7} : () -> index
   // Test alloc with wrong number of symbols
@@ -96,7 +96,7 @@ cfgfunc @bad_alloc_wrong_symbol_count() {
 
 // -----
 
-cfgfunc @test_store_zero_results() {
+func @test_store_zero_results() {
 ^bb0:
   %0 = alloc() : memref<1024x64xf32, (d0, d1) -> (d0, d1), 1>
   %1 = "constant"() {value: 0} : () -> index
@@ -109,14 +109,14 @@ cfgfunc @test_store_zero_results() {
 
 // -----
 
-mlfunc @test_store_zero_results2(%x: i32, %p: memref<i32>) {
+func @test_store_zero_results2(%x: i32, %p: memref<i32>) {
   "store"(%x,%p) : (i32, memref<i32>) -> i32  // expected-error {{'store' op requires zero results}}
   return
 }
 
 // -----
 
-cfgfunc @test_alloc_memref_map_rank_mismatch() {
+func @test_alloc_memref_map_rank_mismatch() {
 ^bb0:
   %0 = alloc() : memref<1024x64xf32, (d0) -> (d0), 1> // expected-error {{memref affine map dimension mismatch}}
   return
@@ -124,7 +124,7 @@ cfgfunc @test_alloc_memref_map_rank_mismatch() {
 
 // -----
 
-cfgfunc @intlimit2() {
+func @intlimit2() {
 ^bb:
   %0 = "constant"() {value: 0} : () -> i4096
   %1 = "constant"() {value: 1} : () -> i4097 // expected-error {{integer bitwidth is limited to 4096 bits}}
@@ -133,42 +133,42 @@ cfgfunc @intlimit2() {
 
 // -----
 
-mlfunc @mlfunc_constant() {
+func @func_constant() {
   %x = "constant"(){value: "xyz"} : () -> i32 // expected-error {{'constant' op requires 'value' to be an integer for an integer result type}}
   return
 }
 
 // -----
 
-mlfunc @mlfunc_constant_out_of_range() {
+func @func_constant_out_of_range() {
   %x = "constant"(){value: 100} : () -> i1 // expected-error {{'constant' op requires 'value' to be an integer within the range of the integer result type}}
   return
 }
 
 // -----
 
-mlfunc @calls(%arg0: i32) {
+func @calls(%arg0: i32) {
   %x = call @calls() : () -> i32  // expected-error {{reference to function with mismatched type}}
   return
 }
 
 // -----
 
-cfgfunc @cfgfunc_with_ops(f32) {
+func @func_with_ops(f32) {
 ^bb0(%a : f32):
   %sf = addf %a, %a, %a : f32  // expected-error {{custom op 'addf' expected 2 operands}}
 }
 
 // -----
 
-cfgfunc @cfgfunc_with_ops(f32) {
+func @func_with_ops(f32) {
 ^bb0(%a : f32):
   %sf = addf(%a, %a) : f32  // expected-error {{unexpected delimiter}}
 }
 
 // -----
 
-cfgfunc @cfgfunc_with_ops(f32) {
+func @func_with_ops(f32) {
 ^bb0(%a : f32):
   %sf = addf{%a, %a} : f32  // expected-error {{invalid operand}}
 }
@@ -176,14 +176,14 @@ cfgfunc @cfgfunc_with_ops(f32) {
 
 // -----
 
-cfgfunc @cfgfunc_with_ops(i32) {
+func @func_with_ops(i32) {
 ^bb0(%a : i32):
   %sf = addf %a, %a : i32  // expected-error {{'addf' op requires a floating point type}}
 }
 
 // -----
 
-cfgfunc @cfgfunc_with_ops(i32) {
+func @func_with_ops(i32) {
 ^bb0(%a : i32):
   // expected-error@+1 {{'predicate' attribute value out of range}}
   %r = "cmpi"(%a, %b) {predicate: 42} : (i32, i32) -> i1
@@ -192,7 +192,7 @@ cfgfunc @cfgfunc_with_ops(i32) {
 // -----
 
 // Comparison are defined for arguments of the same type.
-cfgfunc @cfgfunc_with_ops(i32, i64) {
+func @func_with_ops(i32, i64) {
 ^bb0(%a : i32, %b : i64): // expected-error {{prior use here}}
   %r = cmpi "eq", %a, %b : i32 // expected-error {{use of value '%b' expects different type than prior uses}}
 }
@@ -200,7 +200,7 @@ cfgfunc @cfgfunc_with_ops(i32, i64) {
 // -----
 
 // Comparisons must have the "predicate" attribute.
-cfgfunc @cfgfunc_with_ops(i32, i32) {
+func @func_with_ops(i32, i32) {
 ^bb0(%a : i32, %b : i32):
   %r = cmpi %a, %b : i32 // expected-error {{expected type}}
 }
@@ -208,7 +208,7 @@ cfgfunc @cfgfunc_with_ops(i32, i32) {
 // -----
 
 // Integer comparisons are not recognized for float types.
-cfgfunc @cfgfunc_with_ops(f32, f32) {
+func @func_with_ops(f32, f32) {
 ^bb0(%a : f32, %b : f32):
   %r = cmpi "eq", %a, %b : f32 // expected-error {{op requires an integer or index type}}
 }
@@ -216,14 +216,14 @@ cfgfunc @cfgfunc_with_ops(f32, f32) {
 // -----
 
 // Result type must be boolean like.
-cfgfunc @cfgfunc_with_ops(i32, i32) {
+func @func_with_ops(i32, i32) {
 ^bb0(%a : i32, %b : i32):
   %r = "cmpi"(%a, %b) {predicate: 0} : (i32, i32) -> i32 // expected-error {{op requires a bool result type}}
 }
 
 // -----
 
-cfgfunc @cfgfunc_with_ops(i32, i32) {
+func @func_with_ops(i32, i32) {
 ^bb0(%a : i32, %b : i32):
   // expected-error@+1 {{requires an integer attribute named 'predicate'}}
   %r = "cmpi"(%a, %b) {foo: 1} : (i32, i32) -> i1
@@ -231,7 +231,7 @@ cfgfunc @cfgfunc_with_ops(i32, i32) {
 
 // -----
 
-cfgfunc @cfgfunc_with_ops() {
+func @func_with_ops() {
 ^bb0:
   %c = constant splat<vector<42 x i32>, 0> : vector<42 x i32>
   // expected-error@+1 {{op requires the same shape for all operands and results}}
@@ -240,7 +240,7 @@ cfgfunc @cfgfunc_with_ops() {
 
 // -----
 
-cfgfunc @cfgfunc_with_ops(i32, i32, i32) {
+func @func_with_ops(i32, i32, i32) {
 ^bb0(%cond : i32, %t : i32, %f : i32):
   // expected-error@+2 {{different type than prior uses}}
   // expected-error@-2 {{prior use here}}
@@ -249,7 +249,7 @@ cfgfunc @cfgfunc_with_ops(i32, i32, i32) {
 
 // -----
 
-cfgfunc @cfgfunc_with_ops(i32, i32, i32) {
+func @func_with_ops(i32, i32, i32) {
 ^bb0(%cond : i32, %t : i32, %f : i32):
   // expected-error@+1 {{elemental type i1}}
   %r = "select"(%cond, %t, %f) : (i32, i32, i32) -> i32
@@ -257,7 +257,7 @@ cfgfunc @cfgfunc_with_ops(i32, i32, i32) {
 
 // -----
 
-cfgfunc @cfgfunc_with_ops(i1, i32, i64) {
+func @func_with_ops(i1, i32, i64) {
 ^bb0(%cond : i1, %t : i32, %f : i64):
   // expected-error@+1 {{'true' and 'false' arguments to be of the same type}}
   %r = "select"(%cond, %t, %f) : (i1, i32, i64) -> i32
@@ -265,7 +265,7 @@ cfgfunc @cfgfunc_with_ops(i1, i32, i64) {
 
 // -----
 
-cfgfunc @cfgfunc_with_ops(i1, vector<42xi32>, vector<42xi32>) {
+func @func_with_ops(i1, vector<42xi32>, vector<42xi32>) {
 ^bb0(%cond : i1, %t : vector<42xi32>, %f : vector<42xi32>):
   // expected-error@+1 {{requires the condition to have the same shape as arguments}}
   %r = "select"(%cond, %t, %f) : (i1, vector<42xi32>, vector<42xi32>) -> vector<42xi32>
@@ -273,7 +273,7 @@ cfgfunc @cfgfunc_with_ops(i1, vector<42xi32>, vector<42xi32>) {
 
 // -----
 
-cfgfunc @cfgfunc_with_ops(i1, tensor<42xi32>, tensor<?xi32>) {
+func @func_with_ops(i1, tensor<42xi32>, tensor<?xi32>) {
 ^bb0(%cond : i1, %t : tensor<42xi32>, %f : tensor<?xi32>):
   // expected-error@+1 {{'true' and 'false' arguments to be of the same type}}
   %r = "select"(%cond, %t, %f) : (i1, tensor<42xi32>, tensor<?xi32>) -> tensor<42xi32>
@@ -281,7 +281,7 @@ cfgfunc @cfgfunc_with_ops(i1, tensor<42xi32>, tensor<?xi32>) {
 
 // -----
 
-cfgfunc @cfgfunc_with_ops(tensor<?xi1>, tensor<42xi32>, tensor<42xi32>) {
+func @func_with_ops(tensor<?xi1>, tensor<42xi32>, tensor<42xi32>) {
 ^bb0(%cond : tensor<?xi1>, %t : tensor<42xi32>, %f : tensor<42xi32>):
   // expected-error@+1 {{requires the condition to have the same shape as arguments}}
   %r = "select"(%cond, %t, %f) : (tensor<?xi1>, tensor<42xi32>, tensor<42xi32>) -> tensor<42xi32>
@@ -289,7 +289,7 @@ cfgfunc @cfgfunc_with_ops(tensor<?xi1>, tensor<42xi32>, tensor<42xi32>) {
 
 // -----
 
-cfgfunc @test_vector_transfer_read(memref<?x?xf32>) {
+func @test_vector_transfer_read(memref<?x?xf32>) {
 ^bb0(%arg0: memref<?x?xf32>):
   %c3 = constant 3 : index
   %cst = constant 3.0 : f32
@@ -299,7 +299,7 @@ cfgfunc @test_vector_transfer_read(memref<?x?xf32>) {
 
 // -----
 
-cfgfunc @test_vector_transfer_read(memref<?x?xf32>) {
+func @test_vector_transfer_read(memref<?x?xf32>) {
 ^bb0(%arg0: memref<?x?xf32>):
   %c3 = constant 3 : index
   %cst = constant 3.0 : f32
@@ -309,7 +309,7 @@ cfgfunc @test_vector_transfer_read(memref<?x?xf32>) {
 
 // -----
 
-cfgfunc @test_vector_transfer_read(memref<?x?xf32>) {
+func @test_vector_transfer_read(memref<?x?xf32>) {
 ^bb0(%arg0: memref<?x?xf32>):
   %c3 = constant 3 : index
   %cst = constant 3.0 : f32
@@ -319,7 +319,7 @@ cfgfunc @test_vector_transfer_read(memref<?x?xf32>) {
 
 // -----
 
-cfgfunc @test_vector_transfer_read(memref<?x?xf32>) {
+func @test_vector_transfer_read(memref<?x?xf32>) {
 ^bb0(%arg0: memref<?x?xf32>):
   %c3 = constant 3 : index
   %cst = constant 3.0 : f32
@@ -329,7 +329,7 @@ cfgfunc @test_vector_transfer_read(memref<?x?xf32>) {
 
 // -----
 
-cfgfunc @test_vector_transfer_read(memref<?x?xf32>) {
+func @test_vector_transfer_read(memref<?x?xf32>) {
 ^bb0(%arg0: memref<?x?xf32>):
   %c3 = constant 3 : index
   %cst = constant 3.0 : f32
@@ -339,7 +339,7 @@ cfgfunc @test_vector_transfer_read(memref<?x?xf32>) {
 
 // -----
 
-cfgfunc @test_vector_transfer_read(memref<?x?xf32>) {
+func @test_vector_transfer_read(memref<?x?xf32>) {
 ^bb0(%arg0: memref<?x?xf32>):
   %c3 = constant 3 : index
   %cst = constant 3.0 : f32
@@ -349,7 +349,7 @@ cfgfunc @test_vector_transfer_read(memref<?x?xf32>) {
 
 // -----
 
-cfgfunc @test_vector_transfer_read(memref<?x?xf32>) {
+func @test_vector_transfer_read(memref<?x?xf32>) {
 ^bb0(%arg0: memref<?x?xf32>):
   %c3 = constant 3 : index
   %cst = constant 3.0 : f32
@@ -359,7 +359,7 @@ cfgfunc @test_vector_transfer_read(memref<?x?xf32>) {
 
 // -----
 
-cfgfunc @test_vector_transfer_read(memref<?x?xf32>) {
+func @test_vector_transfer_read(memref<?x?xf32>) {
 ^bb0(%arg0: memref<?x?xf32>):
   %c3 = constant 3 : index
   %cst = constant 3.0 : f32
@@ -368,7 +368,7 @@ cfgfunc @test_vector_transfer_read(memref<?x?xf32>) {
 }
 // -----
 
-cfgfunc @test_vector_transfer_read(memref<?x?x?xf32>) {
+func @test_vector_transfer_read(memref<?x?x?xf32>) {
 ^bb0(%arg0: memref<?x?x?xf32>):
   %c3 = constant 3 : index
   %cst = constant 3.0 : f32
@@ -378,7 +378,7 @@ cfgfunc @test_vector_transfer_read(memref<?x?x?xf32>) {
 
 // -----
 
-cfgfunc @test_vector_transfer_write(memref<?x?xf32>) {
+func @test_vector_transfer_write(memref<?x?xf32>) {
 ^bb0(%arg0: memref<?x?xf32>):
   %c3 = constant 3 : index
   %cst = constant splat<vector<128 x f32>, 3.0>  : vector<128 x f32>
@@ -388,7 +388,7 @@ cfgfunc @test_vector_transfer_write(memref<?x?xf32>) {
 
 // -----
 
-cfgfunc @test_vector_transfer_write(memref<?x?xf32>) {
+func @test_vector_transfer_write(memref<?x?xf32>) {
 ^bb0(%arg0: memref<?x?xf32>):
   %c3 = constant 3 : index
   %cst = constant splat<vector<128 x f32>, 3.0>  : vector<128 x f32>
@@ -398,7 +398,7 @@ cfgfunc @test_vector_transfer_write(memref<?x?xf32>) {
 
 // -----
 
-cfgfunc @test_vector_transfer_write(memref<?x?xf32>) {
+func @test_vector_transfer_write(memref<?x?xf32>) {
 ^bb0(%arg0: memref<?x?xf32>):
   %c3 = constant 3 : index
   %cst = constant splat<vector<128 x f32>, 3.0>  : vector<128 x f32>
@@ -408,7 +408,7 @@ cfgfunc @test_vector_transfer_write(memref<?x?xf32>) {
 
 // -----
 
-cfgfunc @test_vector_transfer_write(memref<?x?xf32>) {
+func @test_vector_transfer_write(memref<?x?xf32>) {
 ^bb0(%arg0: memref<?x?xf32>):
   %c3 = constant 3 : index
   %cst = constant splat<vector<128 x f32>, 3.0>  : vector<128 x f32>
@@ -418,7 +418,7 @@ cfgfunc @test_vector_transfer_write(memref<?x?xf32>) {
 
 // -----
 
-cfgfunc @test_vector_transfer_write(memref<?x?xf32>) {
+func @test_vector_transfer_write(memref<?x?xf32>) {
 ^bb0(%arg0: memref<?x?xf32>):
   %c3 = constant 3 : index
   %cst = constant splat<vector<128 x f32>, 3.0>  : vector<128 x f32>
@@ -428,7 +428,7 @@ cfgfunc @test_vector_transfer_write(memref<?x?xf32>) {
 
 // -----
 
-cfgfunc @test_vector_transfer_write(memref<?x?xf32>) {
+func @test_vector_transfer_write(memref<?x?xf32>) {
 ^bb0(%arg0: memref<?x?xf32>):
   %c3 = constant 3 : index
   %cst = constant splat<vector<128 x f32>, 3.0>  : vector<128 x f32>
@@ -438,7 +438,7 @@ cfgfunc @test_vector_transfer_write(memref<?x?xf32>) {
 
 // -----
 
-cfgfunc @test_vector_transfer_write(memref<?x?xf32>) {
+func @test_vector_transfer_write(memref<?x?xf32>) {
 ^bb0(%arg0: memref<?x?xf32>):
   %c3 = constant 3 : index
   %cst = constant splat<vector<128 x f32>, 3.0>  : vector<128 x f32>
@@ -448,7 +448,7 @@ cfgfunc @test_vector_transfer_write(memref<?x?xf32>) {
 
 // -----
 
-cfgfunc @test_vector_transfer_write(memref<?x?xf32>) {
+func @test_vector_transfer_write(memref<?x?xf32>) {
 ^bb0(%arg0: memref<?x?xf32>):
   %c3 = constant 3 : index
   %cst = constant splat<vector<128 x f32>, 3.0>  : vector<128 x f32>
@@ -457,7 +457,7 @@ cfgfunc @test_vector_transfer_write(memref<?x?xf32>) {
 }
 // -----
 
-cfgfunc @test_vector_transfer_write(memref<?x?x?xf32>) {
+func @test_vector_transfer_write(memref<?x?x?xf32>) {
 ^bb0(%arg0: memref<?x?x?xf32>):
   %c3 = constant 3 : index
   %cst = constant splat<vector<3 x 7 x f32>, 3.0>  : vector<3 x 7 x f32>
index 3c3047ff199df3f4428fb03b5f61b36268250517..f3fea9fe54d4ada5618d77e20d5aa039e88d750e 100644 (file)
@@ -3,97 +3,92 @@
 // Check different error cases.
 // -----
 
-extfunc @illegaltype(i) // expected-error {{expected type}}
+func @illegaltype(i) // expected-error {{expected type}}
 
 // -----
 
-mlfunc @illegaltype() {
+func @illegaltype() {
   %0 = constant splat<<vector 4 x f32>, 0> : vector<4 x f32> // expected-error {{expected type}}
 }
 
 // -----
 
-extfunc @nestedtensor(tensor<tensor<i8>>) -> () // expected-error {{invalid tensor element type}}
+func @nestedtensor(tensor<tensor<i8>>) -> () // expected-error {{invalid tensor element type}}
 
 // -----
 
-extfunc @indexvector(vector<4 x index>) -> () // expected-error {{vector elements must be int or float type}}
+func @indexvector(vector<4 x index>) -> () // expected-error {{vector elements must be int or float type}}
 
 // -----
 
-extfunc @indexmemref(memref<? x index>) -> () // expected-error {{invalid memref element type}}
+func @indexmemref(memref<? x index>) -> () // expected-error {{invalid memref element type}}
 
 // -----
 
-extfunc @indextensor(tensor<4 x index>) -> () // expected-error {{invalid tensor element type}}
+func @indextensor(tensor<4 x index>) -> () // expected-error {{invalid tensor element type}}
 
 // -----
 // Test no map in memref type.
-extfunc @memrefs(memref<2x4xi8, >) // expected-error {{expected list element}}
+func @memrefs(memref<2x4xi8, >) // expected-error {{expected list element}}
 
 // -----
 // Test non-existent map in memref type.
-extfunc @memrefs(memref<2x4xi8, #map7>) // expected-error {{undefined affine map id 'map7'}}
+func @memrefs(memref<2x4xi8, #map7>) // expected-error {{undefined affine map id 'map7'}}
 
 // -----
 // Test non hash identifier in memref type.
-extfunc @memrefs(memref<2x4xi8, %map7>) // expected-error {{expected '(' at start of dimensional identifiers list}}
+func @memrefs(memref<2x4xi8, %map7>) // expected-error {{expected '(' at start of dimensional identifiers list}}
 
 // -----
 // Test non-existent map in map composition of memref type.
 #map0 = (d0, d1) -> (d0, d1)
 
-extfunc @memrefs(memref<2x4xi8, #map0, #map8>) // expected-error {{undefined affine map id 'map8'}}
+func @memrefs(memref<2x4xi8, #map0, #map8>) // expected-error {{undefined affine map id 'map8'}}
 
 // -----
 // Test multiple memory space error.
 #map0 = (d0, d1) -> (d0, d1)
-extfunc @memrefs(memref<2x4xi8, #map0, 1, 2>) // expected-error {{multiple memory spaces specified in memref type}}
+func @memrefs(memref<2x4xi8, #map0, 1, 2>) // expected-error {{multiple memory spaces specified in memref type}}
 
 // -----
 // Test affine map after memory space.
 #map0 = (d0, d1) -> (d0, d1)
 #map1 = (d0, d1) -> (d0, d1)
 
-extfunc @memrefs(memref<2x4xi8, #map0, 1, #map1>) // expected-error {{affine map after memory space in memref type}}
+func @memrefs(memref<2x4xi8, #map0, 1, #map1>) // expected-error {{affine map after memory space in memref type}}
 
 // -----
 // Test dimension mismatch between memref and layout map.
 // The error must be emitted even for the trivial identity layout maps that are
 // dropped in type creation.
 #map0 = (d0, d1) -> (d0, d1)
-extfunc @memrefs(memref<42xi8, #map0>) // expected-error {{memref affine map dimension mismatch}}
+func @memrefs(memref<42xi8, #map0>) // expected-error {{memref affine map dimension mismatch}}
 
 // -----
 
 #map0 = (d0, d1) -> (d0, d1)
 #map1 = (d0) -> (d0)
-extfunc @memrefs(memref<42x42xi8, #map0, #map1>) // expected-error {{memref affine map dimension mismatch}}
+func @memrefs(memref<42x42xi8, #map0, #map1>) // expected-error {{memref affine map dimension mismatch}}
 
 // -----
 
-extfunc @illegalattrs() -> () attributes { key } // expected-error {{expected ':' in attribute list}}
+func @illegalattrs() -> () attributes { key } // expected-error {{expected ':' in attribute list}}
 
 // -----
 
-cfgfunc @foo()
-cfgfunc @bar() // expected-error {{expected '{' in function}}
-
-// -----
-
-extfunc missingsigil() -> (i1, index, f32) // expected-error {{expected a function identifier like}}
+func missingsigil() -> (i1, index, f32) // expected-error {{expected a function identifier like}}
 
 
 // -----
 
-cfgfunc @bad_branch() {
+func @bad_branch() {
 ^bb12:
   br ^missing  // expected-error {{reference to an undefined block}}
 }
 
 // -----
 
-cfgfunc @block_redef() {
+func @block_redef() {
 ^bb42:
   return
 ^bb42:        // expected-error {{redefinition of block '^bb42'}}
@@ -102,7 +97,7 @@ cfgfunc @block_redef() {
 
 // -----
 
-cfgfunc @no_terminator() {   // expected-error {{block with no terminator}}
+func @no_terminator() {   // expected-error {{block with no terminator}}
 ^bb40:
   return
 ^bb41:
@@ -112,28 +107,28 @@ cfgfunc @no_terminator() {   // expected-error {{block with no terminator}}
 
 // -----
 
-cfgfunc @block_no_rparen() {
+func @block_no_rparen() {
 ^bb42 (%bb42 : i32: // expected-error {{expected ')' to end argument list}}
   return
 }
 
 // -----
 
-cfgfunc @block_arg_no_ssaid() {
+func @block_arg_no_ssaid() {
 ^bb42 (i32): // expected-error {{expected SSA operand}}
   return
 }
 
 // -----
 
-cfgfunc @block_arg_no_type() {
+func @block_arg_no_type() {
 ^bb42 (%0): // expected-error {{expected ':' and type for SSA operand}}
   return
 }
 
 // -----
 
-cfgfunc @block_arg_no_close_paren() {
+func @block_arg_no_close_paren() {
 ^bb42:
   br ^bb2( // expected-error@+1 {{expected ')' to close argument list}}
   return
@@ -141,7 +136,7 @@ cfgfunc @block_arg_no_close_paren() {
 
 // -----
 
-cfgfunc @block_first_has_predecessor() {
+func @block_first_has_predecessor() {
 // expected-error@-1 {{entry block of function may not have predecessors}}
 ^bb42:
   br ^bb43
@@ -151,7 +146,7 @@ cfgfunc @block_first_has_predecessor() {
 
 // -----
 
-cfgfunc @illegalattrs() -> ()
+func @illegalattrs() -> ()
   attributes { key } { // expected-error {{expected ':' in attribute list}}
 ^bb42:
   return
@@ -159,17 +154,12 @@ cfgfunc @illegalattrs() -> ()
 
 // -----
 
-mlfunc @foo()
-mlfunc @bar() // expected-error {{expected '{' in function}}
-
-// -----
-
-mlfunc @empty() {
+func @empty() {
 } // expected-error {{function must have a body}}
 
 // -----
 
-mlfunc @illegalattrs() -> ()
+func @illegalattrs() -> ()
   attributes { key } { // expected-error {{expected ':' in attribute list}}
 ^bb42:
   return
@@ -177,7 +167,7 @@ mlfunc @illegalattrs() -> ()
 
 // -----
 
-mlfunc @no_return() {
+func @no_return() {
   "foo"() : () -> ()  // expected-error {{block with no terminator}}
 }
 
@@ -192,14 +182,14 @@ mlfunc @no_return() {
 
 // -----
 
-cfgfunc @bad_op_type() {
+func @bad_op_type() {
 ^bb40:
   "foo"() : i32  // expected-error {{expected function type}}
   return
 }
 // -----
 
-cfgfunc @no_terminator() {
+func @no_terminator() {
 ^bb40:
   "foo"() : ()->()
   ""() : ()->()  // expected-error {{empty operation name is invalid}}
@@ -208,51 +198,51 @@ cfgfunc @no_terminator() {
 
 // -----
 
-extfunc @illegaltype(i0) // expected-error {{invalid integer width}}
+func @illegaltype(i0) // expected-error {{invalid integer width}}
 
 // -----
 
-mlfunc @malformed_for_percent() {
+func @malformed_for_percent() {
   for i = 1 to 10 { // expected-error {{expected SSA identifier for the loop variable}}
 
 // -----
 
-mlfunc @malformed_for_equal() {
+func @malformed_for_equal() {
   for %i 1 to 10 { // expected-error {{expected '='}}
 
 // -----
 
-mlfunc @malformed_for_to() {
+func @malformed_for_to() {
   for %i = 1 too 10 { // expected-error {{expected 'to' between bounds}}
   }
 }
 
 // -----
 
-mlfunc @incomplete_for() {
+func @incomplete_for() {
   for %i = 1 to 10 step 2
 }        // expected-error {{expected '{' before instruction list}}
 
 // -----
 
-mlfunc @nonconstant_step(%1 : i32) {
+func @nonconstant_step(%1 : i32) {
   for %2 = 1 to 5 step %1 { // expected-error {{expected integer}}
 
 // -----
 
-mlfunc @for_negative_stride() {
+func @for_negative_stride() {
   for %i = 1 to 10 step -1
 }        // expected-error {{step has to be a positive integer}}
 
 // -----
 
-mlfunc @non_instruction() {
+func @non_instruction() {
   asd   // expected-error {{custom op 'asd' is unknown}}
 }
 
 // -----
 
-mlfunc @invalid_if_conditional1() {
+func @invalid_if_conditional1() {
   for %i = 1 to 10 {
     if () { // expected-error {{expected ':' or '['}}
   }
@@ -260,7 +250,7 @@ mlfunc @invalid_if_conditional1() {
 
 // -----
 
-mlfunc @invalid_if_conditional2() {
+func @invalid_if_conditional2() {
   for %i = 1 to 10 {
     if (i)[N] : (i >= )  // expected-error {{expected '== 0' or '>= 0' at end of affine constraint}}
   }
@@ -268,7 +258,7 @@ mlfunc @invalid_if_conditional2() {
 
 // -----
 
-mlfunc @invalid_if_conditional3() {
+func @invalid_if_conditional3() {
   for %i = 1 to 10 {
     if (i)[N] : (i == 1) // expected-error {{expected '0' after '=='}}
   }
@@ -276,7 +266,7 @@ mlfunc @invalid_if_conditional3() {
 
 // -----
 
-mlfunc @invalid_if_conditional4() {
+func @invalid_if_conditional4() {
   for %i = 1 to 10 {
     if (i)[N] : (i >= 2) // expected-error {{expected '0' after '>='}}
   }
@@ -284,7 +274,7 @@ mlfunc @invalid_if_conditional4() {
 
 // -----
 
-mlfunc @invalid_if_conditional5() {
+func @invalid_if_conditional5() {
   for %i = 1 to 10 {
     if (i)[N] : (i <= 0 ) // expected-error {{expected '== 0' or '>= 0' at end of affine constraint}}
   }
@@ -292,7 +282,7 @@ mlfunc @invalid_if_conditional5() {
 
 // -----
 
-mlfunc @invalid_if_conditional6() {
+func @invalid_if_conditional6() {
   for %i = 1 to 10 {
     if (i) : (i) // expected-error {{expected '== 0' or '>= 0' at end of affine constraint}}
   }
@@ -300,7 +290,7 @@ mlfunc @invalid_if_conditional6() {
 
 // -----
 // TODO (support if (1)?
-mlfunc @invalid_if_conditional7() {
+func @invalid_if_conditional7() {
   for %i = 1 to 10 {
     if (i) : (1) // expected-error {{expected '== 0' or '>= 0' at end of affine constraint}}
   }
@@ -312,7 +302,7 @@ mlfunc @invalid_if_conditional7() {
 
 // -----
 
-cfgfunc @test() {
+func @test() {
 ^bb40:
   %1 = "foo"() : (i32)->i64 // expected-error {{expected 0 operand types but had 1}}
   return
@@ -320,7 +310,7 @@ cfgfunc @test() {
 
 // -----
 
-cfgfunc @redef() {
+func @redef() {
 ^bb42:
   %x = "xxx"(){index: 0} : ()->i32 // expected-error {{previously defined here}}
   %x = "xxx"(){index: 0} : ()->i32 // expected-error {{redefinition of SSA value '%x'}}
@@ -329,7 +319,7 @@ cfgfunc @redef() {
 
 // -----
 
-cfgfunc @undef() {
+func @undef() {
 ^bb42:
   %x = "xxx"(%y) : (i32)->i32   // expected-error {{use of undeclared SSA value}}
   return
@@ -337,31 +327,31 @@ cfgfunc @undef() {
 
 // -----
 
-mlfunc @missing_rbrace() {
+func @missing_rbrace() {
   return
-mlfunc @d() {return} // expected-error {{custom op 'mlfunc' is unknown}}
+func @d() {return} // expected-error {{custom op 'func' is unknown}}
 
 // -----
 
-mlfunc @malformed_type(%a : intt) { // expected-error {{expected type}}
+func @malformed_type(%a : intt) { // expected-error {{expected type}}
 }
 
 // -----
 
-cfgfunc @resulterror() -> i32 {
+func @resulterror() -> i32 {
 ^bb42:
   return    // expected-error {{'return' op has 0 operands, but enclosing function returns 1}}
 }
 
 // -----
 
-mlfunc @mlfunc_resulterror() -> i32 {
+func @func_resulterror() -> i32 {
   return // expected-error {{'return' op has 0 operands, but enclosing function returns 1}}
 }
 
 // -----
 
-cfgfunc @argError() {
+func @argError() {
 ^bb1(%a: i64):  // expected-error {{previously defined here}}
   br ^bb2
 ^bb2(%a: i64):  // expected-error{{redefinition of SSA value '%a'}}
@@ -370,7 +360,7 @@ cfgfunc @argError() {
 
 // -----
 
-cfgfunc @bbargMismatch(i32, f32) {
+func @bbargMismatch(i32, f32) {
 // expected-error @+1 {{argument and block argument type mismatch}}
 ^bb42(%0: f32):
   return
@@ -378,7 +368,7 @@ cfgfunc @bbargMismatch(i32, f32) {
 
 // -----
 
-cfgfunc @br_mismatch() {
+func @br_mismatch() {
 ^bb0:
   %0 = "foo"() : () -> (i1, i17)
   // expected-error @+1 {{branch has 2 operands, but target block has 1}}
@@ -391,12 +381,12 @@ cfgfunc @br_mismatch() {
 // -----
 
 // Test no nested vector.
-extfunc @vectors(vector<1 x vector<1xi32>>, vector<2x4xf32>)
+func @vectors(vector<1 x vector<1xi32>>, vector<2x4xf32>)
 // expected-error@-1 {{vector elements must be int or float type}}
 
 // -----
 
-cfgfunc @condbr_notbool() {
+func @condbr_notbool() {
 ^bb0:
   %a = "foo"() : () -> i32 // expected-error {{prior use here}}
   cond_br %a, ^bb0, ^bb0 // expected-error {{use of value '%a' expects different type than prior uses}}
@@ -405,7 +395,7 @@ cfgfunc @condbr_notbool() {
 
 // -----
 
-cfgfunc @condbr_badtype() {
+func @condbr_badtype() {
 ^bb0:
   %c = "foo"() : () -> i1
   %a = "foo"() : () -> i32
@@ -414,7 +404,7 @@ cfgfunc @condbr_badtype() {
 
 // -----
 
-cfgfunc @condbr_a_bb_is_not_a_type() {
+func @condbr_a_bb_is_not_a_type() {
 ^bb0:
   %c = "foo"() : () -> i1
   %a = "foo"() : () -> i32
@@ -423,7 +413,7 @@ cfgfunc @condbr_a_bb_is_not_a_type() {
 
 // -----
 
-cfgfunc @undef() {
+func @undef() {
 ^bb0:
   %x = "xxx"(%y) : (i32)->i32   // expected-error {{use of undeclared SSA value name}}
   return
@@ -431,14 +421,14 @@ cfgfunc @undef() {
 
 // -----
 
-mlfunc @undef() {
+func @undef() {
   %x = "xxx"(%y) : (i32)->i32   // expected-error {{use of undeclared SSA value name}}
   return
 }
 
 // -----
 
-mlfunc @duplicate_induction_var() {
+func @duplicate_induction_var() {
   for %i = 1 to 10 {   // expected-error {{previously defined here}}
     for %i = 1 to 10 { // expected-error {{redefinition of SSA value '%i'}}
     }
@@ -448,7 +438,7 @@ mlfunc @duplicate_induction_var() {
 
 // -----
 
-mlfunc @dominance_failure() {
+func @dominance_failure() {
   for %i = 1 to 10 {
   }
   "xxx"(%i) : (index)->()   // expected-error {{operand #0 does not dominate this use}}
@@ -457,7 +447,7 @@ mlfunc @dominance_failure() {
 
 // -----
 
-cfgfunc @dominance_failure() {
+func @dominance_failure() {
 ^bb0:
   "foo"(%x) : (i32) -> ()    // expected-error {{operand #0 does not dominate this use}}
   br ^bb1
@@ -468,14 +458,14 @@ cfgfunc @dominance_failure() {
 
 // -----
 
-mlfunc @return_type_mismatch() -> i32 {
+func @return_type_mismatch() -> i32 {
   %0 = "foo"() : ()->f32
   return %0 : f32  // expected-error {{type of return operand 0 doesn't match function result type}}
 }
 
 // -----
 
-mlfunc @return_inside_loop() -> i8 {
+func @return_inside_loop() -> i8 {
   for %i = 1 to 100 {
     %a = "foo"() : ()->i8
     return %a : i8
@@ -485,12 +475,12 @@ mlfunc @return_inside_loop() -> i8 {
 
 // -----
 
-extfunc @redef()
-extfunc @redef()  // expected-error {{redefinition of function named 'redef'}}
+func @redef()
+func @redef()  // expected-error {{redefinition of function named 'redef'}}
 
 // -----
 
-cfgfunc @foo() {
+func @foo() {
 ^bb0:
   %x = constant @foo : (i32) -> ()  // expected-error {{reference to function with mismatched type}}
   return
@@ -498,7 +488,7 @@ cfgfunc @foo() {
 
 // -----
 
-cfgfunc @undefined_function() {
+func @undefined_function() {
 ^bb0:
   %x = constant @bar : (i32) -> ()  // expected-error {{reference to undefined function 'bar'}}
   return
@@ -508,7 +498,7 @@ cfgfunc @undefined_function() {
 
 #map1 = (i)[j] -> (i+j)
 
-mlfunc @bound_symbol_mismatch(%N : index) {
+func @bound_symbol_mismatch(%N : index) {
   for %i = #map1(%N) to 100 {
   // expected-error@-1 {{symbol operand count and affine map symbol count must match}}
   }
@@ -519,7 +509,7 @@ mlfunc @bound_symbol_mismatch(%N : index) {
 
 #map1 = (i)[j] -> (i+j)
 
-mlfunc @bound_dim_mismatch(%N : index) {
+func @bound_dim_mismatch(%N : index) {
   for %i = #map1(%N, %N)[%N] to 100 {
   // expected-error@-1 {{dim operand count and affine map dim count must match}}
   }
@@ -530,7 +520,7 @@ mlfunc @bound_dim_mismatch(%N : index) {
 
 #map1 = (i)[j] -> (i+j)
 
-mlfunc @invalid_dim_nested(%N : index) {
+func @invalid_dim_nested(%N : index) {
   for %i = 1 to 100 {
     %a = "foo"(%N) : (index)->(index)
     for %j = 1 to #map1(%a)[%i] {
@@ -544,7 +534,7 @@ mlfunc @invalid_dim_nested(%N : index) {
 
 #map1 = (i)[j] -> (i+j)
 
-mlfunc @invalid_dim_affine_apply(%N : index) {
+func @invalid_dim_affine_apply(%N : index) {
   for %i = 1 to 100 {
     %a = "foo"(%N) : (index)->(index)
     %w = affine_apply (i)->(i+1) (%a)
@@ -559,7 +549,7 @@ mlfunc @invalid_dim_affine_apply(%N : index) {
 
 #map1 = (i)[j] -> (i+j)
 
-mlfunc @invalid_symbol_iv(%N : index) {
+func @invalid_symbol_iv(%N : index) {
   for %i = 1 to 100 {
     %a = "foo"(%N) : (index)->(index)
     for %j = 1 to #map1(%N)[%i] {
@@ -573,7 +563,7 @@ mlfunc @invalid_symbol_iv(%N : index) {
 
 #map1 = (i)[j] -> (i+j)
 
-mlfunc @invalid_symbol_nested(%N : index) {
+func @invalid_symbol_nested(%N : index) {
   for %i = 1 to 100 {
     %a = "foo"(%N) : (index)->(index)
     for %j = 1 to #map1(%N)[%a] {
@@ -587,7 +577,7 @@ mlfunc @invalid_symbol_nested(%N : index) {
 
 #map1 = (i)[j] -> (i+j)
 
-mlfunc @invalid_symbol_affine_apply(%N : index) {
+func @invalid_symbol_affine_apply(%N : index) {
   for %i = 1 to 100 {
     %w = affine_apply (i)->(i+1) (%i)
     for %j = 1 to #map1(%i)[%w] {
@@ -599,7 +589,7 @@ mlfunc @invalid_symbol_affine_apply(%N : index) {
 
 // -----
 
-mlfunc @large_bound() {
+func @large_bound() {
   for %i = 1 to 9223372036854775810 {
   // expected-error@-1 {{bound or step is too large for index}}
   }
@@ -608,7 +598,7 @@ mlfunc @large_bound() {
 
 // -----
 
-mlfunc @max_in_upper_bound(%N : index) {
+func @max_in_upper_bound(%N : index) {
   for %i = 1 to max (i)->(N, 100) { //expected-error {{expected SSA operand}}
   }
   return
@@ -616,7 +606,7 @@ mlfunc @max_in_upper_bound(%N : index) {
 
 // -----
 
-mlfunc @step_typo() {
+func @step_typo() {
   for %i = 1 to 100 step -- 1 { //expected-error {{expected integer}}
   }
   return
@@ -624,7 +614,7 @@ mlfunc @step_typo() {
 
 // -----
 
-mlfunc @invalid_bound_map(%N : i32) {
+func @invalid_bound_map(%N : i32) {
   for %i = 1 to (i)->(j)(%N) { //expected-error {{use of undeclared identifier}}
   }
   return
@@ -633,7 +623,7 @@ mlfunc @invalid_bound_map(%N : i32) {
 // -----
 #set0 = (i)[N] : (i >= 0, N - i >= 0)
 
-mlfunc @invalid_if_operands1(%N : index) {
+func @invalid_if_operands1(%N : index) {
   for %i = 1 to 10 {
     if #set0(%i) {
     // expected-error@-1 {{symbol operand count and integer set symbol count must match}}
@@ -641,7 +631,7 @@ mlfunc @invalid_if_operands1(%N : index) {
 // -----
 #set0 = (i)[N] : (i >= 0, N - i >= 0)
 
-mlfunc @invalid_if_operands2(%N : index) {
+func @invalid_if_operands2(%N : index) {
   for %i = 1 to 10 {
     if #set0()[%N] {
     // expected-error@-1 {{dim operand count and integer set dim count must match}}
@@ -649,7 +639,7 @@ mlfunc @invalid_if_operands2(%N : index) {
 // -----
 #set0 = (i)[N] : (i >= 0, N - i >= 0)
 
-mlfunc @invalid_if_operands3(%N : index) {
+func @invalid_if_operands3(%N : index) {
   for %i = 1 to 10 {
     if #set0(%i)[%i] {
     // expected-error@-1 {{value '%i' cannot be used as a symbol}}
@@ -657,51 +647,51 @@ mlfunc @invalid_if_operands3(%N : index) {
 // -----
 // expected-error@+1 {{expected '"' in string literal}}
 "J// -----
-mlfunc @calls(%arg0: i32) {
+func @calls(%arg0: i32) {
   // expected-error@+1 {{expected type}}
   %z = "casdasda"(%x) : (ppop32) -> i32
 }
 // -----
 // expected-error@+2 {{expected SSA operand}}
-cfgfunc@n(){^b(
+func@n(){^b(
 // -----
 
-cfgfunc @elementsattr_non_tensor_type() -> () {
+func @elementsattr_non_tensor_type() -> () {
 ^bb0:
   "foo"(){bar: dense<i32, [4]>} : () -> () // expected-error {{expected elements literal has a tensor or vector type}}
 }
 
 // -----
 
-cfgfunc @elementsattr_non_ranked() -> () {
+func @elementsattr_non_ranked() -> () {
 ^bb0:
   "foo"(){bar: dense<tensor<?xi32>, [4]>} : () -> () // expected-error {{tensor literals must be ranked and have static shape}}
 }
 
 // -----
 
-cfgfunc @elementsattr_shape_mismatch() -> () {
+func @elementsattr_shape_mismatch() -> () {
 ^bb0:
   "foo"(){bar: dense<tensor<5xi32>, [4]>} : () -> () // expected-error {{inferred shape of elements literal ([1]) does not match type ([5])}}
 }
 
 // -----
 
-cfgfunc @elementsattr_invalid() -> () {
+func @elementsattr_invalid() -> () {
 ^bb0:
   "foo"(){bar: dense<tensor<2xi32>, [4, [5]]>} : () -> () // expected-error {{tensor literal is invalid; ranks are not consistent between elements}}
 }
 
 // -----
 
-cfgfunc @elementsattr_badtoken() -> () {
+func @elementsattr_badtoken() -> () {
 ^bb0:
   "foo"(){bar: dense<tensor<1xi32>, [tf_opaque]>} : () -> () // expected-error {{expected '[' or scalar constant inside tensor literal}}
 }
 
 // -----
 
-cfgfunc @elementsattr_floattype1() -> () {
+func @elementsattr_floattype1() -> () {
 ^bb0:
   // expected-error@+1 {{floating point value not valid for specified type}}
   "foo"(){bar: dense<tensor<1xi32>, [4.0]>} : () -> ()
@@ -709,7 +699,7 @@ cfgfunc @elementsattr_floattype1() -> () {
 
 // -----
 
-cfgfunc @elementsattr_floattype2() -> () {
+func @elementsattr_floattype2() -> () {
 ^bb0:
   // expected-error@+1 {{integer value not valid for specified type}}
   "foo"(){bar: dense<tensor<1xf32>, [4]>} : () -> ()
@@ -717,42 +707,42 @@ cfgfunc @elementsattr_floattype2() -> () {
 
 // -----
 
-cfgfunc @elementsattr_toolarge1() -> () {
+func @elementsattr_toolarge1() -> () {
 ^bb0:
   "foo"(){bar: dense<tensor<1xi8>, [777]>} : () -> () // expected-error {{integer constant out of range for attribute}}
 }
 
 // -----
 
-cfgfunc @elementsattr_toolarge2() -> () {
+func @elementsattr_toolarge2() -> () {
 ^bb0:
   "foo"(){bar: dense<tensor<1xi8>, [-777]>} : () -> () // expected-error {{integer constant out of range for attribute}}
 }
 
 // -----
 
-cfgfunc @elementsattr_malformed_opaque() -> () {
+func @elementsattr_malformed_opaque() -> () {
 ^bb0:
   "foo"(){bar: opaque<tensor<1xi8>, "0xQZz123">} : () -> () // expected-error {{opaque string only contains hex digits}}
 }
 
 // -----
 
-cfgfunc @elementsattr_malformed_opaque1() -> () {
+func @elementsattr_malformed_opaque1() -> () {
 ^bb0:
   "foo"(){bar: opaque<tensor<1xi8>, "00abc">} : () -> () // expected-error {{opaque string should start with '0x'}}
 }
 
 // -----
 
-cfgfunc @redundant_signature(%a : i32) -> () {
+func @redundant_signature(%a : i32) -> () {
 ^bb0(%b : i32):  // expected-error {{invalid block name in function with named arguments}}
   return
 }
 
 // -----
 
-cfgfunc @mixed_named_arguments(%a : i32,
+func @mixed_named_arguments(%a : i32,
                                f32) -> () {
     // expected-error @-1 {{expected SSA identifier}}
   return
@@ -760,17 +750,8 @@ cfgfunc @mixed_named_arguments(%a : i32,
 
 // -----
 
-cfgfunc @mixed_named_arguments(f32,
+func @mixed_named_arguments(f32,
                                %a : i32) -> () { // expected-error {{expected type instead of SSA identifier}}
   return
 }
 
-// -----
-
-mlfunc @multi_block(%N : index) {  // expected-error {{mlfunc should have exactly one block}}
-  for %i = 1 to %N {}
-  return
-
-^bb42:
-  return
-}
index a383631625162f225fc87bb7d7ed7af7d13bfc42..f8471e6b1d778566a8630247cd86653e3dc2f153 100644 (file)
@@ -2,8 +2,8 @@
 
 // CHECK: #map0 = (d0, d1)[s0] -> (d0 + s0, d1)
 
-// CHECK-LABEL: cfgfunc @alloc() {
-cfgfunc @alloc() {
+// CHECK-LABEL: func @alloc() {
+func @alloc() {
 ^bb0:
   // Test simple alloc.
   // CHECK: %0 = alloc() : memref<1024x64xf32, 1>
@@ -33,8 +33,8 @@ cfgfunc @alloc() {
   return
 }
 
-// CHECK-LABEL: cfgfunc @dealloc() {
-cfgfunc @dealloc() {
+// CHECK-LABEL: func @dealloc() {
+func @dealloc() {
 ^bb0:
   // CHECK: %0 = alloc() : memref<1024x64xf32>
   %0 = alloc() : memref<1024x64xf32, (d0, d1) -> (d0, d1), 0>
@@ -44,8 +44,8 @@ cfgfunc @dealloc() {
   return
 }
 
-// CHECK-LABEL: cfgfunc @load_store
-cfgfunc @load_store() {
+// CHECK-LABEL: func @load_store
+func @load_store() {
 ^bb0:
   // CHECK: %0 = alloc() : memref<1024x64xf32, 1>
   %0 = alloc() : memref<1024x64xf32, (d0, d1) -> (d0, d1), 1>
@@ -62,8 +62,8 @@ cfgfunc @load_store() {
   return
 }
 
-// CHECK-LABEL: mlfunc @dma_ops()
-mlfunc @dma_ops() {
+// CHECK-LABEL: func @dma_ops()
+func @dma_ops() {
   %c0 = constant 0 : index
   %stride = constant 32 : index
   %elt_per_stride = constant 16 : index
index da70acbb6d36e4ea659594a8b6f2c9afb9aa50f0..5ceaf09e1857e9c7ef05358fa66999c63a7ababf 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: mlir-opt -print-op-stats %s -o=/dev/null 2>&1 | FileCheck %s
 
-cfgfunc @main(tensor<4xf32>, tensor<4xf32>) -> tensor<4xf32> {
+func @main(tensor<4xf32>, tensor<4xf32>) -> tensor<4xf32> {
 ^bb0(%arg0: tensor<4xf32>, %arg1: tensor<4xf32>):
   %0 = addf %arg0, %arg1 : tensor<4xf32>
   %1 = addf %arg0, %arg1 : tensor<4xf32>
index e721b3e56661a652ca7f97943f9afcc8db2a2d92..6d1b22bfa43de4a4ad2a148bb66995b4384a984b 100644 (file)
 
 // CHECK-DAG: #set{{[0-9]+}} = (d0)[s0] : (d0 - 2 >= 0, d0 * -1 + 4 >= 0)
 
-// CHECK: extfunc @foo(i32, i64) -> f32
-extfunc @foo(i32, i64) -> f32
+// CHECK: func @foo(i32, i64) -> f32
+func @foo(i32, i64) -> f32
 
-// CHECK: extfunc @bar()
-extfunc @bar() -> ()
+// CHECK: func @bar()
+func @bar() -> ()
 
-// CHECK: extfunc @baz() -> (i1, index, f32)
-extfunc @baz() -> (i1, index, f32)
+// CHECK: func @baz() -> (i1, index, f32)
+func @baz() -> (i1, index, f32)
 
-// CHECK: extfunc @missingReturn()
-extfunc @missingReturn()
+// CHECK: func @missingReturn()
+func @missingReturn()
 
-// CHECK: extfunc @int_types(i1, i2, i4, i7, i87) -> (i1, index, i19)
-extfunc @int_types(i1, i2, i4, i7, i87) -> (i1, index, i19)
+// CHECK: func @int_types(i1, i2, i4, i7, i87) -> (i1, index, i19)
+func @int_types(i1, i2, i4, i7, i87) -> (i1, index, i19)
 
 
-// CHECK: extfunc @vectors(vector<1xf32>, vector<2x4xf32>)
-extfunc @vectors(vector<1 x f32>, vector<2x4xf32>)
+// CHECK: func @vectors(vector<1xf32>, vector<2x4xf32>)
+func @vectors(vector<1 x f32>, vector<2x4xf32>)
 
-// CHECK: extfunc @tensors(tensor<*xf32>, tensor<*xvector<2x4xf32>>, tensor<1x?x4x?x?xi32>, tensor<i8>)
-extfunc @tensors(tensor<* x f32>, tensor<* x vector<2x4xf32>>,
+// CHECK: func @tensors(tensor<*xf32>, tensor<*xvector<2x4xf32>>, tensor<1x?x4x?x?xi32>, tensor<i8>)
+func @tensors(tensor<* x f32>, tensor<* x vector<2x4xf32>>,
                  tensor<1x?x4x?x?xi32>, tensor<i8>)
 
-// CHECK: extfunc @memrefs(memref<1x?x4x?x?xi32, #map{{[0-9]+}}>, memref<8xi8>)
-extfunc @memrefs(memref<1x?x4x?x?xi32, #map0>, memref<8xi8, #map1, #map1>)
+// CHECK: func @memrefs(memref<1x?x4x?x?xi32, #map{{[0-9]+}}>, memref<8xi8>)
+func @memrefs(memref<1x?x4x?x?xi32, #map0>, memref<8xi8, #map1, #map1>)
 
 // Test memref affine map compositions.
 
-// CHECK: extfunc @memrefs2(memref<2x4x8xi8, 1>)
-extfunc @memrefs2(memref<2x4x8xi8, #map2, 1>)
+// CHECK: func @memrefs2(memref<2x4x8xi8, 1>)
+func @memrefs2(memref<2x4x8xi8, #map2, 1>)
 
-// CHECK: extfunc @memrefs23(memref<2x4x8xi8, #map{{[0-9]+}}>)
-extfunc @memrefs23(memref<2x4x8xi8, #map2, #map3, 0>)
+// CHECK: func @memrefs23(memref<2x4x8xi8, #map{{[0-9]+}}>)
+func @memrefs23(memref<2x4x8xi8, #map2, #map3, 0>)
 
-// CHECK: extfunc @memrefs234(memref<2x4x8xi8, #map{{[0-9]+}}, #map{{[0-9]+}}, 3>)
-extfunc @memrefs234(memref<2x4x8xi8, #map2, #map3, #map4, 3>)
+// CHECK: func @memrefs234(memref<2x4x8xi8, #map{{[0-9]+}}, #map{{[0-9]+}}, 3>)
+func @memrefs234(memref<2x4x8xi8, #map2, #map3, #map4, 3>)
 
 // Test memref inline affine map compositions, minding that identity maps are removed.
 
-// CHECK: extfunc @memrefs3(memref<2x4x8xi8>)
-extfunc @memrefs3(memref<2x4x8xi8, (d0, d1, d2) -> (d0, d1, d2)>)
+// CHECK: func @memrefs3(memref<2x4x8xi8>)
+func @memrefs3(memref<2x4x8xi8, (d0, d1, d2) -> (d0, d1, d2)>)
 
-// CHECK: extfunc @memrefs33(memref<2x4x8xi8, #map{{[0-9]+}}, 1>)
-extfunc @memrefs33(memref<2x4x8xi8, (d0, d1, d2) -> (d0, d1, d2), (d0, d1, d2) -> (d1, d0, d2), 1>)
+// CHECK: func @memrefs33(memref<2x4x8xi8, #map{{[0-9]+}}, 1>)
+func @memrefs33(memref<2x4x8xi8, (d0, d1, d2) -> (d0, d1, d2), (d0, d1, d2) -> (d1, d0, d2), 1>)
 
-// CHECK: extfunc @memrefs_drop_triv_id_inline(memref<2xi8>)
-extfunc @memrefs_drop_triv_id_inline(memref<2xi8, (d0) -> (d0)>)
+// CHECK: func @memrefs_drop_triv_id_inline(memref<2xi8>)
+func @memrefs_drop_triv_id_inline(memref<2xi8, (d0) -> (d0)>)
 
-// CHECK: extfunc @memrefs_drop_triv_id_inline0(memref<2xi8>)
-extfunc @memrefs_drop_triv_id_inline0(memref<2xi8, (d0) -> (d0), 0>)
+// CHECK: func @memrefs_drop_triv_id_inline0(memref<2xi8>)
+func @memrefs_drop_triv_id_inline0(memref<2xi8, (d0) -> (d0), 0>)
 
-// CHECK: extfunc @memrefs_drop_triv_id_inline1(memref<2xi8, 1>)
-extfunc @memrefs_drop_triv_id_inline1(memref<2xi8, (d0) -> (d0), 1>)
+// CHECK: func @memrefs_drop_triv_id_inline1(memref<2xi8, 1>)
+func @memrefs_drop_triv_id_inline1(memref<2xi8, (d0) -> (d0), 1>)
 
 // Identity maps should be dropped from the composition, but not the pair of
 // "interchange" maps that, if composed, would be also an identity.
-// CHECK: extfunc @memrefs_drop_triv_id_composition(memref<2x2xi8, #map{{[0-9]+}}, #map{{[0-9]+}}>)
-extfunc @memrefs_drop_triv_id_composition(memref<2x2xi8,
+// CHECK: func @memrefs_drop_triv_id_composition(memref<2x2xi8, #map{{[0-9]+}}, #map{{[0-9]+}}>)
+func @memrefs_drop_triv_id_composition(memref<2x2xi8,
                                                 (d0, d1) -> (d1, d0),
                                                 (d0, d1) -> (d0, d1),
                                                 (d0, d1) -> (d1, d0),
                                                 (d0, d1) -> (d0, d1),
                                                 (d0, d1) -> (d0, d1)>)
 
-// CHECK: extfunc @memrefs_drop_triv_id_trailing(memref<2x2xi8, #map{{[0-9]+}}>)
-extfunc @memrefs_drop_triv_id_trailing(memref<2x2xi8, (d0, d1) -> (d1, d0),
+// CHECK: func @memrefs_drop_triv_id_trailing(memref<2x2xi8, #map{{[0-9]+}}>)
+func @memrefs_drop_triv_id_trailing(memref<2x2xi8, (d0, d1) -> (d1, d0),
                                               (d0, d1) -> (d0, d1)>)
 
-// CHECK: extfunc @memrefs_drop_triv_id_middle(memref<2x2xi8, #map{{[0-9]+}}, #map{{[0-9]+}}>)
-extfunc @memrefs_drop_triv_id_middle(memref<2x2xi8, (d0, d1) -> (d0, d1 + 1),
+// CHECK: func @memrefs_drop_triv_id_middle(memref<2x2xi8, #map{{[0-9]+}}, #map{{[0-9]+}}>)
+func @memrefs_drop_triv_id_middle(memref<2x2xi8, (d0, d1) -> (d0, d1 + 1),
                                             (d0, d1) -> (d0, d1),
                                            (d0, d1) -> (d0 + 1, d1)>)
 
-// CHECK: extfunc @memrefs_drop_triv_id_multiple(memref<2xi8>)
-extfunc @memrefs_drop_triv_id_multiple(memref<2xi8, (d0) -> (d0), (d0) -> (d0)>)
+// CHECK: func @memrefs_drop_triv_id_multiple(memref<2xi8>)
+func @memrefs_drop_triv_id_multiple(memref<2xi8, (d0) -> (d0), (d0) -> (d0)>)
 
 // These maps appeared before, so they must be uniqued and hoisted to the beginning.
 // Identity map should be removed.
-// CHECK: extfunc @memrefs_compose_with_id(memref<2x2xi8, #map{{[0-9]+}}>)
-extfunc @memrefs_compose_with_id(memref<2x2xi8, (d0, d1) -> (d0, d1),
+// CHECK: func @memrefs_compose_with_id(memref<2x2xi8, #map{{[0-9]+}}>)
+func @memrefs_compose_with_id(memref<2x2xi8, (d0, d1) -> (d0, d1),
                                         (d0, d1) -> (d1, d0)>)
 
-// CHECK: extfunc @functions((memref<1x?x4x?x?xi32, #map0>, memref<8xi8>) -> (), () -> ())
-extfunc @functions((memref<1x?x4x?x?xi32, #map0, 0>, memref<8xi8, #map1, 0>) -> (), ()->())
+// CHECK: func @functions((memref<1x?x4x?x?xi32, #map0>, memref<8xi8>) -> (), () -> ())
+func @functions((memref<1x?x4x?x?xi32, #map0, 0>, memref<8xi8, #map1, 0>) -> (), ()->())
 
-// CHECK-LABEL: cfgfunc @simpleCFG(%arg0: i32, %arg1: f32) -> i1 {
-cfgfunc @simpleCFG(%arg0: i32, %f: f32) -> i1 {
+// CHECK-LABEL: func @simpleCFG(%arg0: i32, %arg1: f32) -> i1 {
+func @simpleCFG(%arg0: i32, %f: f32) -> i1 {
   // CHECK: %0 = "foo"() : () -> i64
   %1 = "foo"() : ()->i64
   // CHECK: "bar"(%0) : (i64) -> (i1, i1, i1)
@@ -143,8 +143,8 @@ cfgfunc @simpleCFG(%arg0: i32, %f: f32) -> i1 {
 // CHECK: }
 }
 
-// CHECK-LABEL: cfgfunc @simpleCFGUsingBBArgs(%arg0: i32, %arg1: i64) {
-cfgfunc @simpleCFGUsingBBArgs(i32, i64) {
+// CHECK-LABEL: func @simpleCFGUsingBBArgs(%arg0: i32, %arg1: i64) {
+func @simpleCFGUsingBBArgs(i32, i64) {
 ^bb42 (%arg0: i32, %f: i64):
   // CHECK: "bar"(%arg1) : (i64) -> (i1, i1, i1)
   %2 = "bar"(%f) : (i64) -> (i1,i1,i1)
@@ -153,8 +153,8 @@ cfgfunc @simpleCFGUsingBBArgs(i32, i64) {
 // CHECK: }
 }
 
-// CHECK-LABEL: cfgfunc @multiblock() {
-cfgfunc @multiblock() {
+// CHECK-LABEL: func @multiblock() {
+func @multiblock() {
   return     // CHECK:   return
 ^bb1:         // CHECK: ^bb1:   // no predecessors
   br ^bb4     // CHECK:   br ^bb3
@@ -164,34 +164,27 @@ cfgfunc @multiblock() {
   return     // CHECK:   return
 }            // CHECK: }
 
-// CHECK-LABEL: mlfunc @emptyMLF() {
-mlfunc @emptyMLF() {
+// CHECK-LABEL: func @emptyMLF() {
+func @emptyMLF() {
   return     // CHECK:  return
 }            // CHECK: }
 
-// CHECK-LABEL: mlfunc @mlfunc_with_one_arg(%arg0: i1) -> i2 {
-mlfunc @mlfunc_with_one_arg(%c : i1) -> i2 {
+// CHECK-LABEL: func @func_with_one_arg(%arg0: i1) -> i2 {
+func @func_with_one_arg(%c : i1) -> i2 {
   // CHECK: %0 = "foo"(%arg0) : (i1) -> i2
   %b = "foo"(%c) : (i1) -> (i2)
   return %b : i2   // CHECK: return %0 : i2
 } // CHECK: }
 
-// CHECK-LABEL: mlfunc @mlfunc_with_two_args(%arg0: f16, %arg1: i8) -> (i1, i32) {
-mlfunc @mlfunc_with_two_args(%a : f16, %b : i8) -> (i1, i32) {
+// CHECK-LABEL: func @func_with_two_args(%arg0: f16, %arg1: i8) -> (i1, i32) {
+func @func_with_two_args(%a : f16, %b : i8) -> (i1, i32) {
   // CHECK: %0 = "foo"(%arg0, %arg1) : (f16, i8) -> (i1, i32)
   %c = "foo"(%a, %b) : (f16, i8)->(i1, i32)
   return %c#0, %c#1 : i1, i32  // CHECK: return %0#0, %0#1 : i1, i32
 } // CHECK: }
 
-// CHECK-LABEL: cfgfunc @cfgfunc_with_two_args(%arg0: f16, %arg1: i8) -> (i1, i32) {
-cfgfunc @cfgfunc_with_two_args(%a : f16, %b : i8) -> (i1, i32) {
-  // CHECK: %0 = "foo"(%arg0, %arg1) : (f16, i8) -> (i1, i32)
-  %c = "foo"(%a, %b) : (f16, i8)->(i1, i32)
-  return %c#0, %c#1 : i1, i32  // CHECK: return %0#0, %0#1 : i1, i32
-} // CHECK: }
-
-// CHECK-LABEL: mlfunc @mlfunc_ops_in_loop() {
-mlfunc @mlfunc_ops_in_loop() {
+// CHECK-LABEL: func @func_ops_in_loop() {
+func @func_ops_in_loop() {
   // CHECK: %0 = "foo"() : () -> i64
   %a = "foo"() : ()->i64
   // CHECK: for %i0 = 1 to 10 {
@@ -208,8 +201,8 @@ mlfunc @mlfunc_ops_in_loop() {
 }
 
 
-// CHECK-LABEL: mlfunc @loops() {
-mlfunc @loops() {
+// CHECK-LABEL: func @loops() {
+func @loops() {
   // CHECK: for %i0 = 1 to 100 step 2 {
   for %i = 1 to 100 step 2 {
     // CHECK: for %i1 = 1 to 200 {
@@ -219,8 +212,8 @@ mlfunc @loops() {
   return     // CHECK:   return
 }            // CHECK: }
 
-// CHECK-LABEL: mlfunc @complex_loops() {
-mlfunc @complex_loops() {
+// CHECK-LABEL: func @complex_loops() {
+func @complex_loops() {
   for %i1 = 1 to 100 {      // CHECK:   for %i0 = 1 to 100 {
     for %j1 = 1 to 100 {    // CHECK:     for %i1 = 1 to 100 {
        // CHECK: "foo"(%i0, %i1) : (index, index) -> ()
@@ -236,8 +229,8 @@ mlfunc @complex_loops() {
   return                    // CHECK:   return
 }                           // CHECK: }
 
-// CHECK: mlfunc @triang_loop(%arg0: index, %arg1: memref<?x?xi32>) {
-mlfunc @triang_loop(%arg0: index, %arg1: memref<?x?xi32>) {
+// CHECK: func @triang_loop(%arg0: index, %arg1: memref<?x?xi32>) {
+func @triang_loop(%arg0: index, %arg1: memref<?x?xi32>) {
   %c = constant 0 : i32       // CHECK: %c0_i32 = constant 0 : i32
   for %i0 = 1 to %arg0 {      // CHECK: for %i0 = 1 to %arg0 {
     for %i1 = %i0 to %arg0 {  // CHECK:   for %i1 = #map{{[0-9]+}}(%i0) to %arg0 {
@@ -247,8 +240,8 @@ mlfunc @triang_loop(%arg0: index, %arg1: memref<?x?xi32>) {
   return       // CHECK:   return
 }              // CHECK: }
 
-// CHECK: mlfunc @minmax_loop(%arg0: index, %arg1: index, %arg2: memref<100xf32>) {
-mlfunc @minmax_loop(%arg0: index, %arg1: index, %arg2: memref<100xf32>) {
+// CHECK: func @minmax_loop(%arg0: index, %arg1: index, %arg2: memref<100xf32>) {
+func @minmax_loop(%arg0: index, %arg1: index, %arg2: memref<100xf32>) {
   // CHECK: for %i0 = max #map{{.*}}()[%arg0] to min #map{{.*}}()[%arg1] {
   for %i0 = max()[s]->(0,s-1)()[%arg0] to min()[s]->(100,s+1)()[%arg1] {
     // CHECK: "foo"(%arg2, %i0) : (memref<100xf32>, index) -> ()
@@ -257,8 +250,8 @@ mlfunc @minmax_loop(%arg0: index, %arg1: index, %arg2: memref<100xf32>) {
   return // CHECK:   return
 }        // CHECK: }
 
-// CHECK-LABEL: mlfunc @loop_bounds(%arg0: index) {
-mlfunc @loop_bounds(%N : index) {
+// CHECK-LABEL: func @loop_bounds(%arg0: index) {
+func @loop_bounds(%N : index) {
   // CHECK: %0 = "foo"(%arg0) : (index) -> index
   %s = "foo"(%N) : (index) -> index
   // CHECK: for %i0 = %0 to %arg0
@@ -286,8 +279,8 @@ mlfunc @loop_bounds(%N : index) {
   return    // CHECK:   return
 }           // CHECK: }
 
-// CHECK-LABEL: mlfunc @ifinst(%arg0: index) {
-mlfunc @ifinst(%N: index) {
+// CHECK-LABEL: func @ifinst(%arg0: index) {
+func @ifinst(%N: index) {
   %c = constant 200 : index // CHECK   %c200 = constant 200
   for %i = 1 to 10 {           // CHECK   for %i0 = 1 to 10 {
     if #set0(%i)[%N, %c] {     // CHECK     if #set0(%i0)[%arg0, %c200] {
@@ -307,8 +300,8 @@ mlfunc @ifinst(%N: index) {
   return    // CHECK   return
 }           // CHECK }
 
-// CHECK-LABEL: mlfunc @simple_ifinst(%arg0: index) {
-mlfunc @simple_ifinst(%N: index) {
+// CHECK-LABEL: func @simple_ifinst(%arg0: index) {
+func @simple_ifinst(%N: index) {
   %c = constant 200 : index // CHECK   %c200 = constant 200
   for %i = 1 to 10 {           // CHECK   for %i0 = 1 to 10 {
     if #set0(%i)[%N, %c] {     // CHECK     if #set0(%i0)[%arg0, %c200] {
@@ -321,8 +314,8 @@ mlfunc @simple_ifinst(%N: index) {
   return    // CHECK   return
 }           // CHECK }
 
-// CHECK-LABEL: cfgfunc @attributes() {
-cfgfunc @attributes() {
+// CHECK-LABEL: func @attributes() {
+func @attributes() {
   // CHECK: "foo"()
   "foo"(){} : ()->()
 
@@ -347,16 +340,16 @@ cfgfunc @attributes() {
   // CHECK: "foo"() {set12: [#set{{[0-9]+}}, #set{{[0-9]+}}]}
   "foo"() {set12: [#set1, #set2]} : () -> ()
 
-  // CHECK: "foo"() {cfgfunc: [], d: 1.000000e-09, i123: 7, if: "foo"} : () -> ()
-  "foo"() {if: "foo", cfgfunc: [], i123: 7, d: 1.e-9} : () -> ()
+  // CHECK: "foo"() {d: 1.000000e-09, func: [], i123: 7, if: "foo"} : () -> ()
+  "foo"() {if: "foo", func: [], i123: 7, d: 1.e-9} : () -> ()
 
   // CHECK: "foo"() {fn: @attributes : () -> (), if: @ifinst : (index) -> ()} : () -> ()
   "foo"() {fn: @attributes : () -> (), if: @ifinst : (index) -> ()} : () -> ()
   return
 }
 
-// CHECK-LABEL: cfgfunc @ssa_values() -> (i16, i8) {
-cfgfunc @ssa_values() -> (i16, i8) {
+// CHECK-LABEL: func @ssa_values() -> (i16, i8) {
+func @ssa_values() -> (i16, i8) {
   // CHECK: %0 = "foo"() : () -> (i1, i17)
   %0 = "foo"() : () -> (i1, i17)
   br ^bb2
@@ -374,8 +367,8 @@ cfgfunc @ssa_values() -> (i16, i8) {
   br ^bb1
 }
 
-// CHECK-LABEL: cfgfunc @bbargs() -> (i16, i8) {
-cfgfunc @bbargs() -> (i16, i8) {
+// CHECK-LABEL: func @bbargs() -> (i16, i8) {
+func @bbargs() -> (i16, i8) {
   // CHECK: %0 = "foo"() : () -> (i1, i17)
   %0 = "foo"() : () -> (i1, i17)
   br ^bb1(%0#1, %0#0 : i17, i1)
@@ -386,8 +379,8 @@ cfgfunc @bbargs() -> (i16, i8) {
   return %1#0, %1#1 : i16, i8
 }
 
-// CHECK-LABEL: cfgfunc @condbr_simple
-cfgfunc @condbr_simple() -> (i32) {
+// CHECK-LABEL: func @condbr_simple
+func @condbr_simple() -> (i32) {
   %cond = "foo"() : () -> i1
   %a = "bar"() : () -> i32
   %b = "bar"() : () -> i64
@@ -404,8 +397,8 @@ cfgfunc @condbr_simple() -> (i32) {
   return %z : i32
 }
 
-// CHECK-LABEL: cfgfunc @condbr_moarargs
-cfgfunc @condbr_moarargs() -> (i32) {
+// CHECK-LABEL: func @condbr_moarargs
+func @condbr_moarargs() -> (i32) {
   %cond = "foo"() : () -> i1
   %a = "bar"() : () -> i32
   %b = "bar"() : () -> i64
@@ -422,8 +415,8 @@ cfgfunc @condbr_moarargs() -> (i32) {
 
 
 // Test pretty printing of constant names.
-// CHECK-LABEL: cfgfunc @constants
-cfgfunc @constants() -> (i32, i23, i23, i1, i1) {
+// CHECK-LABEL: func @constants
+func @constants() -> (i32, i23, i23, i1, i1) {
   // CHECK: %c42_i32 = constant 42 : i32
   %x = constant 42 : i32
   // CHECK: %c17_i23 = constant 17 : i23
@@ -442,78 +435,64 @@ cfgfunc @constants() -> (i32, i23, i23, i1, i1) {
   return %x, %y, %z, %t, %f : i32, i23, i23, i1, i1
 }
 
-// CHECK-LABEL: cfgfunc @typeattr
-cfgfunc @typeattr() -> () {
+// CHECK-LABEL: func @typeattr
+func @typeattr() -> () {
 ^bb0:
 // CHECK: "foo"() {bar: tensor<*xf32>} : () -> ()
   "foo"(){bar: tensor<*xf32>} : () -> ()
   return
 }
 
-// CHECK-LABEL: cfgfunc @stringquote
-cfgfunc @stringquote() -> () {
+// CHECK-LABEL: func @stringquote
+func @stringquote() -> () {
 ^bb0:
   // CHECK: "foo"() {bar: "a\22quoted\22string"} : () -> ()
   "foo"(){bar: "a\"quoted\"string"} : () -> ()
   return
 }
 
-// CHECK-LABEL: cfgfunc @floatAttrs
-cfgfunc @floatAttrs() -> () {
+// CHECK-LABEL: func @floatAttrs
+func @floatAttrs() -> () {
 ^bb0:
   // CHECK: "foo"() {a: 4.000000e+00, b: 2.000000e+00, c: 7.100000e+00, d: -0.000000e+00} : () -> ()
   "foo"(){a: 4.0, b: 2.0, c: 7.1, d: -0.0} : () -> ()
   return
 }
 
-// CHECK-LABEL: extfunc @extfuncattr
-extfunc @extfuncattr() -> ()
+// CHECK-LABEL: func @externalfuncattr
+func @externalfuncattr() -> ()
   // CHECK: attributes {a: "a\22quoted\22string", b: 4.000000e+00, c: tensor<*xf32>}
   attributes {a: "a\"quoted\"string", b: 4.0, c: tensor<*xf32>}
 
-// CHECK-LABEL: extfunc @extfuncattrempty
-extfunc @extfuncattrempty() -> ()
+// CHECK-LABEL: func @funcattrempty
+func @funcattrempty() -> ()
   // CHECK-EMPTY
   attributes {}
 
-// CHECK-LABEL: cfgfunc @cfgfuncattr
-cfgfunc @cfgfuncattr() -> ()
+// CHECK-LABEL: func @funcattr
+func @funcattr() -> ()
   // CHECK: attributes {a: "a\22quoted\22string", b: 4.000000e+00, c: tensor<*xf32>}
   attributes {a: "a\"quoted\"string", b: 4.0, c: tensor<*xf32>} {
 ^bb0:
   return
 }
 
-// CHECK-LABEL: cfgfunc @cfgfuncattrempty
-cfgfunc @cfgfuncattrempty() -> ()
+// CHECK-LABEL: func @funcattrwithblock
+func @funcattrwithblock() -> ()
   // CHECK-EMPTY
   attributes {} {
 ^bb0:
   return
 }
 
-// CHECK-LABEL: mlfunc @mlfuncattr
-mlfunc @mlfuncattr() -> ()
-  // CHECK: attributes {a: "a\22quoted\22string", b: 4.000000e+00, c: tensor<*xf32>}
-  attributes {a: "a\"quoted\"string", b: 4.0, c: tensor<*xf32>} {
-  return
-}
-
-// CHECK-LABEL: mlfunc @mlfuncattrempty
-mlfunc @mlfuncattrempty() -> ()
-  // CHECK-EMPTY
-  attributes {} {
-  return
-}
-
-// CHECK-label mlfunc @mlfuncsimplemap
+// CHECK-label func @funcsimplemap
 #map_simple0 = ()[] -> (10)
 #map_simple1 = ()[s0] -> (s0)
 #map_non_simple0 = (d0)[] -> (d0)
 #map_non_simple1 = (d0)[s0] -> (d0 + s0)
 #map_non_simple2 = ()[s0, s1] -> (s0 + s1)
 #map_non_simple3 = ()[s0] -> (s0 + 3)
-mlfunc @mlfuncsimplemap(%arg0: index, %arg1: index) -> () {
+func @funcsimplemap(%arg0: index, %arg1: index) -> () {
   for %i0 = 0 to #map_simple0()[] {
   // CHECK: for %i0 = 0 to 10 {
     for %i1 = 0 to #map_simple1()[%arg1] {
@@ -536,8 +515,8 @@ mlfunc @mlfuncsimplemap(%arg0: index, %arg1: index) -> () {
   return
 }
 
-// CHECK-LABEL: cfgfunc @splattensorattr
-cfgfunc @splattensorattr() -> () {
+// CHECK-LABEL: func @splattensorattr
+func @splattensorattr() -> () {
 ^bb0:
 // CHECK: "splatIntTensor"() {bar: splat<tensor<2x1x4xi32>, 5>} : () -> ()
   "splatIntTensor"(){bar: splat<tensor<2x1x4xi32>, 5>} : () -> ()
@@ -550,8 +529,8 @@ cfgfunc @splattensorattr() -> () {
   return
 }
 
-// CHECK-LABEL: cfgfunc @opaquetensorattr
-cfgfunc @opaquetensorattr() -> () {
+// CHECK-LABEL: func @opaquetensorattr
+func @opaquetensorattr() -> () {
 ^bb0:
 // CHECK: "opaqueIntTensor"() {bar: opaque<tensor<2x1x4xi32>, "0x68656C6C6F">} : () -> ()
   "opaqueIntTensor"(){bar: opaque<tensor<2x1x4xi32>, "0x68656C6C6F">} : () -> ()
@@ -565,8 +544,8 @@ cfgfunc @opaquetensorattr() -> () {
   return
 }
 
-// CHECK-LABEL: cfgfunc @densetensorattr
-cfgfunc @densetensorattr() -> () {
+// CHECK-LABEL: func @densetensorattr
+func @densetensorattr() -> () {
 ^bb0:
 
 // NOTE: The {{\[\[}} syntax is because "[[" confuses FileCheck.
@@ -620,8 +599,8 @@ cfgfunc @densetensorattr() -> () {
   return
 }
 
-// CHECK-LABEL: cfgfunc @densevectorattr
-cfgfunc @densevectorattr() -> () {
+// CHECK-LABEL: func @densevectorattr
+func @densevectorattr() -> () {
 ^bb0:
 // NOTE: The {{\[\[}} syntax is because "[[" confuses FileCheck.
 // CHECK: "fooi8"() {bar: dense<vector<1x1x1xi8>, {{\[\[\[}}5]]]>} : () -> ()
@@ -658,8 +637,8 @@ cfgfunc @densevectorattr() -> () {
   return
 }
 
-// CHECK-LABEL: cfgfunc @sparsetensorattr
-cfgfunc @sparsetensorattr() -> () {
+// CHECK-LABEL: func @sparsetensorattr
+func @sparsetensorattr() -> () {
 ^bb0:
 // NOTE: The {{\[\[}} syntax is because "[[" confuses FileCheck.
 // CHECK: "fooi8"() {bar: sparse<tensor<1x1x1xi8>, {{\[\[}}0, 0, 0]], {{\[}}-2]>} : () -> ()
@@ -686,8 +665,8 @@ cfgfunc @sparsetensorattr() -> () {
   return
 }
 
-// CHECK-LABEL: cfgfunc @sparsevectorattr
-cfgfunc @sparsevectorattr() -> () {
+// CHECK-LABEL: func @sparsevectorattr
+func @sparsevectorattr() -> () {
 ^bb0:
 // NOTE: The {{\[\[}} syntax is because "[[" confuses FileCheck.
 // CHECK: "fooi8"() {bar: sparse<vector<1x1x1xi8>, {{\[\[}}0, 0, 0]], {{\[}}-2]>} : () -> ()
@@ -714,8 +693,8 @@ cfgfunc @sparsevectorattr() -> () {
   return
 }
 
-// CHECK-LABEL: mlfunc @loops_with_blockids() {
-mlfunc @loops_with_blockids() {
+// CHECK-LABEL: func @loops_with_blockids() {
+func @loops_with_blockids() {
 ^block0:
   for %i = 1 to 100 step 2 {
   ^block1:
index c258ef13fce017500bb8825d96cf03868c638566..38915b7a2e7e6078d5833381d3095833195fb923 100755 (executable)
@@ -1,6 +1,6 @@
 // RUN: mlir-opt %s | FileCheck %s
 
-cfgfunc @testType(tensor<1x224x224x3xf32>) -> tensor<96xf32> {
+func @testType(tensor<1x224x224x3xf32>) -> tensor<96xf32> {
 ^bb0(%arg0: tensor<1x224x224x3xf32>):
   %1  = "constant"() {value: splat<tensor<1xf32>, 0.1>} : () -> (tensor<1xf32>)
   %2  = "constant"() {value: splat<tensor<2xf32>, 0.1>} : () -> (tensor<2xf32>)
index b5335db20824487c27c84ff1bc466c6ea2c8cf3d..9c15e2ee964666b401403230cdc55476f8360854 100644 (file)
 // CHECK-LABEL: define void @empty() {
 // CHECK-NEXT:    ret void
 // CHECK-NEXT:  }
-cfgfunc @empty() {
+func @empty() {
 ^bb0:
   return
 }
 
 // CHECK-LABEL: declare void @body(i64)
-extfunc @body(index)
+func @body(index)
 
 
 // CHECK-LABEL: define void @simple_loop() {
-cfgfunc @simple_loop() {
+func @simple_loop() {
 ^bb0:
 // CHECK: br label %[[SIMPLE_bb1:[0-9]+]]
   br ^bb1
@@ -67,13 +67,13 @@ cfgfunc @simple_loop() {
 // CHECK-NEXT:   call void @simple_loop()
 // CHECK-NEXT:   ret void
 // CHECK-NEXT: }
-cfgfunc @simple_caller() {
+func @simple_caller() {
 ^bb0:
   call @simple_loop() : () -> ()
   return
 }
 
-//cfgfunc @simple_indirect_caller() {
+//func @simple_indirect_caller() {
 //^bb0:
 //  %f = constant @simple_loop : () -> ()
 //  call_indirect %f() : () -> ()
@@ -85,7 +85,7 @@ cfgfunc @simple_caller() {
 // CHECK-NEXT:   call void @more_imperfectly_nested_loops()
 // CHECK-NEXT:   ret void
 // CHECK-NEXT: }
-cfgfunc @ml_caller() {
+func @ml_caller() {
 ^bb0:
   call @simple_loop() : () -> ()
   call @more_imperfectly_nested_loops() : () -> ()
@@ -93,13 +93,13 @@ cfgfunc @ml_caller() {
 }
 
 // CHECK-LABEL: declare i64 @body_args(i64)
-extfunc @body_args(index) -> index
+func @body_args(index) -> index
 // CHECK-LABEL: declare i32 @other(i64, i32)
-extfunc @other(index, i32) -> i32
+func @other(index, i32) -> i32
 
-// CHECK-LABEL: define i32 @mlfunc_args(i32, i32) {
+// CHECK-LABEL: define i32 @func_args(i32, i32) {
 // CHECK-NEXT: br label %[[ARGS_bb1:[0-9]+]]
-cfgfunc @mlfunc_args(i32, i32) -> i32 {
+func @func_args(i32, i32) -> i32 {
 ^bb0(%arg0: i32, %arg1: i32):
   %c0_i32 = constant 0 : i32
   br ^bb1
@@ -145,17 +145,17 @@ cfgfunc @mlfunc_args(i32, i32) -> i32 {
 }
 
 // CHECK: declare void @pre(i64)
-extfunc @pre(index)
+func @pre(index)
 
 // CHECK: declare void @body2(i64, i64)
-extfunc @body2(index, index)
+func @body2(index, index)
 
 // CHECK: declare void @post(i64)
-extfunc @post(index)
+func @post(index)
 
 // CHECK-LABEL: define void @imperfectly_nested_loops() {
 // CHECK-NEXT:   br label %[[IMPER_bb1:[0-9]+]]
-cfgfunc @imperfectly_nested_loops() {
+func @imperfectly_nested_loops() {
 ^bb0:
   br ^bb1
 
@@ -223,10 +223,10 @@ cfgfunc @imperfectly_nested_loops() {
 }
 
 // CHECK: declare void @mid(i64)
-extfunc @mid(index)
+func @mid(index)
 
 // CHECK: declare void @body3(i64, i64)
-extfunc @body3(index, index)
+func @body3(index, index)
 
 // A complete function transformation check.
 // CHECK-LABEL: define void @more_imperfectly_nested_loops() {
@@ -270,7 +270,7 @@ extfunc @body3(index, index)
 // CHECK: ; <label>:21:                                     ; preds = %2
 // CHECK-NEXT:   ret void
 // CHECK-NEXT: }
-cfgfunc @more_imperfectly_nested_loops() {
+func @more_imperfectly_nested_loops() {
 ^bb0:
   br ^bb1
 ^bb1:  // pred: ^bb0
@@ -324,7 +324,7 @@ cfgfunc @more_imperfectly_nested_loops() {
 //
 
 // CHECK-LABEL: define void @memref_alloc()
-cfgfunc @memref_alloc() {
+func @memref_alloc() {
 ^bb0:
 // CHECK-NEXT: %{{[0-9]+}} = call i8* @__mlir_alloc(i64 400)
 // CHECK-NEXT: %{{[0-9]+}} = bitcast i8* %{{[0-9]+}} to float*
@@ -335,10 +335,10 @@ cfgfunc @memref_alloc() {
 }
 
 // CHECK-LABEL: declare i64 @get_index()
-extfunc @get_index() -> index
+func @get_index() -> index
 
 // CHECK-LABEL: define void @store_load_static()
-cfgfunc @store_load_static() {
+func @store_load_static() {
 ^bb0:
 // CHECK-NEXT: %{{[0-9]+}} = call i8* @__mlir_alloc(i64 40)
 // CHECK-NEXT: %{{[0-9]+}} = bitcast i8* %{{[0-9]+}} to float*
@@ -394,7 +394,7 @@ cfgfunc @store_load_static() {
 }
 
 // CHECK-LABEL: define void @store_load_dynamic(i64)
-cfgfunc @store_load_dynamic(index) {
+func @store_load_dynamic(index) {
 ^bb0(%arg0: index):
 // CHECK-NEXT: %{{[0-9]+}} = mul i64 %{{[0-9]+}}, 4
 // CHECK-NEXT: %{{[0-9]+}} = call i8* @__mlir_alloc(i64 %{{[0-9]+}})
@@ -453,7 +453,7 @@ cfgfunc @store_load_dynamic(index) {
 }
 
 // CHECK-LABEL: define void @store_load_mixed(i64)
-cfgfunc @store_load_mixed(index) {
+func @store_load_mixed(index) {
 ^bb0(%arg0: index):
   %c10 = constant 10 : index
 // CHECK-NEXT: %{{[0-9]+}} = mul i64 2, %{{[0-9]+}}
@@ -503,7 +503,7 @@ cfgfunc @store_load_mixed(index) {
 }
 
 // CHECK-LABEL: define { float*, i64 } @memref_args_rets({ float* }, { float*, i64 }, { float*, i64 }) {
-cfgfunc @memref_args_rets(memref<10xf32>, memref<?xf32>, memref<10x?xf32>) -> memref<10x?xf32> {
+func @memref_args_rets(memref<10xf32>, memref<?xf32>, memref<10x?xf32>) -> memref<10x?xf32> {
 ^bb0(%arg0: memref<10xf32>, %arg1: memref<?xf32>, %arg2: memref<10x?xf32>):
   %c7 = constant 7 : index
 // CHECK-NEXT: %{{[0-9]+}} = call i64 @get_index()
@@ -538,7 +538,7 @@ cfgfunc @memref_args_rets(memref<10xf32>, memref<?xf32>, memref<10x?xf32>) -> me
 
 
 // CHECK-LABEL: define i64 @memref_dim({ float*, i64, i64 })
-cfgfunc @memref_dim(memref<42x?x10x?xf32>) -> index {
+func @memref_dim(memref<42x?x10x?xf32>) -> index {
 ^bb0(%arg0: memref<42x?x10x?xf32>):
 // Expecting this to create an LLVM constant.
   %d0 = dim %arg0, 0 : memref<42x?x10x?xf32>
@@ -560,12 +560,12 @@ cfgfunc @memref_dim(memref<42x?x10x?xf32>) -> index {
   return %d0123 : index
 }
 
-extfunc @get_i64() -> (i64)
-extfunc @get_f32() -> (f32)
-extfunc @get_memref() -> (memref<42x?x10x?xf32>)
+func @get_i64() -> (i64)
+func @get_f32() -> (f32)
+func @get_memref() -> (memref<42x?x10x?xf32>)
 
 // CHECK-LABEL: define { i64, float, { float*, i64, i64 } } @multireturn() {
-cfgfunc @multireturn() -> (i64, f32, memref<42x?x10x?xf32>) {
+func @multireturn() -> (i64, f32, memref<42x?x10x?xf32>) {
 ^bb0:
   %0 = call @get_i64() : () -> (i64)
   %1 = call @get_f32() : () -> (f32)
@@ -579,7 +579,7 @@ cfgfunc @multireturn() -> (i64, f32, memref<42x?x10x?xf32>) {
 
 
 // CHECK-LABEL: define void @multireturn_caller() {
-cfgfunc @multireturn_caller() {
+func @multireturn_caller() {
 ^bb0:
 // CHECK-NEXT:   %1 = call { i64, float, { float*, i64, i64 } } @multireturn()
 // CHECK-NEXT:   [[ret0:%[0-9]+]] = extractvalue { i64, float, { float*, i64, i64 } } %1, 0
@@ -602,7 +602,7 @@ cfgfunc @multireturn_caller() {
 // CHECK-NEXT:    %2 = fadd <4 x float> %0, <float 4.200000e+01, float 4.200000e+01, float 4.200000e+01, float 4.200000e+01>
 // CHECK-NEXT:    ret <4 x float> %2
 // CHECK-NEXT:  }
-cfgfunc @vector_ops(vector<4xf32>) -> vector<4xf32> {
+func @vector_ops(vector<4xf32>) -> vector<4xf32> {
 ^bb0(%arg0: vector<4xf32>):
   %0 = constant splat<vector<4xf32>, 42.> : vector<4xf32>
   %1 = addf %arg0, %0 : vector<4xf32>
@@ -610,7 +610,7 @@ cfgfunc @vector_ops(vector<4xf32>) -> vector<4xf32> {
 }
 
 // CHECK-LABEL: @ops
-cfgfunc @ops(f32, f32, i32, i32) -> (f32, i32) {
+func @ops(f32, f32, i32, i32) -> (f32, i32) {
 ^bb0(%arg0: f32, %arg1: f32, %arg2: i32, %arg3: i32):
 // CHECK-NEXT: fsub float %0, %1
   %0 = subf %arg0, %arg1: f32
index 7dfea83786ba3808b989e8ab5259c37a0a98e28c..c482c1f07b2d092b65a1b9001e111fa8297ff344 100644 (file)
@@ -9,48 +9,48 @@
 // will produce the sequence of compositions: f, g(f), h(g(f)) and print the
 // AffineMap h(g(f)), which is what FileCheck checks against.
 
-mlfunc @simple1() {
+func @simple1() {
   // CHECK: Composed map: (d0) -> (d0)
   "test_affine_map"() { affine_map: (d0) -> (d0 - 1) } : () -> ()
   "test_affine_map"() { affine_map: (d0) -> (d0 + 1) } : () -> ()
   return
 }
 
-mlfunc @simple2() {
+func @simple2() {
   // CHECK: Composed map: (d0)[s0] -> (d0)
   "test_affine_map"() { affine_map: (d0)[s0] -> (d0 + s0 - 1) } : () -> ()
   "test_affine_map"() { affine_map: (d0)[s0] -> (d0 - s0 + 1) } : () -> ()
   return
 }
 
-mlfunc @simple3a() {
+func @simple3a() {
   // CHECK: Composed map: (d0, d1)[s0, s1] -> ((d0 ceildiv s0) * s0, (d1 ceildiv s1) * s1)
   "test_affine_map"() { affine_map: (d0, d1)[s0, s1] -> (d0 ceildiv s0, d1 ceildiv s1) } : () -> ()
   "test_affine_map"() { affine_map: (d0, d1)[s0, s1] -> (d0 * s0, d1 * s1) } : () -> ()
   return
 }
 
-mlfunc @simple3b() {
+func @simple3b() {
   // CHECK: Composed map: (d0, d1)[s0, s1] -> (d0 mod s0, d1 mod s1)
   "test_affine_map"() { affine_map: (d0, d1)[s0, s1] -> (d0 mod s0, d1 mod s1) } : () -> ()
   return
 }
 
-mlfunc @simple3c() {
+func @simple3c() {
   // CHECK: Composed map: (d0, d1)[s0, s1, s2, s3] -> ((d0 ceildiv s0) * s0 + d0 mod s2, (d1 ceildiv s1) * s1 + d1 mod s3)
   "test_affine_map"() { affine_map: (d0, d1)[s0, s1] -> ((d0 ceildiv s0) * s0, (d1 ceildiv s1) * s1, d0, d1) } : () -> ()
   "test_affine_map"() { affine_map: (d0, d1, d2, d3)[s0, s1, s2, s3] -> (d0 + d2 mod s2, d1 + d3 mod s3) } : () -> ()
   return
 }
 
-mlfunc @simple4() {
+func @simple4() {
   // CHECK: Composed map: (d0, d1)[s0, s1] -> (d1 * s1, d0 ceildiv s0)
   "test_affine_map"() { affine_map: (d0, d1) -> (d1, d0) } : () -> ()
   "test_affine_map"() { affine_map: (d0, d1)[s0, s1] -> (d0 * s1, d1 ceildiv s0) } : () -> ()
   return
 }
 
-mlfunc @simple5a() {
+func @simple5a() {
   // CHECK: Composed map: (d0) -> (d0 * 3 + 18)
   "test_affine_map"() { affine_map: (d0) -> (d0 - 1) } : () -> ()
   "test_affine_map"() { affine_map: (d0) -> (d0 + 7) } : () -> ()
@@ -59,7 +59,7 @@ mlfunc @simple5a() {
   return
 }
 
-mlfunc @simple5b() {
+func @simple5b() {
   // CHECK: Composed map: (d0) -> ((d0 + 6) ceildiv 2)
   "test_affine_map"() { affine_map: (d0) -> (d0 - 1) } : () -> ()
   "test_affine_map"() { affine_map: (d0) -> (d0 + 7) } : () -> ()
@@ -68,7 +68,7 @@ mlfunc @simple5b() {
   return
 }
 
-mlfunc @simple5c() {
+func @simple5c() {
   // CHECK: Composed map: (d0) -> (d0 * 8 + 48)
   "test_affine_map"() { affine_map: (d0) -> (d0 - 1) } : () -> ()
   "test_affine_map"() { affine_map: (d0) -> (d0 + 7) } : () -> ()
@@ -77,7 +77,7 @@ mlfunc @simple5c() {
   return
 }
 
-mlfunc @simple5d() {
+func @simple5d() {
   // CHECK: Composed map: (d0) -> ((d0 * 4 + 24) floordiv 3)
   "test_affine_map"() { affine_map: (d0) -> (d0 - 1) } : () -> ()
   "test_affine_map"() { affine_map: (d0) -> (d0 + 7) } : () -> ()
@@ -86,7 +86,7 @@ mlfunc @simple5d() {
   return
 }
 
-mlfunc @simple5e() {
+func @simple5e() {
   // CHECK: Composed map: (d0) -> ((d0 + 6) ceildiv 8)
   "test_affine_map"() { affine_map: (d0) -> (d0 - 1) } : () -> ()
   "test_affine_map"() { affine_map: (d0) -> (d0 + 7) } : () -> ()
@@ -94,7 +94,7 @@ mlfunc @simple5e() {
   return
 }
 
-mlfunc @simple5f() {
+func @simple5f() {
   // CHECK: Composed map: (d0) -> ((d0 * 4 - 4) floordiv 3)
   "test_affine_map"() { affine_map: (d0) -> (d0 - 1) } : () -> ()
   "test_affine_map"() { affine_map: (d0) -> (d0 * 4) } : () -> ()
@@ -102,14 +102,14 @@ mlfunc @simple5f() {
   return
 }
 
-mlfunc @perm_and_proj() {
+func @perm_and_proj() {
   // CHECK: Composed map: (d0, d1, d2, d3) -> (d1, d3, d0)
   "test_affine_map"() { affine_map: (d0, d1, d2, d3) -> (d3, d1, d2, d0) } : () -> ()
   "test_affine_map"() { affine_map: (d0, d1, d2, d3) -> (d1, d0, d3) } : () -> ()
   return
 }
 
-mlfunc @symbols1() {
+func @symbols1() {
   // CHECK: Composed map: (d0)[s0] -> (d0 + s0 + 1, d0 - s0 - 1)
   "test_affine_map"() { affine_map: (d0)[s0] -> (d0 + s0, d0 - s0) } : () -> ()
   "test_affine_map"() { affine_map: (d0, d1) -> (d0 + 1, d1 - 1) } : () -> ()
index 223f5ebff5e69bb48e765fca53b77606a1b30a42..5b39cbc5276ea42edc628049fd3e48d91ef5ea92 100644 (file)
@@ -2,8 +2,8 @@
 
 // CHECK: #[[ADD:map[0-9]+]] = (d0, d1) -> (d0 + d1)
 // CHECK: #[[SUB:map[0-9]+]] = (d0, d1) -> (d0 - d1)
-// CHECK-LABEL: mlfunc @materialize_read(%arg0: index, %arg1: index, %arg2: index, %arg3: index) {
-mlfunc @materialize_read(%M: index, %N: index, %O: index, %P: index) {
+// CHECK-LABEL: func @materialize_read(%arg0: index, %arg1: index, %arg2: index, %arg3: index) {
+func @materialize_read(%M: index, %N: index, %O: index, %P: index) {
   // CHECK-NEXT:  %0 = alloc(%arg0, %arg1, %arg2, %arg3) : memref<?x?x?x?xf32>
   // CHECK-NEXT:  for %i0 = 0 to %arg0 step 3 {
   // CHECK-NEXT:    for %i1 = 0 to %arg1 {
@@ -62,8 +62,8 @@ mlfunc @materialize_read(%M: index, %N: index, %O: index, %P: index) {
   return
 }
 
-// CHECK-LABEL:mlfunc @materialize_write(%arg0: index, %arg1: index, %arg2: index, %arg3: index) {
-mlfunc @materialize_write(%M: index, %N: index, %O: index, %P: index) {
+// CHECK-LABEL:func @materialize_write(%arg0: index, %arg1: index, %arg2: index, %arg3: index) {
+func @materialize_write(%M: index, %N: index, %O: index, %P: index) {
   // CHECK-NEXT:  %0 = alloc(%arg0, %arg1, %arg2, %arg3) : memref<?x?x?x?xf32>
   // CHECK-NEXT:  %cst = constant splat<vector<5x4x3xf32>, 1.000000e+00> : vector<5x4x3xf32>
   // CHECK-NEXT:  for %i0 = 0 to %arg0 step 3 {
index 0bc0efedfdfddafb2705f3670a3082cfa8d34619..a0b808e2541cc512f65ffedf8b228dc4f8998f72 100644 (file)
@@ -6,7 +6,7 @@
 // CHECK-DAG: #[[map_instance_3:map[0-9]+]] = (d0, d1, d2, d3) -> (d0, d1 + 3, d2, d3)
 // CHECK-DAG: #[[map_proj_d0d1d2d3d4_d1d0:map[0-9]+]] = (d0, d1, d2, d3) -> (d1, d0)
 
-mlfunc @materialize(%M : index, %N : index, %O : index, %P : index) {
+func @materialize(%M : index, %N : index, %O : index, %P : index) {
   %A = alloc (%M, %N, %O, %P) : memref<?x?x?x?xf32, 0>
   %f1 = constant splat<vector<4x4x4xf32>, 1.000000e+00> : vector<4x4x4xf32>
   // CHECK:  for %i0 = 0 to %arg0 step 4 {
index c55e500dcd1986e883982d0ced385da8226465e8..8837aa947445e5c5c09b874d128cb0ad49d8a40e 100644 (file)
@@ -8,7 +8,7 @@
 // CHECK-DAG: [[MAP1:#.*]] = (d0, d1) -> (d0, d1 + 8)
 // CHECK-DAG: [[MAP2:#.*]] = (d0, d1) -> (d0, d1 + 16)
 // CHECK-DAG: [[MAP3:#.*]] = (d0, d1) -> (d0, d1 + 24)
-mlfunc @vector_add_2d(%M : index, %N : index) -> f32 {
+func @vector_add_2d(%M : index, %N : index) -> f32 {
   %A = alloc (%M, %N) : memref<?x?xf32, 0>
   %B = alloc (%M, %N) : memref<?x?xf32, 0>
   %C = alloc (%M, %N) : memref<?x?xf32, 0>
index c4bdaf8abc5fdd7dfed420075c86093e6b22e633..6503b46b73b4391773423397857f23400cae083b 100644 (file)
@@ -10,7 +10,7 @@
 // CHECK-DAG: [[MAP3:#.*]] = (d0, d1) -> (d0 + 1, d1 + 8)
 // CHECK-DAG: [[MAP4:#.*]] = (d0, d1) -> (d0 + 2, d1)
 // CHECK-DAG: [[MAP5:#.*]] = (d0, d1) -> (d0 + 2, d1 + 8)
-mlfunc @vector_add_2d(%M : index, %N : index) -> f32 {
+func @vector_add_2d(%M : index, %N : index) -> f32 {
   %A = alloc (%M, %N) : memref<?x?xf32, 0>
   %B = alloc (%M, %N) : memref<?x?xf32, 0>
   %C = alloc (%M, %N) : memref<?x?xf32, 0>
index b1a9cc78dc4bcbc49b490a720c109792a94d7c6f..6d348c2e2c3ebeaca323c97485939a2ce45f03fe 100644 (file)
@@ -5,7 +5,7 @@
 
 // vector<3x32xf32> -> vector<3x16xf32>
 // CHECK-DAG: [[MAP1:#.*]] = (d0, d1) -> (d0, d1 + 16)
-mlfunc @vector_add_2d(%M : index, %N : index) -> f32 {
+func @vector_add_2d(%M : index, %N : index) -> f32 {
   %A = alloc (%M, %N) : memref<?x?xf32, 0>
   %B = alloc (%M, %N) : memref<?x?xf32, 0>
   %C = alloc (%M, %N) : memref<?x?xf32, 0>
index 2cfa7af88cd21036865535fb9d9ebb41e9b697a9..06aacf50b48e1690049722a1a90dcefefdeab1f3 100644 (file)
@@ -1,7 +1,7 @@
 // RUN: mlir-opt %s -vectorizer-test -vector-shape-ratio 4 -vector-shape-ratio 8 | FileCheck %s
 // RUN: mlir-opt %s -vectorizer-test -vector-shape-ratio 2 -vector-shape-ratio 5 -vector-shape-ratio 2 | FileCheck %s -check-prefix=TEST-3x4x5x8
 
-mlfunc @vector_add_2d(%arg0: index, %arg1: index) -> f32 {
+func @vector_add_2d(%arg0: index, %arg1: index) -> f32 {
   // Nothing should be matched in this first block.
   // CHECK-NOT:matched: {{.*}} = alloc{{.*}}
   // CHECK-NOT:matched: {{.*}} = constant 0{{.*}}
index 6b700ef0c60081c0accbf8a9069040bd45a4bc4e..8918a16f8bc60006cddfff686013427659843083 100644 (file)
@@ -16,7 +16,7 @@
 #set0 = (i) : (i >= 0)
 
 // Maps introduced to vectorize fastest varying memory index.
-mlfunc @vec1d(%A : memref<?x?xf32>, %B : memref<?x?x?xf32>) {
+func @vec1d(%A : memref<?x?xf32>, %B : memref<?x?x?xf32>) {
 // CHECK-DAG: [[C0:%[a-z0-9_]+]] = constant 0 : index
 // CHECK-DAG: [[ARG_M:%[0-9]+]] = dim %arg0, 0 : memref<?x?xf32>
 // CHECK-DAG: [[ARG_N:%[0-9]+]] = dim %arg0, 1 : memref<?x?xf32>
@@ -129,7 +129,7 @@ mlfunc @vec1d(%A : memref<?x?xf32>, %B : memref<?x?x?xf32>) {
    return
 }
 
-mlfunc @vector_add_2d(%M : index, %N : index) -> f32 {
+func @vector_add_2d(%M : index, %N : index) -> f32 {
   %A = alloc (%M, %N) : memref<?x?xf32, 0>
   %B = alloc (%M, %N) : memref<?x?xf32, 0>
   %C = alloc (%M, %N) : memref<?x?xf32, 0>
@@ -182,7 +182,7 @@ mlfunc @vector_add_2d(%M : index, %N : index) -> f32 {
 
 // This should not vectorize and should not crash.
 // CHECK-LABEL: @vec_rejected
-mlfunc @vec_rejected(%A : memref<?x?xf32>, %C : memref<?x?xf32>) {
+func @vec_rejected(%A : memref<?x?xf32>, %C : memref<?x?xf32>) {
   %N = dim %A, 0 : memref<?x?xf32>
   for %i = 0 to %N {
 // CHECK-NOT: vector
index f47af37976573d857881a87bd109072aafcedcdf..d847f6bb5cebbea08cf93a2e068b84a2e716e372 100644 (file)
@@ -3,7 +3,7 @@
 // Permutation maps used in vectorization.
 // CHECK: #[[map_proj_d0d1_d0d1:map[0-9]+]] = (d0, d1) -> (d0, d1)
 
-mlfunc @vec2d(%A : memref<?x?x?xf32>) {
+func @vec2d(%A : memref<?x?x?xf32>) {
    %M = dim %A, 0 : memref<?x?x?xf32>
    %N = dim %A, 1 : memref<?x?x?xf32>
    %P = dim %A, 2 : memref<?x?x?xf32>
@@ -37,7 +37,7 @@ mlfunc @vec2d(%A : memref<?x?x?xf32>) {
    return
 }
 
-mlfunc @vector_add_2d(%M : index, %N : index) -> f32 {
+func @vector_add_2d(%M : index, %N : index) -> f32 {
   %A = alloc (%M, %N) : memref<?x?xf32, 0>
   %B = alloc (%M, %N) : memref<?x?xf32, 0>
   %C = alloc (%M, %N) : memref<?x?xf32, 0>
index 5864984dab2a054f3cedb52ca7c3e05b098a4b2c..1a6bee585ee609e95ccc243f5b248963bdbc5558 100644 (file)
@@ -3,7 +3,7 @@
 // Permutation maps used in vectorization.
 // CHECK: #[[map_proj_d0d1d2_d0d1d2:map[0-9]+]] = (d0, d1, d2) -> (d0, d1, d2)
 
-mlfunc @vec3d(%A : memref<?x?x?xf32>) {
+func @vec3d(%A : memref<?x?x?xf32>) {
    %0 = dim %A, 0 : memref<?x?x?xf32>
    %1 = dim %A, 1 : memref<?x?x?xf32>
    %2 = dim %A, 2 : memref<?x?x?xf32>
index 486cb2a89ed7dc52f587954df4e6188af3b2b68a..4654ab810dfee502959c854b670e749c7217b9a5 100644 (file)
@@ -3,7 +3,7 @@
 // Permutation maps used in vectorization.
 // CHECK: #[[map_proj_d0d1d2_d0d2:map[0-9]+]] = (d0, d1, d2) -> (d0, d2)
 
-mlfunc @vec2d(%A : memref<?x?x?xf32>) {
+func @vec2d(%A : memref<?x?x?xf32>) {
    %M = dim %A, 0 : memref<?x?x?xf32>
    %N = dim %A, 1 : memref<?x?x?xf32>
    %P = dim %A, 2 : memref<?x?x?xf32>
index 8c05d282cd6f991361f00200ece48542bf1d7a55..0eebf8165357d075f71e6932641b46acd3524fd3 100644 (file)
@@ -3,7 +3,7 @@
 // Permutation maps used in vectorization.
 // CHECK: #[[map_proj_d0d1d2_d2d0:map[0-9]+]] = (d0, d1, d2) -> (d2, d0)
 
-mlfunc @vec2d(%A : memref<?x?x?xf32>) {
+func @vec2d(%A : memref<?x?x?xf32>) {
    %M = dim %A, 0 : memref<?x?x?xf32>
    %N = dim %A, 1 : memref<?x?x?xf32>
    %P = dim %A, 2 : memref<?x?x?xf32>
@@ -33,7 +33,7 @@ mlfunc @vec2d(%A : memref<?x?x?xf32>) {
    return
 }
 
-mlfunc @vec2d_imperfectly_nested(%A : memref<?x?x?xf32>) {
+func @vec2d_imperfectly_nested(%A : memref<?x?x?xf32>) {
    %0 = dim %A, 0 : memref<?x?x?xf32>
    %1 = dim %A, 1 : memref<?x?x?xf32>
    %2 = dim %A, 2 : memref<?x?x?xf32>
index bc82a0e8042e2da61ba9b7edeafa003cdaa39a90..1ba563b3442ab0c8c79f89e81e5ab45d2add2466 100644 (file)
@@ -3,7 +3,7 @@
 // Permutation maps used in vectorization.
 // CHECK-DAG: #[[map_proj_d0d1d2_d2d1:map[0-9]+]] = (d0, d1, d2) -> (d2, d1)
 
-mlfunc @vec2d(%A : memref<?x?x?xf32>) {
+func @vec2d(%A : memref<?x?x?xf32>) {
    %M = dim %A, 0 : memref<?x?x?xf32>
    %N = dim %A, 1 : memref<?x?x?xf32>
    %P = dim %A, 2 : memref<?x?x?xf32>
@@ -33,7 +33,7 @@ mlfunc @vec2d(%A : memref<?x?x?xf32>) {
    return
 }
 
-mlfunc @vec2d_imperfectly_nested(%A : memref<?x?x?xf32>) {
+func @vec2d_imperfectly_nested(%A : memref<?x?x?xf32>) {
    %0 = dim %A, 0 : memref<?x?x?xf32>
    %1 = dim %A, 1 : memref<?x?x?xf32>
    %2 = dim %A, 2 : memref<?x?x?xf32>
index 1c7d147c5a257774f45d06fa1bd5a9c5803705d8..90b0b0cc1107985e2fb80faf177d549da2800d71 100644 (file)
@@ -1,23 +1,23 @@
 // RUN: mlir-opt %s -canonicalize | FileCheck %s
 
-// CHECK-LABEL: mlfunc @test_subi_zero
-mlfunc @test_subi_zero(%arg0: i32) -> i32 {
+// CHECK-LABEL: func @test_subi_zero
+func @test_subi_zero(%arg0: i32) -> i32 {
   // CHECK-NEXT: %c0_i32 = constant 0 : i32
   // CHECK-NEXT: return %c0
   %y = subi %arg0, %arg0 : i32
   return %y: i32
 }
 
-// CHECK-LABEL: cfgfunc @test_subi_zero_cfg(%arg0: i32)
-cfgfunc @test_subi_zero_cfg(%arg0: i32) -> i32 {
+// CHECK-LABEL: func @test_subi_zero_cfg(%arg0: i32)
+func @test_subi_zero_cfg(%arg0: i32) -> i32 {
   // CHECK-NEXT: %c0_i32 = constant 0 : i32
   // CHECK-NEXT: return %c0
   %y = subi %arg0, %arg0 : i32
   return %y: i32
 }
 
-// CHECK-LABEL: mlfunc @dim
-mlfunc @dim(%arg0: tensor<8x4xf32>) -> index {
+// CHECK-LABEL: func @dim
+func @dim(%arg0: tensor<8x4xf32>) -> index {
 
   // CHECK: %c4 = constant 4 : index
   %0 = dim %arg0, 1 : tensor<8x4xf32>
@@ -26,8 +26,8 @@ mlfunc @dim(%arg0: tensor<8x4xf32>) -> index {
   return %0 : index
 }
 
-// CHECK-LABEL: mlfunc @test_commutative
-mlfunc @test_commutative(%arg0: i32) -> (i32, i32) {
+// CHECK-LABEL: func @test_commutative
+func @test_commutative(%arg0: i32) -> (i32, i32) {
   // CHECK: %c42_i32 = constant 42 : i32
   %c42_i32 = constant 42 : i32
   // CHECK-NEXT: %0 = addi %arg0, %c42_i32 : i32
@@ -41,63 +41,63 @@ mlfunc @test_commutative(%arg0: i32) -> (i32, i32) {
   return %y, %z: i32, i32
 }
 
-// CHECK-LABEL: mlfunc @trivial_dce
-mlfunc @trivial_dce(%arg0: tensor<8x4xf32>) {
+// CHECK-LABEL: func @trivial_dce
+func @trivial_dce(%arg0: tensor<8x4xf32>) {
   %0 = dim %arg0, 1 : tensor<8x4xf32>
   // CHECK-NEXT: return
   return
 }
 
-// CHECK-LABEL: mlfunc @addi_zero
-mlfunc @addi_zero(%arg0: i32) -> i32 {
+// CHECK-LABEL: func @addi_zero
+func @addi_zero(%arg0: i32) -> i32 {
   // CHECK-NEXT: return %arg0
   %c0_i32 = constant 0 : i32
   %y = addi %c0_i32, %arg0 : i32
   return %y: i32
 }
 
-// CHECK-LABEL: mlfunc @addi_zero_vector
-mlfunc @addi_zero_vector(%arg0: vector<4 x i32>) -> vector<4 x i32> {
+// CHECK-LABEL: func @addi_zero_vector
+func @addi_zero_vector(%arg0: vector<4 x i32>) -> vector<4 x i32> {
   // CHECK-NEXT: return %arg0
   %c0_v4i32 = constant splat<vector<4 x i32>, 0> : vector<4 x i32>
   %y = addi %c0_v4i32, %arg0 : vector<4 x i32>
   return %y: vector<4 x i32>
 }
 
-// CHECK-LABEL: mlfunc @addi_zero_tensor
-mlfunc @addi_zero_tensor(%arg0: tensor<4 x 5 x i32>) -> tensor<4 x 5 x i32> {
+// CHECK-LABEL: func @addi_zero_tensor
+func @addi_zero_tensor(%arg0: tensor<4 x 5 x i32>) -> tensor<4 x 5 x i32> {
   // CHECK-NEXT: return %arg0
   %c0_t45i32 = constant splat<tensor<4 x 5 x i32>, 0> : tensor<4 x 5 x i32>
   %y = addi %arg0, %c0_t45i32 : tensor<4 x 5 x i32>
   return %y: tensor<4 x 5 x i32>
 }
 
-// CHECK-LABEL: mlfunc @muli_one
-mlfunc @muli_one(%arg0: i32) -> i32 {
+// CHECK-LABEL: func @muli_one
+func @muli_one(%arg0: i32) -> i32 {
   // CHECK-NEXT: return %arg0
   %c0_i32 = constant 1 : i32
   %y = muli %c0_i32, %arg0 : i32
   return %y: i32
 }
 
-// CHECK-LABEL: mlfunc @muli_one_vector
-mlfunc @muli_one_vector(%arg0: vector<4 x i32>) -> vector<4 x i32> {
+// CHECK-LABEL: func @muli_one_vector
+func @muli_one_vector(%arg0: vector<4 x i32>) -> vector<4 x i32> {
   // CHECK-NEXT: return %arg0
   %c1_v4i32 = constant splat<vector<4 x i32>, 1> : vector<4 x i32>
   %y = muli %c1_v4i32, %arg0 : vector<4 x i32>
   return %y: vector<4 x i32>
 }
 
-// CHECK-LABEL: mlfunc @muli_one_tensor
-mlfunc @muli_one_tensor(%arg0: tensor<4 x 5 x i32>) -> tensor<4 x 5 x i32> {
+// CHECK-LABEL: func @muli_one_tensor
+func @muli_one_tensor(%arg0: tensor<4 x 5 x i32>) -> tensor<4 x 5 x i32> {
   // CHECK-NEXT: return %arg0
   %c1_t45i32 = constant splat<tensor<4 x 5 x i32>, 1> : tensor<4 x 5 x i32>
   %y = muli %arg0, %c1_t45i32 : tensor<4 x 5 x i32>
   return %y: tensor<4 x 5 x i32>
 }
 
-// CHECK-LABEL: mlfunc @memref_cast_folding
-mlfunc @memref_cast_folding(%arg0: memref<4 x f32>, %arg1: f32) -> f32 {
+// CHECK-LABEL: func @memref_cast_folding
+func @memref_cast_folding(%arg0: memref<4 x f32>, %arg1: f32) -> f32 {
   %1 = memref_cast %arg0 : memref<4xf32> to memref<?xf32>
 
   // CHECK-NEXT: %c0 = constant 0 : index
@@ -116,8 +116,8 @@ mlfunc @memref_cast_folding(%arg0: memref<4 x f32>, %arg1: f32) -> f32 {
   return %0 : f32
 }
 
-// CHECK-LABEL: mlfunc @alloc_const_fold
-mlfunc @alloc_const_fold() -> memref<?xf32> {
+// CHECK-LABEL: func @alloc_const_fold
+func @alloc_const_fold() -> memref<?xf32> {
   // CHECK-NEXT: %0 = alloc() : memref<4xf32>
   %c4 = constant 4 : index
   %a = alloc(%c4) : memref<?xf32>
@@ -128,8 +128,8 @@ mlfunc @alloc_const_fold() -> memref<?xf32> {
 }
 
 
-// CHECK-LABEL: mlfunc @dyn_shape_fold(%arg0: index, %arg1: index)
-mlfunc @dyn_shape_fold(%L : index, %M : index) -> memref<? x ? x f32> {
+// CHECK-LABEL: func @dyn_shape_fold(%arg0: index, %arg1: index)
+func @dyn_shape_fold(%L : index, %M : index) -> memref<? x ? x f32> {
   // CHECK: %c0 = constant 0 : index
   %zero = constant 0 : index
   // The constants below disappear after they propagate into shapes.
@@ -163,8 +163,8 @@ mlfunc @dyn_shape_fold(%L : index, %M : index) -> memref<? x ? x f32> {
   return %d : memref<? x ? x f32>
 }
 
-// CHECK-LABEL: mlfunc @merge_constants
-mlfunc @merge_constants() -> (index, index) {
+// CHECK-LABEL: func @merge_constants
+func @merge_constants() -> (index, index) {
   // CHECK-NEXT: %c42 = constant 42 : index
   %0 = constant 42 : index
   %1 = constant 42 : index
@@ -172,8 +172,8 @@ mlfunc @merge_constants() -> (index, index) {
   return %0, %1: index, index
 }
 
-// CHECK-LABEL: mlfunc @hoist_constant
-mlfunc @hoist_constant(%arg0: memref<8xi32>) {
+// CHECK-LABEL: func @hoist_constant
+func @hoist_constant(%arg0: memref<8xi32>) {
   // CHECK-NEXT: %c42_i32 = constant 42 : i32
   // CHECK-NEXT: for %i0 = 0 to 8 {
   for %i0 = 0 to 8 {
@@ -184,8 +184,8 @@ mlfunc @hoist_constant(%arg0: memref<8xi32>) {
   return
 }
 
-// CHECK-LABEL: mlfunc @const_fold_propagate
-mlfunc @const_fold_propagate() -> memref<?x?xf32> {
+// CHECK-LABEL: func @const_fold_propagate
+func @const_fold_propagate() -> memref<?x?xf32> {
   %VT_i = constant 512 : index
 
   %VT_i_s = affine_apply (d0) -> (d0 floordiv  8) (%VT_i)
index e2e67eb1ce5c5401a29bbeec1114908f87c1e7ae..2e81bb8eca3c32ef60d1e36bb94a9bad0a126790 100644 (file)
@@ -27,8 +27,8 @@
 // Affine maps for test case: arg_used_as_dim_and_symbol
 // CHECK: [[MAP14:#map[0-9]+]] = (d0, d1, d2, d3)[s0, s1] -> (d2, d3 + s0 + s1 - (d0 + d1))
 
-// CHECK-LABEL: mlfunc @compose_affine_maps_1dto2d_no_symbols() {
-mlfunc @compose_affine_maps_1dto2d_no_symbols() {
+// CHECK-LABEL: func @compose_affine_maps_1dto2d_no_symbols() {
+func @compose_affine_maps_1dto2d_no_symbols() {
   %0 = alloc() : memref<4x4xf32>
 
   for %i0 = 0 to 15 {
@@ -64,8 +64,8 @@ mlfunc @compose_affine_maps_1dto2d_no_symbols() {
   return
 }
 
-// CHECK-LABEL: mlfunc @compose_affine_maps_1dto2d_with_symbols() {
-mlfunc @compose_affine_maps_1dto2d_with_symbols() {
+// CHECK-LABEL: func @compose_affine_maps_1dto2d_with_symbols() {
+func @compose_affine_maps_1dto2d_with_symbols() {
   %0 = alloc() : memref<4x4xf32>
   
   for %i0 = 0 to 15 {
@@ -102,8 +102,8 @@ mlfunc @compose_affine_maps_1dto2d_with_symbols() {
   return
 }
 
-// CHECK-LABEL: mlfunc @compose_affine_maps_2d_tile() {
-mlfunc @compose_affine_maps_2d_tile() {
+// CHECK-LABEL: func @compose_affine_maps_2d_tile() {
+func @compose_affine_maps_2d_tile() {
   %0 = alloc() : memref<16x32xf32>
   %1 = alloc() : memref<16x32xf32>
 
@@ -134,8 +134,8 @@ mlfunc @compose_affine_maps_2d_tile() {
   return
 }
 
-// CHECK-LABEL: mlfunc @compose_affine_maps_dependent_loads() {
-mlfunc @compose_affine_maps_dependent_loads() {
+// CHECK-LABEL: func @compose_affine_maps_dependent_loads() {
+func @compose_affine_maps_dependent_loads() {
   %0 = alloc() : memref<16x32xf32>
   %1 = alloc() : memref<16x32xf32>
 
@@ -178,8 +178,8 @@ mlfunc @compose_affine_maps_dependent_loads() {
   return
 }
 
-// CHECK-LABEL: mlfunc @compose_affine_maps_diamond_dependency() {
-mlfunc @compose_affine_maps_diamond_dependency() {
+// CHECK-LABEL: func @compose_affine_maps_diamond_dependency() {
+func @compose_affine_maps_diamond_dependency() {
   %0 = alloc() : memref<4x4xf32>
 
   for %i0 = 0 to 15 {
@@ -195,8 +195,8 @@ mlfunc @compose_affine_maps_diamond_dependency() {
   return
 }
 
-// CHECK-LABEL: mlfunc @arg_used_as_dim_and_symbol(%arg0: memref<100x100xf32>, %arg1: index) {
-mlfunc @arg_used_as_dim_and_symbol(%arg0: memref<100x100xf32>, %arg1: index) {
+// CHECK-LABEL: func @arg_used_as_dim_and_symbol(%arg0: memref<100x100xf32>, %arg1: index) {
+func @arg_used_as_dim_and_symbol(%arg0: memref<100x100xf32>, %arg1: index) {
   %c9 = constant 9 : index
   %1 = alloc() : memref<100x100xf32, 1>
   %2 = alloc() : memref<1xi32>
index 0f90e0af7f4333358dc1c4e34f6c993eaeaf8989..62c2cd37a0f61923dce6bb3c789451452634fe0f 100644 (file)
@@ -4,7 +4,7 @@
 // CHECK: [[MAP1:#map[0-9]+]] = ()[s0] -> (100, s0)
 
 // CHECK-LABEL: @test(%arg0: memref<f32>) {
-mlfunc @test(%p : memref<f32>) {
+func @test(%p : memref<f32>) {
   for %i0 = 0 to 128 {
     for %i1 = 0 to 8 { // CHECK: for %i1 = 0 to 8 {
       %0 = constant 4.5 : f32
@@ -20,8 +20,8 @@ mlfunc @test(%p : memref<f32>) {
   return
 }
 
-// CHECK-LABEL: cfgfunc @simple_addf
-cfgfunc @simple_addf() -> f32 {
+// CHECK-LABEL: func @simple_addf
+func @simple_addf() -> f32 {
   %0 = constant 4.5 : f32
   %1 = constant 1.5 : f32
 
@@ -32,8 +32,8 @@ cfgfunc @simple_addf() -> f32 {
   return %2 : f32
 }
 
-// CHECK-LABEL: cfgfunc @simple_addi
-cfgfunc @simple_addi() -> i32 {
+// CHECK-LABEL: func @simple_addi
+func @simple_addi() -> i32 {
   %0 = constant 1 : i32
   %1 = constant 5 : i32
 
@@ -44,8 +44,8 @@ cfgfunc @simple_addi() -> i32 {
   return %2 : i32
 }
 
-// CHECK-LABEL: cfgfunc @simple_subf
-cfgfunc @simple_subf() -> f32 {
+// CHECK-LABEL: func @simple_subf
+func @simple_subf() -> f32 {
   %0 = constant 4.5 : f32
   %1 = constant 1.5 : f32
 
@@ -56,8 +56,8 @@ cfgfunc @simple_subf() -> f32 {
   return %2 : f32
 }
 
-// CHECK-LABEL: cfgfunc @simple_subi
-cfgfunc @simple_subi() -> i32 {
+// CHECK-LABEL: func @simple_subi
+func @simple_subi() -> i32 {
   %0 = constant 4 : i32
   %1 = constant 1 : i32
 
@@ -68,8 +68,8 @@ cfgfunc @simple_subi() -> i32 {
   return %2 : i32
 }
 
-// CHECK-LABEL: mlfunc @affine_apply
-mlfunc @affine_apply(%variable : index) -> (index, index, index) {
+// CHECK-LABEL: func @affine_apply
+func @affine_apply(%variable : index) -> (index, index, index) {
   %c177 = constant 177 : index
   %c211 = constant 211 : index
   %N = constant 1075 : index
@@ -86,8 +86,8 @@ mlfunc @affine_apply(%variable : index) -> (index, index, index) {
   return %x#0, %x#1, %y : index, index, index
 }
 
-// CHECK-LABEL:  mlfunc @constant_fold_bounds(%arg0: index) {
-mlfunc @constant_fold_bounds(%N : index) {
+// CHECK-LABEL:  func @constant_fold_bounds(%arg0: index) {
+func @constant_fold_bounds(%N : index) {
   // CHECK:      %c3 = constant 3 : index
   // CHECK-NEXT: %0 = "foo"() : () -> index
   %c9 = constant 9 : index
@@ -116,8 +116,8 @@ mlfunc @constant_fold_bounds(%N : index) {
 }
 
 
-// CHECK-LABEL: cfgfunc @simple_mulf
-cfgfunc @simple_mulf() -> f32 {
+// CHECK-LABEL: func @simple_mulf
+func @simple_mulf() -> f32 {
   %0 = constant 4.5 : f32
   %1 = constant 1.5 : f32
 
@@ -128,8 +128,8 @@ cfgfunc @simple_mulf() -> f32 {
   return %2 : f32
 }
 
-// CHECK-LABEL: cfgfunc @muli(%arg0: i32)
-cfgfunc @muli(i32) -> (i32, i32) {
+// CHECK-LABEL: func @muli(%arg0: i32)
+func @muli(i32) -> (i32, i32) {
 ^bb0(%a : i32):
   %0 = constant 4 : i32
   %1 = constant 2 : i32
@@ -146,8 +146,8 @@ cfgfunc @muli(i32) -> (i32, i32) {
   return %2, %3 : i32, i32
 }
 
-// CHECK-LABEL: mlfunc @dim
-mlfunc @dim(%x : tensor<8x4xf32>) -> index {
+// CHECK-LABEL: func @dim
+func @dim(%x : tensor<8x4xf32>) -> index {
 
   // CHECK: %c4 = constant 4 : index
   %0 = dim %x, 1 : tensor<8x4xf32>
index ce1a497e160d16eddba0f4ca68828d4f60ebb6ca..62992fb82fa1e518a38d775ed4702419b8a32e2c 100644 (file)
@@ -4,7 +4,7 @@
 #map0 = (d0) -> (d0 mod 2, d0 mod 2)
 
 // CHECK-LABEL: @simple_constant_ml
-mlfunc @simple_constant_ml() -> (i32, i32) {
+func @simple_constant_ml() -> (i32, i32) {
   // CHECK: %c1_i32 = constant 1 : i32
   %0 = constant 1 : i32
   %1 = constant 1 : i32
@@ -14,7 +14,7 @@ mlfunc @simple_constant_ml() -> (i32, i32) {
 }
 
 // CHECK-LABEL: @simple_constant_cfg
-cfgfunc @simple_constant_cfg() -> (i32, i32) {
+func @simple_constant_cfg() -> (i32, i32) {
   // CHECK-NEXT: %c1_i32 = constant 1 : i32
   %0 = constant 1 : i32
 
@@ -24,7 +24,7 @@ cfgfunc @simple_constant_cfg() -> (i32, i32) {
 }
 
 // CHECK-LABEL: @basic_ml
-mlfunc @basic_ml() -> (index, index) {
+func @basic_ml() -> (index, index) {
   // CHECK: %c0 = constant 0 : index
   %c0 = constant 0 : index
   %c1 = constant 0 : index
@@ -38,7 +38,7 @@ mlfunc @basic_ml() -> (index, index) {
 }
 
 // CHECK-LABEL: @many_cfg
-cfgfunc @many_cfg(f32, f32) -> (f32) {
+func @many_cfg(f32, f32) -> (f32) {
 ^bb0(%a : f32, %b : f32): 
   // CHECK-NEXT: %0 = addf %arg0, %arg1 : f32
   %c = addf %a, %b : f32
@@ -64,7 +64,7 @@ cfgfunc @many_cfg(f32, f32) -> (f32) {
 
 /// Check that operations are not eliminated if they have different operands.
 // CHECK-LABEL: @different_ops_ml
-mlfunc @different_ops_ml() -> (i32, i32) {
+func @different_ops_ml() -> (i32, i32) {
   // CHECK: %c0_i32 = constant 0 : i32
   // CHECK: %c1_i32 = constant 1 : i32
   %0 = constant 0 : i32
@@ -77,7 +77,7 @@ mlfunc @different_ops_ml() -> (i32, i32) {
 /// Check that operations are not eliminated if they have different result
 /// types.
 // CHECK-LABEL: @different_results_ml
-mlfunc @different_results_ml(%arg0: tensor<*xf32>) -> (tensor<?x?xf32>, tensor<4x?xf32>) {
+func @different_results_ml(%arg0: tensor<*xf32>) -> (tensor<?x?xf32>, tensor<4x?xf32>) {
   // CHECK: %0 = tensor_cast %arg0 : tensor<*xf32> to tensor<?x?xf32>
   // CHECK-NEXT: %1 = tensor_cast %arg0 : tensor<*xf32> to tensor<4x?xf32>
   %0 = tensor_cast %arg0 : tensor<*xf32> to tensor<?x?xf32>
@@ -89,7 +89,7 @@ mlfunc @different_results_ml(%arg0: tensor<*xf32>) -> (tensor<?x?xf32>, tensor<4
 
 /// Check that operations are not eliminated if they have different attributes.
 // CHECK-LABEL: @different_attributes_cfg
-cfgfunc @different_attributes_cfg(index, index) -> (i1, i1, i1) {
+func @different_attributes_cfg(index, index) -> (i1, i1, i1) {
 ^bb0(%a : index, %b : index):
   // CHECK: %0 = cmpi "slt", %arg0, %arg1 : index
   %0 = cmpi "slt", %a, %b : index
@@ -105,7 +105,7 @@ cfgfunc @different_attributes_cfg(index, index) -> (i1, i1, i1) {
 
 /// Check that operations with side effects are not eliminated.
 // CHECK-LABEL: @side_effect_ml
-mlfunc @side_effect_ml() -> (memref<2x1xf32>, memref<2x1xf32>) {
+func @side_effect_ml() -> (memref<2x1xf32>, memref<2x1xf32>) {
   // CHECK: %0 = alloc() : memref<2x1xf32>
   %0 = alloc() : memref<2x1xf32>
 
@@ -119,7 +119,7 @@ mlfunc @side_effect_ml() -> (memref<2x1xf32>, memref<2x1xf32>) {
 /// Check that operation definitions are properly propagated down the dominance
 /// tree.
 // CHECK-LABEL: @down_propagate_for_ml
-mlfunc @down_propagate_for_ml() {
+func @down_propagate_for_ml() {
   // CHECK: %c1_i32 = constant 1 : i32
   %0 = constant 1 : i32
 
@@ -133,7 +133,7 @@ mlfunc @down_propagate_for_ml() {
 }
 
 // CHECK-LABEL: @down_propagate_cfg
-cfgfunc @down_propagate_cfg() -> i32 {
+func @down_propagate_cfg() -> i32 {
   // CHECK-NEXT: %c1_i32 = constant 1 : i32
   %0 = constant 1 : i32
 
@@ -154,7 +154,7 @@ cfgfunc @down_propagate_cfg() -> i32 {
 
 /// Check that operation definitions are NOT propagated up the dominance tree.
 // CHECK-LABEL: @up_propagate_ml
-mlfunc @up_propagate_ml() -> i32 {
+func @up_propagate_ml() -> i32 {
   // CHECK: for %i0 = 0 to 4 {
   for %i = 0 to 4 {
     // CHECK-NEXT: %c1_i32 = constant 1 : i32
@@ -169,8 +169,8 @@ mlfunc @up_propagate_ml() -> i32 {
   return %1 : i32
 }
 
-// CHECK-LABEL: cfgfunc @up_propagate_cfg
-cfgfunc @up_propagate_cfg() -> i32 {
+// CHECK-LABEL: func @up_propagate_cfg
+func @up_propagate_cfg() -> i32 {
   // CHECK-NEXT:  %c0_i32 = constant 0 : i32
   %0 = constant 0 : i32
 
index debd3f236f630bf2261f004dc2ee5e62dde2c0b7..d06d2aadaea2efe5e8d0adaf9a5137af197f760e 100644 (file)
@@ -9,8 +9,8 @@
 // CHECK-DAG: [[MAP_ORIG_ACCESS:#map[0-9]+]] = (d0, d1)[s0, s1] -> (d0, d1 + s0 + s1)
 // CHECK-DAG: [[MAP_SUB_OFFSET:#map[0-9]+]] = (d0, d1, d2) -> (d1, d2 - (d0 + 9))
 
-// CHECK-LABEL: mlfunc @loop_nest_1d() {
-mlfunc @loop_nest_1d() {
+// CHECK-LABEL: func @loop_nest_1d() {
+func @loop_nest_1d() {
   %A = alloc() : memref<256 x f32>
   %B = alloc() : memref<512 x f32>
   %F = alloc() : memref<256 x f32, 1>
@@ -47,7 +47,7 @@ mlfunc @loop_nest_1d() {
   return
 }
 
-// CHECK-LABEL: mlfunc @loop_nest_high_d
+// CHECK-LABEL: func @loop_nest_high_d
 // CHECK:       %c16384 = constant 16384 : index
 // CHECK-NEXT:  %0 = alloc() : memref<512x32xf32, 1>
 // CHECK-NEXT:  %1 = alloc() : memref<1xi32>
@@ -98,7 +98,7 @@ mlfunc @loop_nest_1d() {
 // CHECK-NEXT:  dma_wait %6[%c0], %c16384 : memref<1xi32>
 // CHECK-NEXT:  return
 // CHECK-NEXT:}
-mlfunc @loop_nest_high_d(%A: memref<512 x 32 x f32>,
+func @loop_nest_high_d(%A: memref<512 x 32 x f32>,
     %B: memref<512 x 32 x f32>, %C: memref<512 x 32 x f32>) {
   // DMAs will be performed at this level (jT is the first loop without a stride).
   // A and B are read, while C is both read and written. A total of three new buffers
@@ -133,7 +133,7 @@ mlfunc @loop_nest_high_d(%A: memref<512 x 32 x f32>,
 // A loop nest with a modulo 2 access. A strided DMA is not needed here a 1x2
 // region within a 256 x 8 memref.
 //
-// CHECK-LABEL: mlfunc @loop_nest_modulo() {
+// CHECK-LABEL: func @loop_nest_modulo() {
 // CHECK:       %0 = alloc() : memref<256x8xf32>
 // CHECK-NEXT:    for %i0 = 0 to 32 step 4 {
 // CHECK-NEXT:      %1 = affine_apply #map{{[0-9]+}}(%i0)
@@ -147,7 +147,7 @@ mlfunc @loop_nest_high_d(%A: memref<512 x 32 x f32>,
 // CHECK:           }
 // CHECK-NEXT:    }
 // CHECK-NEXT:    return
-mlfunc @loop_nest_modulo() {
+func @loop_nest_modulo() {
   %A = alloc() : memref<256 x 8 x f32>
   for %i = 0 to 32 step 4 {
     // DMAs will be performed at this level (%j is the first unit stride loop)
@@ -162,8 +162,8 @@ mlfunc @loop_nest_modulo() {
 
 // DMA on tiled loop nest. This also tests the case where the bounds are
 // dependent on outer loop IVs.
-// CHECK-LABEL: mlfunc @loop_nest_tiled() -> memref<256x1024xf32> {
-mlfunc @loop_nest_tiled() -> memref<256x1024xf32> {
+// CHECK-LABEL: func @loop_nest_tiled() -> memref<256x1024xf32> {
+func @loop_nest_tiled() -> memref<256x1024xf32> {
   %0 = alloc() : memref<256x1024xf32>
   for %i0 = 0 to 256 step 32 {
     for %i1 = 0 to 1024 step 32 {
@@ -187,8 +187,8 @@ mlfunc @loop_nest_tiled() -> memref<256x1024xf32> {
   return %0 : memref<256x1024xf32>
 }
 
-// CHECK-LABEL: mlfunc @dma_constant_dim_access
-mlfunc @dma_constant_dim_access(%A : memref<100x100xf32>) {
+// CHECK-LABEL: func @dma_constant_dim_access
+func @dma_constant_dim_access(%A : memref<100x100xf32>) {
   %one = constant 1 : index
   %N = constant 100 : index
   // CHECK:      %0 = alloc() : memref<1x100xf32, 1>
@@ -206,8 +206,8 @@ mlfunc @dma_constant_dim_access(%A : memref<100x100xf32>) {
   return
 }
 
-// CHECK-LABEL: mlfunc @dma_with_symbolic_accesses
-mlfunc @dma_with_symbolic_accesses(%A : memref<100x100xf32>, %M : index) {
+// CHECK-LABEL: func @dma_with_symbolic_accesses
+func @dma_with_symbolic_accesses(%A : memref<100x100xf32>, %M : index) {
   %N = constant 9 : index
   for %i = 0 to 100 {
     for %j = 0 to 100 {
@@ -230,8 +230,8 @@ mlfunc @dma_with_symbolic_accesses(%A : memref<100x100xf32>, %M : index) {
 // CHECK-NEXT:  return
 }
 
-// CHECK-LABEL: mlfunc @dma_with_symbolic_loop_bounds
-mlfunc @dma_with_symbolic_loop_bounds(%A : memref<100x100xf32>, %M : index, %N: index) {
+// CHECK-LABEL: func @dma_with_symbolic_loop_bounds
+func @dma_with_symbolic_loop_bounds(%A : memref<100x100xf32>, %M : index, %N: index) {
   %K = constant 9 : index
 // The buffer size can't be bound by a constant smaller than the original
 // memref size; so the DMA buffer is the entire 100x100.
@@ -248,8 +248,8 @@ mlfunc @dma_with_symbolic_loop_bounds(%A : memref<100x100xf32>, %M : index, %N:
   return
 }
 
-// CHECK-LABEL: mlfunc @dma_unknown_size
-mlfunc @dma_unknown_size(%arg0: memref<?x?xf32>) {
+// CHECK-LABEL: func @dma_unknown_size
+func @dma_unknown_size(%arg0: memref<?x?xf32>) {
   %M = dim %arg0, 0 : memref<? x ? x f32>
   %N = dim %arg0, 0 : memref<? x ? x f32>
   for %i = 0 to %M {
@@ -263,8 +263,8 @@ mlfunc @dma_unknown_size(%arg0: memref<?x?xf32>) {
   return
 }
 
-// CHECK-LABEL: mlfunc @dma_memref_3d
-mlfunc @dma_memref_3d(%arg0: memref<1024x1024x1024xf32>) {
+// CHECK-LABEL: func @dma_memref_3d
+func @dma_memref_3d(%arg0: memref<1024x1024x1024xf32>) {
   for %i = 0 to 1024 {
     for %j = 0 to 1024 {
       for %k = 0 to 1024 {
index 34057e2e98a075dc355d5f9775cba74ed5058807..d957df15066d03f26ba7f09a772ac90f11bdf8fc 100644 (file)
@@ -6,14 +6,14 @@
 //    added to iteration domain in dependence check.
 // *) Add a test w/ floordiv/ceildiv/mod when supported in dependence check.
 // *) Add tests which check fused computation slice indexing and loop bounds.
-// TODO(andydavis) Test clean up: move memref allocs to mlfunc args.
+// TODO(andydavis) Test clean up: move memref allocs to func args.
 
 // -----
 
 // CHECK: [[MAP0:#map[0-9]+]] = (d0) -> (d0)
 
-// CHECK-LABEL: mlfunc @should_fuse_raw_dep_for_locality() {
-mlfunc @should_fuse_raw_dep_for_locality() {
+// CHECK-LABEL: func @should_fuse_raw_dep_for_locality() {
+func @should_fuse_raw_dep_for_locality() {
   %m = alloc() : memref<10xf32>
   %cf7 = constant 7.0 : f32
 
@@ -36,8 +36,8 @@ mlfunc @should_fuse_raw_dep_for_locality() {
 
 // CHECK: [[MAP0:#map[0-9]+]] = (d0) -> (d0)
 
-// CHECK-LABEL: mlfunc @should_fuse_reduction_to_pointwise() {
-mlfunc @should_fuse_reduction_to_pointwise() {
+// CHECK-LABEL: func @should_fuse_reduction_to_pointwise() {
+func @should_fuse_reduction_to_pointwise() {
   %a = alloc() : memref<10x10xf32>
   %b = alloc() : memref<10xf32>
   %c = alloc() : memref<10xf32>
@@ -79,8 +79,8 @@ mlfunc @should_fuse_reduction_to_pointwise() {
 // CHECK: [[MAP_SHIFT_MINUS_ONE:#map[0-9]+]] = (d0) -> (d0 - 1)
 // CHECK: [[MAP_SHIFT_BY_ONE:#map[0-9]+]] = (d0, d1) -> (d0 + 1, d1 + 1)
 
-// CHECK-LABEL: mlfunc @should_fuse_loop_nests_with_shifts() {
-mlfunc @should_fuse_loop_nests_with_shifts() {
+// CHECK-LABEL: func @should_fuse_loop_nests_with_shifts() {
+func @should_fuse_loop_nests_with_shifts() {
   %a = alloc() : memref<10x10xf32>
   %cf7 = constant 7.0 : f32
 
@@ -113,8 +113,8 @@ mlfunc @should_fuse_loop_nests_with_shifts() {
 
 // CHECK: [[MAP_IDENTITY:#map[0-9]+]] = (d0) -> (d0)
 
-// CHECK-LABEL: mlfunc @should_fuse_loop_nest() {
-mlfunc @should_fuse_loop_nest() {
+// CHECK-LABEL: func @should_fuse_loop_nest() {
+func @should_fuse_loop_nest() {
   %a = alloc() : memref<10x10xf32>
   %b = alloc() : memref<10x10xf32>
   %cf7 = constant 7.0 : f32
@@ -156,8 +156,8 @@ mlfunc @should_fuse_loop_nest() {
 
 // CHECK: [[MAP0:#map[0-9]+]] = (d0) -> (d0)
 
-// CHECK-LABEL: mlfunc @should_fuse_across_intermediate_loop_with_no_deps() {
-mlfunc @should_fuse_across_intermediate_loop_with_no_deps() {
+// CHECK-LABEL: func @should_fuse_across_intermediate_loop_with_no_deps() {
+func @should_fuse_across_intermediate_loop_with_no_deps() {
   %a = alloc() : memref<10xf32>
   %b = alloc() : memref<10xf32>
   %c = alloc() : memref<10xf32>
@@ -193,8 +193,8 @@ mlfunc @should_fuse_across_intermediate_loop_with_no_deps() {
 
 // CHECK: [[MAP0:#map[0-9]+]] = (d0) -> (d0)
 
-// CHECK-LABEL: mlfunc @should_fuse_all_loops() {
-mlfunc @should_fuse_all_loops() {
+// CHECK-LABEL: func @should_fuse_all_loops() {
+func @should_fuse_all_loops() {
   %a = alloc() : memref<10xf32>
   %b = alloc() : memref<10xf32>
   %cf7 = constant 7.0 : f32
@@ -228,8 +228,8 @@ mlfunc @should_fuse_all_loops() {
 
 // CHECK: [[MAP0:#map[0-9]+]] = (d0) -> (d0)
 
-// CHECK-LABEL: mlfunc @should_fuse_first_and_second_loops() {
-mlfunc @should_fuse_first_and_second_loops() {
+// CHECK-LABEL: func @should_fuse_first_and_second_loops() {
+func @should_fuse_first_and_second_loops() {
   %a = alloc() : memref<10xf32>
   %b = alloc() : memref<10xf32>
   %c = alloc() : memref<10xf32>
@@ -264,8 +264,8 @@ mlfunc @should_fuse_first_and_second_loops() {
 
 // -----
 
-// CHECK-LABEL: mlfunc @should_not_fuse_would_create_cycle() {
-mlfunc @should_not_fuse_would_create_cycle() {
+// CHECK-LABEL: func @should_not_fuse_would_create_cycle() {
+func @should_not_fuse_would_create_cycle() {
   %a = alloc() : memref<10xf32>
   %b = alloc() : memref<10xf32>
   %c = alloc() : memref<10xf32>
@@ -307,8 +307,8 @@ mlfunc @should_not_fuse_would_create_cycle() {
 
 // -----
 
-// CHECK-LABEL: mlfunc @should_not_fuse_raw_dep_would_be_violated() {
-mlfunc @should_not_fuse_raw_dep_would_be_violated() {
+// CHECK-LABEL: func @should_not_fuse_raw_dep_would_be_violated() {
+func @should_not_fuse_raw_dep_would_be_violated() {
   %m = alloc() : memref<10xf32>
   %cf7 = constant 7.0 : f32
 
@@ -337,8 +337,8 @@ mlfunc @should_not_fuse_raw_dep_would_be_violated() {
 
 // -----
 
-// CHECK-LABEL: mlfunc @should_not_fuse_waw_dep_would_be_violated() {
-mlfunc @should_not_fuse_waw_dep_would_be_violated() {
+// CHECK-LABEL: func @should_not_fuse_waw_dep_would_be_violated() {
+func @should_not_fuse_waw_dep_would_be_violated() {
   %m = alloc() : memref<10xf32>
   %cf7 = constant 7.0 : f32
 
@@ -367,8 +367,8 @@ mlfunc @should_not_fuse_waw_dep_would_be_violated() {
 
 // -----
 
-// CHECK-LABEL: mlfunc @should_not_fuse_war_dep_would_be_violated() {
-mlfunc @should_not_fuse_war_dep_would_be_violated() {
+// CHECK-LABEL: func @should_not_fuse_war_dep_would_be_violated() {
+func @should_not_fuse_war_dep_would_be_violated() {
   %a = alloc() : memref<10xf32>
   %b = alloc() : memref<10xf32>
   %cf7 = constant 7.0 : f32
@@ -400,8 +400,8 @@ mlfunc @should_not_fuse_war_dep_would_be_violated() {
 
 // -----
 
-// CHECK-LABEL: mlfunc @should_not_fuse_if_top_level_access() {
-mlfunc @should_not_fuse_if_top_level_access() {
+// CHECK-LABEL: func @should_not_fuse_if_top_level_access() {
+func @should_not_fuse_if_top_level_access() {
   %m = alloc() : memref<10xf32>
   %cf7 = constant 7.0 : f32
 
@@ -428,8 +428,8 @@ mlfunc @should_not_fuse_if_top_level_access() {
 
 // CHECK: [[MAP0:#map[0-9]+]] = (d0) -> (d0)
 
-// CHECK-LABEL: mlfunc @should_fuse_no_top_level_access() {
-mlfunc @should_fuse_no_top_level_access() {
+// CHECK-LABEL: func @should_fuse_no_top_level_access() {
+func @should_fuse_no_top_level_access() {
   %m = alloc() : memref<10xf32>
   %cf7 = constant 7.0 : f32
 
@@ -452,8 +452,8 @@ mlfunc @should_fuse_no_top_level_access() {
 
 #set0 = (d0) : (1 == 0)
 
-// CHECK-LABEL: mlfunc @should_not_fuse_if_inst_at_top_level() {
-mlfunc @should_not_fuse_if_inst_at_top_level() {
+// CHECK-LABEL: func @should_not_fuse_if_inst_at_top_level() {
+func @should_not_fuse_if_inst_at_top_level() {
   %m = alloc() : memref<10xf32>
   %cf7 = constant 7.0 : f32
 
@@ -480,8 +480,8 @@ mlfunc @should_not_fuse_if_inst_at_top_level() {
 
 #set0 = (d0) : (1 == 0)
 
-// CHECK-LABEL: mlfunc @should_not_fuse_if_inst_in_loop_nest() {
-mlfunc @should_not_fuse_if_inst_in_loop_nest() {
+// CHECK-LABEL: func @should_not_fuse_if_inst_in_loop_nest() {
+func @should_not_fuse_if_inst_in_loop_nest() {
   %m = alloc() : memref<10xf32>
   %cf7 = constant 7.0 : f32
   %c4 = constant 4 : index
@@ -513,8 +513,8 @@ mlfunc @should_not_fuse_if_inst_in_loop_nest() {
 // CHECK: [[MAP1:#map[0-9]+]] = (d0, d1, d2) -> (d0, d1, d2)
 // CHECK: [[MAP2:#map[0-9]+]] = (d0, d1, d2) -> (d1, d2, d0)
 
-// CHECK-LABEL: mlfunc @remap_ivs() {
-mlfunc @remap_ivs() {
+// CHECK-LABEL: func @remap_ivs() {
+func @remap_ivs() {
   %m = alloc() : memref<10x20x30xf32>
 
   %cf7 = constant 7.0 : f32
@@ -557,8 +557,8 @@ mlfunc @remap_ivs() {
 // DEPTH1: #map0 = (d0) -> (d0)
 // DEPTH1: #map1 = (d0, d1, d2) -> (d0, d1, d2)
 
-// DEPTH1-LABEL: mlfunc @fuse_slice_at_depth1() {
-mlfunc @fuse_slice_at_depth1() {
+// DEPTH1-LABEL: func @fuse_slice_at_depth1() {
+func @fuse_slice_at_depth1() {
   %m = alloc() : memref<100x16x100xf32>
 
   %cf7 = constant 7.0 : f32
index 73f3367393d8bf0cfc43587642a31d35e532cb58..b901cf1df8a9683f7477e45c8339aa92fae374aa 100644 (file)
@@ -7,7 +7,7 @@
 // CHECK-DAG: [[UB:#map[0-9]+]] = ()[s0, s1] -> (s0, 4096 floordiv s1)
 // CHECK-DAG: [[UB_INTRA_TILE:#map[0-9]+]] = (d0, d1, d2) -> (d2 + 32, s0, 4096 floordiv s1)
 
-// CHECK-LABEL: mlfunc @loop_tiling()
+// CHECK-LABEL: func @loop_tiling()
 // CHECK-NEXT:   for %i0 = 0 to 256 step 32 {
 // CHECK-NEXT:     for %i1 = 0 to 512 step 32 {
 // CHECK-NEXT:       for %i2 = 0 to 1024 step 32 {
@@ -32,7 +32,7 @@
 // CHECK-NEXT:    }
 // CHECK-NEXT:  }
 // CHECK-NEXT:  return
-mlfunc @loop_tiling() {
+func @loop_tiling() {
   for %i = 0 to 256 {
     for %j = 0 to 512 {
       for %k = 0 to 1024 {
@@ -55,8 +55,8 @@ mlfunc @loop_tiling() {
 
 #lb = ()[s0] -> (0, s0)
 #ub = ()[s0, s1] -> (s0, 4096 floordiv s1)
-// CHECK-LABEL: mlfunc @loop_max_min_bound(%arg0: memref<?xi32>, %arg1: index, %arg2: index) {
-mlfunc @loop_max_min_bound(%A : memref<? x i32>, %L : index, %U : index) {
+// CHECK-LABEL: func @loop_max_min_bound(%arg0: memref<?xi32>, %arg1: index, %arg2: index) {
+func @loop_max_min_bound(%A : memref<? x i32>, %L : index, %U : index) {
   %M = dim %A, 0 : memref<? x i32>
   for %iTT = max #lb()[%L] to min #ub()[%M, %U] {
       %out = affine_apply (d0) -> (d0) (%iTT)
index 8128682fa988f754e26068295395759f64ce606b..3696bc8575d329202dd92fadedc06d08f8211988 100644 (file)
@@ -8,8 +8,8 @@
 #map5 = (d0,d1,d2) -> (d0,d1,d2)
 #map6 = (d0,d1,d2) -> (d0 + d1 + d2)
 
-// CHECK-LABEL: cfgfunc @affine_applies()
-cfgfunc @affine_applies() {
+// CHECK-LABEL: func @affine_applies()
+func @affine_applies() {
 ^bb0:
 // CHECK: %c0 = constant 0 : index
   %zero = affine_apply #map0()
@@ -63,8 +63,8 @@ cfgfunc @affine_applies() {
   return
 }
 
-// CHECK-LABEL: cfgfunc @multiresult_affine_apply()
-cfgfunc @multiresult_affine_apply() {
+// CHECK-LABEL: func @multiresult_affine_apply()
+func @multiresult_affine_apply() {
 // CHECK-NEXT: %c1 = constant 1 : index
 // CHECK-NEXT: %0 = addi %c1, %c1 : index
 // CHECK-NEXT: %1 = addi %0, %c1 : index
@@ -74,8 +74,8 @@ cfgfunc @multiresult_affine_apply() {
   return
 }
 
-// CHECK-LABEL: cfgfunc @args_ret_affine_apply(%arg0: index, %arg1: index)
-cfgfunc @args_ret_affine_apply(index, index) -> (index, index) {
+// CHECK-LABEL: func @args_ret_affine_apply(%arg0: index, %arg1: index)
+func @args_ret_affine_apply(index, index) -> (index, index) {
 ^bb0(%0 : index, %1 : index):
 // CHECK-NEXT: return %arg0, %arg1 : index, index
   %00 = affine_apply #map2 (%0)
index bff417756fef98dec06e7d1dd194240cadd8f29a..96c57932329c28b9312d64b7a18b982ea7c46b74 100644 (file)
 // CHECK-DAG: [[setMapS2:#map[0-9]+]] = (d0)[s0, s1, s2, s3] -> (s2 - 1)
 // CHECK-DAG: [[setMapS3:#map[0-9]+]] = (d0)[s0, s1, s2, s3] -> (s3 - 42)
 
-// CHECK-LABEL: cfgfunc @empty() {
-mlfunc @empty() {
+// CHECK-LABEL: func @empty() {
+func @empty() {
   return     // CHECK:  return
 }            // CHECK: }
 
-extfunc @body(index) -> ()
+func @body(index) -> ()
 
 // Simple loops are properly converted.
-// CHECK-LABEL: cfgfunc @simple_loop() {
+// CHECK-LABEL: func @simple_loop() {
 // CHECK-NEXT:   %0 = affine_apply [[map1]]()
 // CHECK-NEXT:   %1 = affine_apply [[map42]]()
 // CHECK-NEXT:   br ^bb1(%0 : index)
@@ -46,7 +46,7 @@ extfunc @body(index) -> ()
 // CHECK-NEXT: ^bb3:   // pred: ^bb1
 // CHECK-NEXT:   return
 // CHECK-NEXT: }
-mlfunc @simple_loop() {
+func @simple_loop() {
   for %i = 1 to 42 {
     call @body(%i) : (index) -> ()
   }
@@ -55,7 +55,7 @@ mlfunc @simple_loop() {
 
 // Direct calls get renamed if asked (IR data structures properly updated) and
 // keep the same name otherwise.
-cfgfunc @simple_caller() {
+func @simple_caller() {
 ^bb0:
 // CHECK: call @simple_loop() : () -> ()
   call @simple_loop() : () -> ()
@@ -64,7 +64,7 @@ cfgfunc @simple_caller() {
 
 // Constant loads get renamed if asked (IR data structure properly updated) and
 // keep the same name otherwise.
-cfgfunc @simple_indirect_caller() {
+func @simple_indirect_caller() {
 ^bb0:
 // CHECK: %f = constant @simple_loop : () -> ()
   %f = constant @simple_loop : () -> ()
@@ -72,7 +72,7 @@ cfgfunc @simple_indirect_caller() {
   return
 }
 
-cfgfunc @nested_attributes() {
+func @nested_attributes() {
 ^bb0:
   %0 = constant 0 : index
 // CHECK: call @body(%c0) {attr1: [@simple_loop : () -> (), @simple_loop : () -> ()]} : (index) -> ()
@@ -84,8 +84,8 @@ cfgfunc @nested_attributes() {
   return
 }
 
-// CHECK-LABEL: cfgfunc @ml_caller() {
-mlfunc @ml_caller() {
+// CHECK-LABEL: func @ml_caller() {
+func @ml_caller() {
 // Direct calls inside ML functions are renamed if asked (given that the
 // function itself is also converted).
 // CHECK: call @simple_loop() : () -> ()
@@ -98,11 +98,11 @@ mlfunc @ml_caller() {
 
 /////////////////////////////////////////////////////////////////////
 
-extfunc @body_args(index) -> (index)
-extfunc @other(index, i32) -> (i32)
+func @body_args(index) -> (index)
+func @other(index, i32) -> (i32)
 
 // Arguments and return values of the functions are converted.
-// CHECK-LABEL: cfgfunc @mlfunc_args(%arg0: i32, %arg1: i32) -> (i32, i32) {
+// CHECK-LABEL: func @func_args(%arg0: i32, %arg1: i32) -> (i32, i32) {
 // CHECK-NEXT:   %c0_i32 = constant 0 : i32
 // CHECK-NEXT:   %0 = affine_apply [[map0]]()
 // CHECK-NEXT:   %1 = affine_apply [[map42]]()
@@ -122,7 +122,7 @@ extfunc @other(index, i32) -> (i32)
 // CHECK-NEXT:   %9 = call @other(%c0, %c0_i32) : (index, i32) -> i32
 // CHECK-NEXT:   return %c0_i32, %9 : i32, i32
 // CHECK-NEXT: }
-mlfunc @mlfunc_args(%a : i32, %b : i32) -> (i32, i32) {
+func @func_args(%a : i32, %b : i32) -> (i32, i32) {
   %r1 = constant 0 : i32
   for %i = 0 to 42 {
     %1 = call @body_args(%i) : (index) -> (index)
@@ -137,11 +137,11 @@ mlfunc @mlfunc_args(%a : i32, %b : i32) -> (i32, i32) {
 
 /////////////////////////////////////////////////////////////////////
 
-extfunc @pre(index) -> ()
-extfunc @body2(index, index) -> ()
-extfunc @post(index) -> ()
+func @pre(index) -> ()
+func @body2(index, index) -> ()
+func @post(index) -> ()
 
-// CHECK-LABEL: cfgfunc @imperfectly_nested_loops() {
+// CHECK-LABEL: func @imperfectly_nested_loops() {
 // CHECK-NEXT:   %0 = affine_apply [[map0]]()
 // CHECK-NEXT:   %1 = affine_apply [[map42]]()
 // CHECK-NEXT:   br ^bb1(%0 : index)
@@ -167,7 +167,7 @@ extfunc @post(index) -> ()
 // CHECK-NEXT: ^bb6:   // pred: ^bb1
 // CHECK-NEXT:   return
 // CHECK-NEXT: }
-mlfunc @imperfectly_nested_loops() {
+func @imperfectly_nested_loops() {
   for %i = 0 to 42 {
     call @pre(%i) : (index) -> ()
     for %j = 7 to 56 step 2 {
@@ -180,10 +180,10 @@ mlfunc @imperfectly_nested_loops() {
 
 /////////////////////////////////////////////////////////////////////
 
-extfunc @mid(index) -> ()
-extfunc @body3(index, index) -> ()
+func @mid(index) -> ()
+func @body3(index, index) -> ()
 
-// CHECK-LABEL: cfgfunc @more_imperfectly_nested_loops() {
+// CHECK-LABEL: func @more_imperfectly_nested_loops() {
 // CHECK-NEXT:   %0 = affine_apply [[map0]]()
 // CHECK-NEXT:   %1 = affine_apply [[map42]]()
 // CHECK-NEXT:   br ^bb1(%0 : index)
@@ -221,7 +221,7 @@ extfunc @body3(index, index) -> ()
 // CHECK-NEXT: ^bb9:   // pred: ^bb1
 // CHECK-NEXT:   return
 // CHECK-NEXT: }
-mlfunc @more_imperfectly_nested_loops() {
+func @more_imperfectly_nested_loops() {
   for %i = 0 to 42 {
     call @pre(%i) : (index) -> ()
     for %j = 7 to 56 step 2 {
@@ -236,7 +236,7 @@ mlfunc @more_imperfectly_nested_loops() {
   return
 }
 
-// CHECK-LABEL: cfgfunc @affine_apply_loops_shorthand(%arg0: index) {
+// CHECK-LABEL: func @affine_apply_loops_shorthand(%arg0: index) {
 // CHECK-NEXT:    %0 = affine_apply #map3()
 // CHECK-NEXT:    %1 = affine_apply #map10()[%arg0]
 // CHECK-NEXT:    br ^bb1(%0 : index)
@@ -260,7 +260,7 @@ mlfunc @more_imperfectly_nested_loops() {
 // CHECK-NEXT:  ^bb6:   // pred: ^bb1
 // CHECK-NEXT:    return
 // CHECK-NEXT:  }
-mlfunc @affine_apply_loops_shorthand(%N : index) {
+func @affine_apply_loops_shorthand(%N : index) {
   for %i = 0 to %N {
     for %j = %i to 42 {
       call @body2(%i, %j) : (index, index) -> ()
@@ -271,12 +271,12 @@ mlfunc @affine_apply_loops_shorthand(%N : index) {
 
 /////////////////////////////////////////////////////////////////////
 
-extfunc @get_idx() -> (index)
+func @get_idx() -> (index)
 
 #set1 = (d0) : (20 - d0 >= 0)
 #set2 = (d0) : (d0 - 10 >= 0)
 
-// CHECK-LABEL: cfgfunc @if_only() {
+// CHECK-LABEL: func @if_only() {
 // CHECK-NEXT:   %0 = call @get_idx() : () -> index
 // CHECK-NEXT:   %c0 = constant 0 : index
 // CHECK-NEXT:   %1 = affine_apply [[setMap20]](%0)
@@ -288,7 +288,7 @@ extfunc @get_idx() -> (index)
 // CHECK-NEXT: [[endBB]]:
 // CHECK-NEXT:   return
 // CHECK-NEXT: }
-mlfunc @if_only() {
+func @if_only() {
   %i = call @get_idx() : () -> (index)
   if #set1(%i) {
     call @body(%i) : (index) -> ()
@@ -296,7 +296,7 @@ mlfunc @if_only() {
   return
 }
 
-// CHECK-LABEL: cfgfunc @if_else() {
+// CHECK-LABEL: func @if_else() {
 // CHECK-NEXT:   %0 = call @get_idx() : () -> index
 // CHECK-NEXT:   %c0 = constant 0 : index
 // CHECK-NEXT:   %1 = affine_apply [[setMap20]](%0)
@@ -311,7 +311,7 @@ mlfunc @if_only() {
 // CHECK-NEXT: [[endBB]]:
 // CHECK-NEXT:   return
 // CHECK-NEXT: }
-mlfunc @if_else() {
+func @if_else() {
   %i = call @get_idx() : () -> (index)
   if #set1(%i) {
     call @body(%i) : (index) -> ()
@@ -321,7 +321,7 @@ mlfunc @if_else() {
   return
 }
 
-// CHECK-LABEL: cfgfunc @nested_ifs() {
+// CHECK-LABEL: func @nested_ifs() {
 // CHECK-NEXT:   %0 = call @get_idx() : () -> index
 // CHECK-NEXT:   %c0 = constant 0 : index
 // CHECK-NEXT:   %1 = affine_apply #map12(%0)
@@ -350,7 +350,7 @@ mlfunc @if_else() {
 // CHECK-NEXT: ^bb7:   // 2 preds: ^bb3, ^bb6
 // CHECK-NEXT:   return
 // CHECK-NEXT: }
-mlfunc @nested_ifs() {
+func @nested_ifs() {
   %i = call @get_idx() : () -> (index)
   if #set1(%i) {
     if #set2(%i) {
@@ -366,7 +366,7 @@ mlfunc @nested_ifs() {
 
 #setN = (d0)[N,M,K,L] : (N - d0 + 1 >= 0, N - 1 >= 0, M - 1 >= 0, K - 1 >= 0, L - 42 == 0)
 
-// CHECK-LABEL: cfgfunc @multi_cond(%arg0: index, %arg1: index, %arg2: index, %arg3: index) {
+// CHECK-LABEL: func @multi_cond(%arg0: index, %arg1: index, %arg2: index, %arg3: index) {
 // CHECK-NEXT:   %0 = call @get_idx() : () -> index
 // CHECK-NEXT:   %c0 = constant 0 : index
 // CHECK-NEXT:   %1 = affine_apply [[setMapDiff]](%0)[%arg0, %arg1, %arg2, %arg3]
@@ -397,7 +397,7 @@ mlfunc @nested_ifs() {
 // CHECK-NEXT: [[endBB]]:
 // CHECK-NEXT:   return
 // CHECK-NEXT: }
-mlfunc @multi_cond(%N : index, %M : index, %K : index, %L : index) {
+func @multi_cond(%N : index, %M : index, %K : index, %L : index) {
   %i = call @get_idx() : () -> (index)
   if #setN(%i)[%N,%M,%K,%L] {
     call @body(%i) : (index) -> ()
@@ -407,8 +407,8 @@ mlfunc @multi_cond(%N : index, %M : index, %K : index, %L : index) {
   return
 }
 
-// CHECK-LABEL: cfgfunc @if_for() {
-mlfunc @if_for() {
+// CHECK-LABEL: func @if_for() {
+func @if_for() {
 // CHECK-NEXT:   %0 = call @get_idx() : () -> index
   %i = call @get_idx() : () -> (index)
 // CHECK-NEXT:   %c0 = constant 0 : index
@@ -485,7 +485,7 @@ mlfunc @if_for() {
 #lbMultiMap = (d0)[s0] -> (d0, s0 - d0)
 #ubMultiMap = (d0)[s0] -> (s0, d0 + 10)
 
-// CHECK-LABEL: cfgfunc @loop_min_max(%arg0: index) {
+// CHECK-LABEL: func @loop_min_max(%arg0: index) {
 // CHECK-NEXT:   %{{[0-9]+}} = affine_apply [[map0]]()
 // CHECK-NEXT:   %{{[0-9]+}} = affine_apply [[map42]]()
 // CHECK-NEXT:   br ^bb1(%{{[0-9]+}} : index)
@@ -513,7 +513,7 @@ mlfunc @if_for() {
 // CHECK-NEXT: ^bb6:   // pred: ^bb1
 // CHECK-NEXT:   return
 // CHECK-NEXT: }
-mlfunc @loop_min_max(%N : index) {
+func @loop_min_max(%N : index) {
   for %i = 0 to 42 {
     for %j = max #lbMultiMap(%i)[%N] to min #ubMultiMap(%i)[%N] {
       call @body2(%i, %j) : (index, index) -> ()
@@ -527,7 +527,7 @@ mlfunc @loop_min_max(%N : index) {
 // Check that the "min" (cmpi "slt" + select) reduction sequence is emitted
 // correctly for a an affine map with 7 results.
 
-// CHECK-LABEL: cfgfunc @min_reduction_tree(%arg0: index) {
+// CHECK-LABEL: func @min_reduction_tree(%arg0: index) {
 // CHECK-NEXT:   %{{[0-9]+}} = affine_apply [[map0]]()
 // CHECK-NEXT:   %[[applr:[0-9]+]] = affine_apply [[multi7Map]](%arg0)
 // CHECK-NEXT:   %[[c01:.+]] = cmpi "slt", %[[applr]]#0, %[[applr]]#1 : index
@@ -553,7 +553,7 @@ mlfunc @loop_min_max(%N : index) {
 // CHECK-NEXT: ^bb3:   // pred: ^bb1
 // CHECK-NEXT:   return
 // CHECK-NEXT: }
-mlfunc @min_reduction_tree(%v : index) {
+func @min_reduction_tree(%v : index) {
   for %i = 0 to min #map_7_values(%v)[] {
     call @body(%i) : (index) -> ()
   }
index e7a896940874e99e5435bbd736c94c7933316c41..757844994276746fb9bade8533aa5dbf97f431fa 100644 (file)
@@ -2,8 +2,8 @@
 
 // -----
 
-// CHECK-LABEL: mlfunc @test() {
-mlfunc @test() {
+// CHECK-LABEL: func @test() {
+func @test() {
   %zero = constant 0 : index
   %minusone = constant -1 : index
   %sym = constant 111 : index
@@ -37,8 +37,8 @@ mlfunc @test() {
   return
 }
 
-// CHECK-LABEL: mlfunc @test_mod_floordiv_ceildiv
-mlfunc @test_mod_floordiv_ceildiv() {
+// CHECK-LABEL: func @test_mod_floordiv_ceildiv
+func @test_mod_floordiv_ceildiv() {
   %zero = constant 0 : index
   %A = alloc() : memref<128 x 64 x 64 x i32>
 
@@ -57,8 +57,8 @@ mlfunc @test_mod_floordiv_ceildiv() {
   return
 }
 
-// CHECK-LABEL: mlfunc @test_no_out_of_bounds()
-mlfunc @test_no_out_of_bounds() {
+// CHECK-LABEL: func @test_no_out_of_bounds()
+func @test_no_out_of_bounds() {
   %zero = constant 0 : index
   %A = alloc() : memref<257 x 256 x i32>
   %C = alloc() : memref<257 x i32>
@@ -83,8 +83,8 @@ mlfunc @test_no_out_of_bounds() {
   return
 }
 
-// CHECK-LABEL: mlfunc @mod_div
-mlfunc @mod_div() {
+// CHECK-LABEL: func @mod_div
+func @mod_div() {
   %zero = constant 0 : index
   %A = alloc() : memref<128 x 64 x 64 x i32>
 
@@ -103,8 +103,8 @@ mlfunc @mod_div() {
 }
 
 // Tests with nested mod's and floordiv's.
-// CHECK-LABEL: mlfunc @mod_floordiv_nested() {
-mlfunc @mod_floordiv_nested() {
+// CHECK-LABEL: func @mod_floordiv_nested() {
+func @mod_floordiv_nested() {
   %A = alloc() : memref<256 x 256 x i32>
   for %i = 0 to 256 {
     for %j = 0 to 256 {
@@ -115,8 +115,8 @@ mlfunc @mod_floordiv_nested() {
   return
 }
 
-// CHECK-LABEL: mlfunc @test_semi_affine_bailout
-mlfunc @test_semi_affine_bailout(%N : index) {
+// CHECK-LABEL: func @test_semi_affine_bailout
+func @test_semi_affine_bailout(%N : index) {
   %B = alloc() : memref<10 x i32>
   for %i = 0 to 10 {
     %idx = affine_apply (d0)[s0] -> (d0 * s0)(%i)[%N]
@@ -125,8 +125,8 @@ mlfunc @test_semi_affine_bailout(%N : index) {
   return
 }
 
-// CHECK-LABEL: mlfunc @multi_mod_floordiv
-mlfunc @multi_mod_floordiv() {
+// CHECK-LABEL: func @multi_mod_floordiv
+func @multi_mod_floordiv() {
   %A = alloc() : memref<2x2xi32>
   for %ii = 0 to 64 {
       %idx = affine_apply (d0) -> ((d0 mod 147456) floordiv 1152,
@@ -136,8 +136,8 @@ mlfunc @multi_mod_floordiv() {
   return
 }
 
-// CHECK-LABEL: mlfunc @delinearize_mod_floordiv
-mlfunc @delinearize_mod_floordiv() {
+// CHECK-LABEL: func @delinearize_mod_floordiv
+func @delinearize_mod_floordiv() {
   %c0 = constant 0 : index
   %in = alloc() : memref<2x2x3x3x16x1xi32>
   %out = alloc() : memref<64x9xi32>
index c864873f5b2fdfd1289b51f51f7463364a90f849..888e2e7d24d23f1fd1d2c75da79e0d5524485dc6 100644 (file)
@@ -1,7 +1,7 @@
 // RUN: mlir-opt %s -memref-dataflow-opt -verify | FileCheck %s
 
-// CHECK-LABEL: mlfunc @simple_store_load() {
-mlfunc @simple_store_load() {
+// CHECK-LABEL: func @simple_store_load() {
+func @simple_store_load() {
   %cf7 = constant 7.0 : f32
   %m = alloc() : memref<10xf32>
   for %i0 = 0 to 10 {
@@ -17,8 +17,8 @@ mlfunc @simple_store_load() {
 // CHECK-NEXT:  return
 }
 
-// CHECK-LABEL: mlfunc @multi_store_load() {
-mlfunc @multi_store_load() {
+// CHECK-LABEL: func @multi_store_load() {
+func @multi_store_load() {
   %c0 = constant 0 : index
   %cf7 = constant 7.0 : f32
   %cf8 = constant 8.0 : f32
@@ -49,8 +49,8 @@ mlfunc @multi_store_load() {
 
 // The store-load forwarding can see through affine apply's since it relies on
 // dependence information.
-// CHECK-LABEL: mlfunc @store_load_affine_apply
-mlfunc @store_load_affine_apply() -> memref<10x10xf32> {
+// CHECK-LABEL: func @store_load_affine_apply
+func @store_load_affine_apply() -> memref<10x10xf32> {
   %cf7 = constant 7.0 : f32
   %m = alloc() : memref<10x10xf32>
   for %i0 = 0 to 10 {
@@ -78,8 +78,8 @@ mlfunc @store_load_affine_apply() -> memref<10x10xf32> {
 // CHECK-NEXT:  return %0 : memref<10x10xf32>
 }
 
-// CHECK-LABEL: mlfunc @store_load_nested
-mlfunc @store_load_nested(%N : index) {
+// CHECK-LABEL: func @store_load_nested
+func @store_load_nested(%N : index) {
   %cf7 = constant 7.0 : f32
   %m = alloc() : memref<10xf32>
   for %i0 = 0 to 10 {
@@ -102,8 +102,8 @@ mlfunc @store_load_nested(%N : index) {
 // No forwarding happens here since either of the two stores could be the last
 // writer; store/load forwarding will however be possible here once loop live
 // out SSA scalars are available.
-// CHECK-LABEL: mlfunc @multi_store_load_nested_no_fwd
-mlfunc @multi_store_load_nested_no_fwd(%N : index) {
+// CHECK-LABEL: func @multi_store_load_nested_no_fwd
+func @multi_store_load_nested_no_fwd(%N : index) {
   %cf7 = constant 7.0 : f32
   %cf8 = constant 8.0 : f32
   %m = alloc() : memref<10xf32>
@@ -123,8 +123,8 @@ mlfunc @multi_store_load_nested_no_fwd(%N : index) {
 
 // No forwarding happens here since both stores have a value going into
 // the load.
-// CHECK-LABEL: mlfunc @store_load_store_nested_no_fwd
-mlfunc @store_load_store_nested_no_fwd(%N : index) {
+// CHECK-LABEL: func @store_load_store_nested_no_fwd
+func @store_load_store_nested_no_fwd(%N : index) {
   %cf7 = constant 7.0 : f32
   %cf9 = constant 9.0 : f32
   %m = alloc() : memref<10xf32>
@@ -142,8 +142,8 @@ mlfunc @store_load_store_nested_no_fwd(%N : index) {
 
 // Forwarding happens here since the last store postdominates all other stores
 // and other forwarding criteria are satisfied.
-// CHECK-LABEL: mlfunc @multi_store_load_nested_fwd
-mlfunc @multi_store_load_nested_fwd(%N : index) {
+// CHECK-LABEL: func @multi_store_load_nested_fwd
+func @multi_store_load_nested_fwd(%N : index) {
   %cf7 = constant 7.0 : f32
   %cf8 = constant 8.0 : f32
   %cf9 = constant 9.0 : f32
@@ -168,8 +168,8 @@ mlfunc @multi_store_load_nested_fwd(%N : index) {
 }
 
 // No one-to-one dependence here between the store and load.
-// CHECK-LABEL: mlfunc @store_load_no_fwd
-mlfunc @store_load_no_fwd() {
+// CHECK-LABEL: func @store_load_no_fwd
+func @store_load_no_fwd() {
   %cf7 = constant 7.0 : f32
   %m = alloc() : memref<10xf32>
   for %i0 = 0 to 10 {
@@ -186,8 +186,8 @@ mlfunc @store_load_no_fwd() {
 }
 
 // Forwarding happens here as there is a one-to-one store-load correspondence.
-// CHECK-LABEL: mlfunc @store_load_fwd
-mlfunc @store_load_fwd() {
+// CHECK-LABEL: func @store_load_fwd
+func @store_load_fwd() {
   %cf7 = constant 7.0 : f32
   %c0 = constant 0 : index
   %m = alloc() : memref<10xf32>
@@ -207,7 +207,7 @@ mlfunc @store_load_fwd() {
 // Although there is a dependence from the second store to the load, it is
 // satisfied by the outer surrounding loop, and does not prevent the first
 // store to be forwarded to the load.
-mlfunc @store_load_store_nested_fwd(%N : index) -> f32 {
+func @store_load_store_nested_fwd(%N : index) -> f32 {
   %cf7 = constant 7.0 : f32
   %cf9 = constant 9.0 : f32
   %c0 = constant 0 : index
index 48663882d5a76982fe0eff7582bd509576fc55fd..f7f45b9caf25f2067c9ddb6046315a985b429783 100644 (file)
@@ -4,8 +4,8 @@
 
 #set0 = (d0) : (1 == 0)
 
-// CHECK-LABEL: mlfunc @store_may_execute_before_load() {
-mlfunc @store_may_execute_before_load() {
+// CHECK-LABEL: func @store_may_execute_before_load() {
+func @store_may_execute_before_load() {
   %m = alloc() : memref<10xf32>
   %cf7 = constant 7.0 : f32
   %c0 = constant 4 : index
@@ -31,8 +31,8 @@ mlfunc @store_may_execute_before_load() {
 
 // -----
 
-// CHECK-LABEL: mlfunc @dependent_loops() {
-mlfunc @dependent_loops() {
+// CHECK-LABEL: func @dependent_loops() {
+func @dependent_loops() {
   %0 = alloc() : memref<10xf32>
   %cst = constant 7.000000e+00 : f32
   // There is a dependence from 0 to 1 at depth 1 (common surrounding loops 0)
@@ -53,8 +53,8 @@ mlfunc @dependent_loops() {
 }
 
 // -----
-// CHECK-LABEL: mlfunc @different_memrefs() {
-mlfunc @different_memrefs() {
+// CHECK-LABEL: func @different_memrefs() {
+func @different_memrefs() {
   %m.a = alloc() : memref<100xf32>
   %m.b = alloc() : memref<100xf32>
   %c0 = constant 0 : index
@@ -69,8 +69,8 @@ mlfunc @different_memrefs() {
 }
 
 // -----
-// CHECK-LABEL: mlfunc @store_load_different_elements() {
-mlfunc @store_load_different_elements() {
+// CHECK-LABEL: func @store_load_different_elements() {
+func @store_load_different_elements() {
   %m = alloc() : memref<100xf32>
   %c0 = constant 0 : index
   %c1 = constant 1 : index
@@ -85,8 +85,8 @@ mlfunc @store_load_different_elements() {
 }
 
 // -----
-// CHECK-LABEL: mlfunc @load_store_different_elements() {
-mlfunc @load_store_different_elements() {
+// CHECK-LABEL: func @load_store_different_elements() {
+func @load_store_different_elements() {
   %m = alloc() : memref<100xf32>
   %c0 = constant 0 : index
   %c1 = constant 1 : index
@@ -101,8 +101,8 @@ mlfunc @load_store_different_elements() {
 }
 
 // -----
-// CHECK-LABEL: mlfunc @store_load_same_element() {
-mlfunc @store_load_same_element() {
+// CHECK-LABEL: func @store_load_same_element() {
+func @store_load_same_element() {
   %m = alloc() : memref<100xf32>
   %c11 = constant 11 : index
   %c7 = constant 7.0 : f32
@@ -116,8 +116,8 @@ mlfunc @store_load_same_element() {
 }
 
 // -----
-// CHECK-LABEL: mlfunc @load_load_same_element() {
-mlfunc @load_load_same_element() {
+// CHECK-LABEL: func @load_load_same_element() {
+func @load_load_same_element() {
   %m = alloc() : memref<100xf32>
   %c11 = constant 11 : index
   %c7 = constant 7.0 : f32
@@ -131,8 +131,8 @@ mlfunc @load_load_same_element() {
 }
 
 // -----
-// CHECK-LABEL: mlfunc @store_load_same_symbol(%arg0: index) {
-mlfunc @store_load_same_symbol(%arg0: index) {
+// CHECK-LABEL: func @store_load_same_symbol(%arg0: index) {
+func @store_load_same_symbol(%arg0: index) {
   %m = alloc() : memref<100xf32>
   %c7 = constant 7.0 : f32
   store %c7, %m[%arg0] : memref<100xf32>
@@ -145,8 +145,8 @@ mlfunc @store_load_same_symbol(%arg0: index) {
 }
 
 // -----
-// CHECK-LABEL: mlfunc @store_load_different_symbols(%arg0: index, %arg1: index) {
-mlfunc @store_load_different_symbols(%arg0: index, %arg1: index) {
+// CHECK-LABEL: func @store_load_different_symbols(%arg0: index, %arg1: index) {
+func @store_load_different_symbols(%arg0: index, %arg1: index) {
   %m = alloc() : memref<100xf32>
   %c7 = constant 7.0 : f32
   store %c7, %m[%arg0] : memref<100xf32>
@@ -159,8 +159,8 @@ mlfunc @store_load_different_symbols(%arg0: index, %arg1: index) {
 }
 
 // -----
-// CHECK-LABEL: mlfunc @store_load_diff_element_affine_apply_const() {
-mlfunc @store_load_diff_element_affine_apply_const() {
+// CHECK-LABEL: func @store_load_diff_element_affine_apply_const() {
+func @store_load_diff_element_affine_apply_const() {
   %m = alloc() : memref<100xf32>
   %c1 = constant 1 : index
   %c8 = constant 8.0 : f32
@@ -176,8 +176,8 @@ mlfunc @store_load_diff_element_affine_apply_const() {
 }
 
 // -----
-// CHECK-LABEL: mlfunc @store_load_same_element_affine_apply_const() {
-mlfunc @store_load_same_element_affine_apply_const() {
+// CHECK-LABEL: func @store_load_same_element_affine_apply_const() {
+func @store_load_same_element_affine_apply_const() {
   %m = alloc() : memref<100xf32>
   %c7 = constant 7.0 : f32
   %c9 = constant 9 : index
@@ -194,8 +194,8 @@ mlfunc @store_load_same_element_affine_apply_const() {
 }
 
 // -----
-// CHECK-LABEL: mlfunc @store_load_affine_apply_symbol(%arg0: index) {
-mlfunc @store_load_affine_apply_symbol(%arg0: index) {
+// CHECK-LABEL: func @store_load_affine_apply_symbol(%arg0: index) {
+func @store_load_affine_apply_symbol(%arg0: index) {
   %m = alloc() : memref<100xf32>
   %c7 = constant 7.0 : f32
   %a0 = affine_apply (d0) -> (d0) (%arg0)
@@ -210,8 +210,8 @@ mlfunc @store_load_affine_apply_symbol(%arg0: index) {
 }
 
 // -----
-// CHECK-LABEL: mlfunc @store_load_affine_apply_symbol_offset(%arg0: index) {
-mlfunc @store_load_affine_apply_symbol_offset(%arg0: index) {
+// CHECK-LABEL: func @store_load_affine_apply_symbol_offset(%arg0: index) {
+func @store_load_affine_apply_symbol_offset(%arg0: index) {
   %m = alloc() : memref<100xf32>
   %c7 = constant 7.0 : f32
   %a0 = affine_apply (d0) -> (d0) (%arg0)
@@ -226,8 +226,8 @@ mlfunc @store_load_affine_apply_symbol_offset(%arg0: index) {
 }
 
 // -----
-// CHECK-LABEL: mlfunc @store_range_load_after_range() {
-mlfunc @store_range_load_after_range() {
+// CHECK-LABEL: func @store_range_load_after_range() {
+func @store_range_load_after_range() {
   %m = alloc() : memref<100xf32>
   %c7 = constant 7.0 : f32
   %c10 = constant 10 : index
@@ -249,8 +249,8 @@ mlfunc @store_range_load_after_range() {
 }
 
 // -----
-// CHECK-LABEL: mlfunc @store_load_func_symbol(%arg0: index, %arg1: index) {
-mlfunc @store_load_func_symbol(%arg0: index, %arg1: index) {
+// CHECK-LABEL: func @store_load_func_symbol(%arg0: index, %arg1: index) {
+func @store_load_func_symbol(%arg0: index, %arg1: index) {
   %m = alloc() : memref<100xf32>
   %c7 = constant 7.0 : f32
   %c10 = constant 10 : index
@@ -272,8 +272,8 @@ mlfunc @store_load_func_symbol(%arg0: index, %arg1: index) {
 }
 
 // -----
-// CHECK-LABEL: mlfunc @store_range_load_last_in_range() {
-mlfunc @store_range_load_last_in_range() {
+// CHECK-LABEL: func @store_range_load_last_in_range() {
+func @store_range_load_last_in_range() {
   %m = alloc() : memref<100xf32>
   %c7 = constant 7.0 : f32
   %c10 = constant 10 : index
@@ -300,8 +300,8 @@ mlfunc @store_range_load_last_in_range() {
 }
 
 // -----
-// CHECK-LABEL: mlfunc @store_range_load_before_range() {
-mlfunc @store_range_load_before_range() {
+// CHECK-LABEL: func @store_range_load_before_range() {
+func @store_range_load_before_range() {
   %m = alloc() : memref<100xf32>
   %c7 = constant 7.0 : f32
   %c0 = constant 0 : index
@@ -323,8 +323,8 @@ mlfunc @store_range_load_before_range() {
 }
 
 // -----
-// CHECK-LABEL: mlfunc @store_range_load_first_in_range() {
-mlfunc @store_range_load_first_in_range() {
+// CHECK-LABEL: func @store_range_load_first_in_range() {
+func @store_range_load_first_in_range() {
   %m = alloc() : memref<100xf32>
   %c7 = constant 7.0 : f32
   %c0 = constant 0 : index
@@ -349,8 +349,8 @@ mlfunc @store_range_load_first_in_range() {
 }
 
 // -----
-// CHECK-LABEL: mlfunc @store_plus_3() {
-mlfunc @store_plus_3() {
+// CHECK-LABEL: func @store_plus_3() {
+func @store_plus_3() {
   %m = alloc() : memref<100xf32>
   %c7 = constant 7.0 : f32
   for %i0 = 1 to 11 {
@@ -371,8 +371,8 @@ mlfunc @store_plus_3() {
 }
 
 // -----
-// CHECK-LABEL: mlfunc @load_minus_2() {
-mlfunc @load_minus_2() {
+// CHECK-LABEL: func @load_minus_2() {
+func @load_minus_2() {
   %m = alloc() : memref<100xf32>
   %c7 = constant 7.0 : f32
   for %i0 = 2 to 11 {
@@ -393,8 +393,8 @@ mlfunc @load_minus_2() {
 }
 
 // -----
-// CHECK-LABEL: mlfunc @perfectly_nested_loops_loop_independent() {
-mlfunc @perfectly_nested_loops_loop_independent() {
+// CHECK-LABEL: func @perfectly_nested_loops_loop_independent() {
+func @perfectly_nested_loops_loop_independent() {
   %m = alloc() : memref<10x10xf32>
   %c7 = constant 7.0 : f32
   for %i0 = 0 to 11 {
@@ -422,8 +422,8 @@ mlfunc @perfectly_nested_loops_loop_independent() {
 }
 
 // -----
-// CHECK-LABEL: mlfunc @perfectly_nested_loops_loop_carried_at_depth1() {
-mlfunc @perfectly_nested_loops_loop_carried_at_depth1() {
+// CHECK-LABEL: func @perfectly_nested_loops_loop_carried_at_depth1() {
+func @perfectly_nested_loops_loop_carried_at_depth1() {
   %m = alloc() : memref<10x10xf32>
   %c7 = constant 7.0 : f32
   for %i0 = 0 to 9 {
@@ -451,8 +451,8 @@ mlfunc @perfectly_nested_loops_loop_carried_at_depth1() {
 }
 
 // -----
-// CHECK-LABEL: mlfunc @perfectly_nested_loops_loop_carried_at_depth2() {
-mlfunc @perfectly_nested_loops_loop_carried_at_depth2() {
+// CHECK-LABEL: func @perfectly_nested_loops_loop_carried_at_depth2() {
+func @perfectly_nested_loops_loop_carried_at_depth2() {
   %m = alloc() : memref<10x10xf32>
   %c7 = constant 7.0 : f32
   for %i0 = 0 to 10 {
@@ -480,8 +480,8 @@ mlfunc @perfectly_nested_loops_loop_carried_at_depth2() {
 }
 
 // -----
-// CHECK-LABEL: mlfunc @one_common_loop() {
-mlfunc @one_common_loop() {
+// CHECK-LABEL: func @one_common_loop() {
+func @one_common_loop() {
   %m = alloc() : memref<10x10xf32>
   %c7 = constant 7.0 : f32
   // There is a loop-independent dependence from access 0 to 1 at depth 2.
@@ -509,8 +509,8 @@ mlfunc @one_common_loop() {
 }
 
 // -----
-// CHECK-LABEL: mlfunc @dependence_cycle() {
-mlfunc @dependence_cycle() {
+// CHECK-LABEL: func @dependence_cycle() {
+func @dependence_cycle() {
   %m.a = alloc() : memref<100xf32>
   %m.b = alloc() : memref<100xf32>
 
@@ -563,8 +563,8 @@ mlfunc @dependence_cycle() {
 }
 
 // -----
-// CHECK-LABEL: mlfunc @negative_and_positive_direction_vectors(%arg0: index, %arg1: index) {
-mlfunc @negative_and_positive_direction_vectors(%arg0: index, %arg1: index) {
+// CHECK-LABEL: func @negative_and_positive_direction_vectors(%arg0: index, %arg1: index) {
+func @negative_and_positive_direction_vectors(%arg0: index, %arg1: index) {
   %m = alloc() : memref<10x10xf32>
   %c7 = constant 7.0 : f32
   for %i0 = 0 to %arg0 {
@@ -591,8 +591,8 @@ mlfunc @negative_and_positive_direction_vectors(%arg0: index, %arg1: index) {
 }
 
 // -----
-// CHECK-LABEL: mlfunc @war_raw_waw_deps() {
-mlfunc @war_raw_waw_deps() {
+// CHECK-LABEL: func @war_raw_waw_deps() {
+func @war_raw_waw_deps() {
   %m = alloc() : memref<100xf32>
   %c7 = constant 7.0 : f32
   for %i0 = 0 to 10 {
@@ -619,8 +619,8 @@ mlfunc @war_raw_waw_deps() {
 }
 
 // -----
-// CHECK-LABEL: mlfunc @mod_deps() {
-mlfunc @mod_deps() {
+// CHECK-LABEL: func @mod_deps() {
+func @mod_deps() {
   %m = alloc() : memref<100xf32>
   %c7 = constant 7.0 : f32
   for %i0 = 0 to 10 {
@@ -643,8 +643,8 @@ mlfunc @mod_deps() {
 }
 
 // -----
-// CHECK-LABEL: mlfunc @loop_nest_depth() {
-mlfunc @loop_nest_depth() {
+// CHECK-LABEL: func @loop_nest_depth() {
+func @loop_nest_depth() {
   %0 = alloc() : memref<100x100xf32>
   %c7 = constant 7.0 : f32
 
@@ -679,8 +679,8 @@ mlfunc @loop_nest_depth() {
 // -----
 // Test case to exercise sanity when flattening multiple expressions involving
 // mod/div's successively.
-// CHECK-LABEL: mlfunc @mod_div_3d() {
-mlfunc @mod_div_3d() {
+// CHECK-LABEL: func @mod_div_3d() {
+func @mod_div_3d() {
   %M = alloc() : memref<2x2x2xi32>
   %c0 = constant 0 : i32
   for %i0 = 0 to 8 {
@@ -700,8 +700,8 @@ mlfunc @mod_div_3d() {
 
 // -----
 // This test case arises in the context of a 6-d to 2-d reshape.
-// CHECK-LABEL: mlfunc @delinearize_mod_floordiv
-mlfunc @delinearize_mod_floordiv() {
+// CHECK-LABEL: func @delinearize_mod_floordiv
+func @delinearize_mod_floordiv() {
   %c0 = constant 0 : index
   %val = constant 0 : i32
   %in = alloc() : memref<2x2x3x3x16x1xi32>
index 1295585459bea9a6230ea684e8bc7d856d8cadda..2e427c6280802af3bcc5a13689c09d0dbb1fa512 100644 (file)
@@ -4,8 +4,8 @@
 // CHECK-DAG: [[MOD_2:#map[0-9]+]] = (d0) -> (d0 mod 2)
 // CHECK-DAG: [[REMAP_SHIFT_MINUS_4:#map[0-9]+]] = (d0) -> (d0 - 4)
 
-// CHECK-LABEL: mlfunc @loop_nest_dma() {
-mlfunc @loop_nest_dma() {
+// CHECK-LABEL: func @loop_nest_dma() {
+func @loop_nest_dma() {
 // CHECK:        %0 = alloc() : memref<256xf32>
 // CHECK:        %1 = alloc() : memref<2x32xf32, 1>
 // CHECK:        %2 = alloc() : memref<2x1xf32>
@@ -58,7 +58,7 @@ mlfunc @loop_nest_dma() {
 }
 
 // CHECK-LABEL: @loop_step
-mlfunc @loop_step(%arg0: memref<512xf32>,
+func @loop_step(%arg0: memref<512xf32>,
                   %arg1: memref<512xf32>) {
   %c0 = constant 0 : index
   %c4 = constant 4 : index
@@ -95,8 +95,8 @@ mlfunc @loop_step(%arg0: memref<512xf32>,
 #map0 = (d0, d1) -> (d0, d1)
 #map1 = (d0, d1) -> ((d0 * 2048 + d1 * 256) floordiv 32, 0)
 #map2 = (d0) -> ((d0 * 2048) floordiv 32, 0)
-// CHECK: mlfunc @loop_dma_nested(%arg0: memref<512x32xvector<8xf32>
-mlfunc @loop_dma_nested(%arg0: memref<512x32xvector<8xf32>, #map0>, %arg1: memref<512x32xvector<8xf32>, #map0>, %arg2: memref<512x32xvector<8xf32>, #map0>) {
+// CHECK: func @loop_dma_nested(%arg0: memref<512x32xvector<8xf32>
+func @loop_dma_nested(%arg0: memref<512x32xvector<8xf32>, #map0>, %arg1: memref<512x32xvector<8xf32>, #map0>, %arg2: memref<512x32xvector<8xf32>, #map0>) {
   %num_elts = constant 256 : index
   %c0 = constant 0 : index
   %0 = alloc() : memref<64x4xvector<8xf32>, #map0, 2>
@@ -160,8 +160,8 @@ mlfunc @loop_dma_nested(%arg0: memref<512x32xvector<8xf32>, #map0>, %arg1: memre
   return // CHECK-NEXT: return
 }
 
-// CHECK: mlfunc @loop_dma_dependent
-mlfunc @loop_dma_dependent(%arg2: memref<512x32xvector<8xf32>>) {
+// CHECK: func @loop_dma_dependent
+func @loop_dma_dependent(%arg2: memref<512x32xvector<8xf32>>) {
   %num_elts = constant 256 : index
   %c0 = constant 0 : index
   %0 = alloc() : memref<64x4xvector<8xf32>, 2>
@@ -186,8 +186,8 @@ mlfunc @loop_dma_dependent(%arg2: memref<512x32xvector<8xf32>>) {
   return // CHECK-NEXT: return
 }
 
-// CHECK-LABEL: mlfunc @escaping_use
-mlfunc @escaping_use(%arg0: memref<512 x 32 x f32>) {
+// CHECK-LABEL: func @escaping_use
+func @escaping_use(%arg0: memref<512 x 32 x f32>) {
   %c32 = constant 32 : index
   %num_elt = constant 512 : index
   %zero = constant 0 : index
@@ -210,8 +210,8 @@ mlfunc @escaping_use(%arg0: memref<512 x 32 x f32>) {
 // CHECK-NEXT: return
 }
 
-// CHECK-LABEL: mlfunc @live_out_use
-mlfunc @live_out_use(%arg0: memref<512 x 32 x f32>) -> f32 {
+// CHECK-LABEL: func @live_out_use
+func @live_out_use(%arg0: memref<512 x 32 x f32>) -> f32 {
   %c32 = constant 32 : index
   %num_elt = constant 512 : index
   %zero = constant 0 : index
@@ -233,8 +233,8 @@ mlfunc @live_out_use(%arg0: memref<512 x 32 x f32>) -> f32 {
 // CHECK-NEXT: return
 }
 
-// CHECK-LABEL: mlfunc @dynamic_shape_dma_buffer
-mlfunc @dynamic_shape_dma_buffer(%arg0: memref<512 x 32 x f32>) {
+// CHECK-LABEL: func @dynamic_shape_dma_buffer
+func @dynamic_shape_dma_buffer(%arg0: memref<512 x 32 x f32>) {
   %c32 = constant 32 : index
   %num_elt = constant 512 : index
   %zero = constant 0 : index
index b327a1b448ac7ccf32ae5cabe644a7ae377c4df9..7c184742e08872d90b80c6f21f2686242f78ea13 100644 (file)
@@ -56,7 +56,7 @@
                              d0 * 7 + d1 * 5 + s0 * 11 + s1 == 0,
                              d0 - 1 == 0, d0 + 2 == 0)
 
-mlfunc @test() {
+func @test() {
   for %n0 = 0 to 127 {
     for %n1 = 0 to 7 {
       %x  = affine_apply #map0(%n0, %n1)
@@ -72,8 +72,8 @@ mlfunc @test() {
   return
 }
 
-// CHECK-LABEL: mlfunc @test_gaussian_elimination_empty_set0() {
-mlfunc @test_gaussian_elimination_empty_set0() {
+// CHECK-LABEL: func @test_gaussian_elimination_empty_set0() {
+func @test_gaussian_elimination_empty_set0() {
   for %i0 = 1 to 10 {
     for %i1 = 1 to 100 {
       // CHECK: [[SET_EMPTY_2D]](%i0, %i1)
@@ -84,8 +84,8 @@ mlfunc @test_gaussian_elimination_empty_set0() {
   return
 }
 
-// CHECK-LABEL: mlfunc @test_gaussian_elimination_empty_set1() {
-mlfunc @test_gaussian_elimination_empty_set1() {
+// CHECK-LABEL: func @test_gaussian_elimination_empty_set1() {
+func @test_gaussian_elimination_empty_set1() {
   for %i0 = 1 to 10 {
     for %i1 = 1 to 100 {
       // CHECK: [[SET_EMPTY_2D]](%i0, %i1)
@@ -96,8 +96,8 @@ mlfunc @test_gaussian_elimination_empty_set1() {
   return
 }
 
-// CHECK-LABEL: mlfunc @test_gaussian_elimination_non_empty_set2() {
-mlfunc @test_gaussian_elimination_non_empty_set2() {
+// CHECK-LABEL: func @test_gaussian_elimination_non_empty_set2() {
+func @test_gaussian_elimination_non_empty_set2() {
   for %i0 = 1 to 10 {
     for %i1 = 1 to 100 {
       // CHECK: #set1(%i0, %i1)
@@ -108,8 +108,8 @@ mlfunc @test_gaussian_elimination_non_empty_set2() {
   return
 }
 
-// CHECK-LABEL: mlfunc @test_gaussian_elimination_empty_set3() {
-mlfunc @test_gaussian_elimination_empty_set3() {
+// CHECK-LABEL: func @test_gaussian_elimination_empty_set3() {
+func @test_gaussian_elimination_empty_set3() {
   %c7 = constant 7 : index
   %c11 = constant 11 : index
   for %i0 = 1 to 10 {
@@ -122,8 +122,8 @@ mlfunc @test_gaussian_elimination_empty_set3() {
   return
 }
 
-// CHECK-LABEL: mlfunc @test_gaussian_elimination_non_empty_set4() {
-mlfunc @test_gaussian_elimination_non_empty_set4() {
+// CHECK-LABEL: func @test_gaussian_elimination_non_empty_set4() {
+func @test_gaussian_elimination_non_empty_set4() {
   %c7 = constant 7 : index
   %c11 = constant 11 : index
   for %i0 = 1 to 10 {
@@ -136,8 +136,8 @@ mlfunc @test_gaussian_elimination_non_empty_set4() {
   return
 }
 
-// CHECK-LABEL: mlfunc @test_gaussian_elimination_empty_set5() {
-mlfunc @test_gaussian_elimination_empty_set5() {
+// CHECK-LABEL: func @test_gaussian_elimination_empty_set5() {
+func @test_gaussian_elimination_empty_set5() {
   %c7 = constant 7 : index
   %c11 = constant 11 : index
   for %i0 = 1 to 10 {
@@ -150,8 +150,8 @@ mlfunc @test_gaussian_elimination_empty_set5() {
   return
 }
 
-// CHECK-LABEL: mlfunc @test_empty_set(%arg0: index) {
-mlfunc @test_empty_set(%N : index) {
+// CHECK-LABEL: func @test_empty_set(%arg0: index) {
+func @test_empty_set(%N : index) {
   for %i = 0 to 10 {
     for %j = 0 to 10 {
       // CHECK: if [[SET_EMPTY_2D]](%i0, %i1)
index 86ef73a5c30899d0dc3b3ed4b25d02365115bb32..6032fe6ca3f321c69f42801e979838028e2238ac 100644 (file)
@@ -12,7 +12,7 @@
 ///     |_______________|
 ///             |
 ///             9
-mlfunc @slicing_test() {
+func @slicing_test() {
   // Fake 0 to align on 1 and match ASCII art.
   %0 = alloc() : memref<1xi32>
 
index d63de7ae4ba8f9d9d4ddbe4e1b3383fd1bd91533..7ac959c8c17249ce576f4a7db767bcdda367ff14 100644 (file)
@@ -4,8 +4,8 @@
 // This should be matched to M1, but M1 is defined later.
 // CHECK: {{#map[0-9]+}} = ()[s0] -> (s0 + 8)
 
-// CHECK-LABEL: mlfunc @unroll_jam_imperfect_nest() {
-mlfunc @unroll_jam_imperfect_nest() {
+// CHECK-LABEL: func @unroll_jam_imperfect_nest() {
+func @unroll_jam_imperfect_nest() {
   // CHECK: %c100 = constant 100 : index
   // CHECK-NEXT: for %i0 = 0 to 99 step 2 {
   for %i = 0 to 101 {
@@ -37,8 +37,8 @@ mlfunc @unroll_jam_imperfect_nest() {
   return
 }
 
-// UNROLL-BY-4-LABEL: mlfunc @loop_nest_unknown_count_1(%arg0: index) {
-mlfunc @loop_nest_unknown_count_1(%N : index) {
+// UNROLL-BY-4-LABEL: func @loop_nest_unknown_count_1(%arg0: index) {
+func @loop_nest_unknown_count_1(%N : index) {
   // UNROLL-BY-4-NEXT: for %i0 = 1 to  #map{{[0-9]+}}()[%arg0] step 4 {
     // UNROLL-BY-4-NEXT: for %i1 = 1 to 100 {
       // UNROLL-BY-4-NEXT: %0 = "foo"() : () -> i32
@@ -62,8 +62,8 @@ mlfunc @loop_nest_unknown_count_1(%N : index) {
   return
 }
 
-// UNROLL-BY-4-LABEL: mlfunc @loop_nest_unknown_count_2(%arg0: index) {
-mlfunc @loop_nest_unknown_count_2(%arg : index) {
+// UNROLL-BY-4-LABEL: func @loop_nest_unknown_count_2(%arg0: index) {
+func @loop_nest_unknown_count_2(%arg : index) {
   // UNROLL-BY-4-NEXT: for %i0 = %arg0 to  #map{{[0-9]+}}()[%arg0] step 4 {
     // UNROLL-BY-4-NEXT: for %i1 = 1 to 100 {
       // UNROLL-BY-4-NEXT: %0 = "foo"(%i0) : (index) -> i32
index f420d045a4c273eb8bcca8a8dd5a29c52361b090..983017e2bebdf4e65ef54b414d64d1ce38aa51e5 100644 (file)
@@ -40,8 +40,8 @@
 // UNROLL-BY-4: #map8 = (d0) -> (d0 + 10)
 // UNROLL-BY-4: #map9 = (d0) -> (d0 + 15)
 
-// CHECK-LABEL: mlfunc @loop_nest_simplest() {
-mlfunc @loop_nest_simplest() {
+// CHECK-LABEL: func @loop_nest_simplest() {
+func @loop_nest_simplest() {
   // CHECK: for %i0 = 0 to 100 step 2 {
   for %i = 0 to 100 step 2 {
     // CHECK: %c1_i32 = constant 1 : i32
@@ -55,8 +55,8 @@ mlfunc @loop_nest_simplest() {
   return  // CHECK:  return
 }         // CHECK }
 
-// CHECK-LABEL: mlfunc @loop_nest_simple_iv_use() {
-mlfunc @loop_nest_simple_iv_use() {
+// CHECK-LABEL: func @loop_nest_simple_iv_use() {
+func @loop_nest_simple_iv_use() {
   // CHECK: %c0 = constant 0 : index
   // CHECK-NEXT: for %i0 = 0 to 100 step 2 {
   for %i = 0 to 100 step 2 {
@@ -75,8 +75,8 @@ mlfunc @loop_nest_simple_iv_use() {
 }         // CHECK }
 
 // Operations in the loop body have results that are used therein.
-// CHECK-LABEL: mlfunc @loop_nest_body_def_use() {
-mlfunc @loop_nest_body_def_use() {
+// CHECK-LABEL: func @loop_nest_body_def_use() {
+func @loop_nest_body_def_use() {
   // CHECK: %c0 = constant 0 : index
   // CHECK-NEXT: for %i0 = 0 to 100 step 2 {
   for %i = 0 to 100 step 2 {
@@ -102,8 +102,8 @@ mlfunc @loop_nest_body_def_use() {
   return  // CHECK:  return
 }         // CHECK }
 
-// CHECK-LABEL: mlfunc @loop_nest_strided() {
-mlfunc @loop_nest_strided() {
+// CHECK-LABEL: func @loop_nest_strided() {
+func @loop_nest_strided() {
   // CHECK: %c2 = constant 2 : index
   // CHECK-NEXT: %c2_0 = constant 2 : index
   // CHECK-NEXT: for %i0 = 0 to 100 {
@@ -135,8 +135,8 @@ mlfunc @loop_nest_strided() {
   return  // CHECK:  return
 }         // CHECK }
 
-// CHECK-LABEL: mlfunc @loop_nest_multiple_results() {
-mlfunc @loop_nest_multiple_results() {
+// CHECK-LABEL: func @loop_nest_multiple_results() {
+func @loop_nest_multiple_results() {
   // CHECK: %c0 = constant 0 : index
   // CHECK-NEXT: for %i0 = 0 to 100 {
   for %i = 0 to 100 {
@@ -163,8 +163,8 @@ mlfunc @loop_nest_multiple_results() {
 
 
 // Imperfect loop nest. Unrolling innermost here yields a perfect nest.
-// CHECK-LABEL: mlfunc @loop_nest_seq_imperfect(%arg0: memref<128x128xf32>) {
-mlfunc @loop_nest_seq_imperfect(%a : memref<128x128xf32>) {
+// CHECK-LABEL: func @loop_nest_seq_imperfect(%arg0: memref<128x128xf32>) {
+func @loop_nest_seq_imperfect(%a : memref<128x128xf32>) {
   // CHECK: %c0 = constant 0 : index
   // CHECK-NEXT: %c128 = constant 128 : index
   %c128 = constant 128 : index
@@ -201,8 +201,8 @@ mlfunc @loop_nest_seq_imperfect(%a : memref<128x128xf32>) {
   return  // CHECK:  return
 }
 
-// CHECK-LABEL: mlfunc @loop_nest_seq_multiple() {
-mlfunc @loop_nest_seq_multiple() {
+// CHECK-LABEL: func @loop_nest_seq_multiple() {
+func @loop_nest_seq_multiple() {
   // CHECK: c0 = constant 0 : index
   // CHECK-NEXT: %c0_0 = constant 0 : index
   // CHECK-NEXT: %0 = affine_apply #map0(%c0_0)
@@ -247,8 +247,8 @@ mlfunc @loop_nest_seq_multiple() {
   return  // CHECK:  return
 }         // CHECK }
 
-// SHORT-LABEL: mlfunc @loop_nest_outer_unroll() {
-mlfunc @loop_nest_outer_unroll() {
+// SHORT-LABEL: func @loop_nest_outer_unroll() {
+func @loop_nest_outer_unroll() {
   // SHORT:      for %i0 = 0 to 4 {
   // SHORT-NEXT:   %0 = affine_apply #map0(%i0)
   // SHORT-NEXT:   %1 = "addi32"(%0, %0) : (index, index) -> index
@@ -270,8 +270,8 @@ mlfunc @loop_nest_outer_unroll() {
 // We aren't doing any file check here. We just need this test case to
 // successfully run. Both %i0 and i1 will get unrolled here with the min trip
 // count threshold set to 2.
-// SHORT-LABEL: mlfunc @loop_nest_seq_long() -> i32 {
-mlfunc @loop_nest_seq_long() -> i32 {
+// SHORT-LABEL: func @loop_nest_seq_long() -> i32 {
+func @loop_nest_seq_long() -> i32 {
   %A = alloc() : memref<512 x 512 x i32, (d0, d1) -> (d0, d1), 2>
   %B = alloc() : memref<512 x 512 x i32, (d0, d1) -> (d0, d1), 2>
   %C = alloc() : memref<512 x 512 x i32, (d0, d1) -> (d0, d1), 2>
@@ -318,8 +318,8 @@ mlfunc @loop_nest_seq_long() -> i32 {
   return %ret : i32
 }
 
-// UNROLL-BY-4-LABEL: mlfunc @unroll_unit_stride_no_cleanup() {
-mlfunc @unroll_unit_stride_no_cleanup() {
+// UNROLL-BY-4-LABEL: func @unroll_unit_stride_no_cleanup() {
+func @unroll_unit_stride_no_cleanup() {
   // UNROLL-BY-4: for %i0 = 0 to 100 {
   for %i = 0 to 100 {
     // UNROLL-BY-4: for [[L1:%i[0-9]+]] = 0 to 8 step 4 {
@@ -347,8 +347,8 @@ mlfunc @unroll_unit_stride_no_cleanup() {
   return
 }
 
-// UNROLL-BY-4-LABEL: mlfunc @unroll_unit_stride_cleanup() {
-mlfunc @unroll_unit_stride_cleanup() {
+// UNROLL-BY-4-LABEL: func @unroll_unit_stride_cleanup() {
+func @unroll_unit_stride_cleanup() {
   // UNROLL-BY-4: for %i0 = 0 to 100 {
   for %i = 0 to 100 {
     // UNROLL-BY-4: for [[L1:%i[0-9]+]] = 0 to 7 step 4 {
@@ -376,8 +376,8 @@ mlfunc @unroll_unit_stride_cleanup() {
   return
 }
 
-// UNROLL-BY-4-LABEL: mlfunc @unroll_non_unit_stride_cleanup() {
-mlfunc @unroll_non_unit_stride_cleanup() {
+// UNROLL-BY-4-LABEL: func @unroll_non_unit_stride_cleanup() {
+func @unroll_non_unit_stride_cleanup() {
   // UNROLL-BY-4: for %i0 = 0 to 100 {
   for %i = 0 to 100 {
     // UNROLL-BY-4: for [[L1:%i[0-9]+]] = 2 to 37 step 20 {
@@ -406,7 +406,7 @@ mlfunc @unroll_non_unit_stride_cleanup() {
 }
 
 // Both the unrolled loop and the cleanup loop are single iteration loops.
-mlfunc @loop_nest_single_iteration_after_unroll(%N: index) {
+func @loop_nest_single_iteration_after_unroll(%N: index) {
   // UNROLL-BY-4: %c0 = constant 0 : index
   // UNROLL-BY-4: %c4 = constant 4 : index
   // UNROLL-BY-4: for %i0 = 0 to %arg0 {
@@ -430,8 +430,8 @@ mlfunc @loop_nest_single_iteration_after_unroll(%N: index) {
 // Test cases with loop bound operands.
 
 // No cleanup will be generated here.
-// UNROLL-BY-4-LABEL: mlfunc @loop_nest_operand1() {
-mlfunc @loop_nest_operand1() {
+// UNROLL-BY-4-LABEL: func @loop_nest_operand1() {
+func @loop_nest_operand1() {
 // UNROLL-BY-4:      for %i0 = 0 to 100 step 2 {
 // UNROLL-BY-4-NEXT:   for %i1 = (d0) -> (0)(%i0) to #map{{[0-9]+}}(%i0) step 4
 // UNROLL-BY-4-NEXT:      %0 = "foo"() : () -> i32
@@ -450,8 +450,8 @@ mlfunc @loop_nest_operand1() {
 }
 
 // No cleanup will be generated here.
-// UNROLL-BY-4-LABEL: mlfunc @loop_nest_operand2() {
-mlfunc @loop_nest_operand2() {
+// UNROLL-BY-4-LABEL: func @loop_nest_operand2() {
+func @loop_nest_operand2() {
 // UNROLL-BY-4:      for %i0 = 0 to 100 step 2 {
 // UNROLL-BY-4-NEXT:   for %i1 = (d0) -> (d0)(%i0) to #map{{[0-9]+}}(%i0) step 4 {
 // UNROLL-BY-4-NEXT:     %0 = "foo"() : () -> i32
@@ -471,8 +471,8 @@ mlfunc @loop_nest_operand2() {
 
 // Difference between loop bounds is constant, but not a multiple of unroll
 // factor. The cleanup loop happens to be a single iteration one and is promoted.
-// UNROLL-BY-4-LABEL: mlfunc @loop_nest_operand3() {
-mlfunc @loop_nest_operand3() {
+// UNROLL-BY-4-LABEL: func @loop_nest_operand3() {
+func @loop_nest_operand3() {
   // UNROLL-BY-4: for %i0 = 0 to 100 step 2 {
   for %i = 0 to 100 step 2 {
     // UNROLL-BY-4: for %i1 = (d0) -> (d0)(%i0) to #map{{[0-9]+}}(%i0) step 4 {
@@ -489,8 +489,8 @@ mlfunc @loop_nest_operand3() {
   return
 }
 
-// UNROLL-BY-4-LABEL: mlfunc @loop_nest_operand4(%arg0: index) {
-mlfunc @loop_nest_operand4(%N : index) {
+// UNROLL-BY-4-LABEL: func @loop_nest_operand4(%arg0: index) {
+func @loop_nest_operand4(%N : index) {
   // UNROLL-BY-4: for %i0 = 0 to 100 {
   for %i = 0 to 100 {
     // UNROLL-BY-4: for %i1 = ()[s0] -> (0)()[%arg0] to #map{{[0-9]+}}()[%arg0] step 4 {
@@ -511,8 +511,8 @@ mlfunc @loop_nest_operand4(%N : index) {
   return
 }
 
-// CHECK-LABEL: mlfunc @loop_nest_unroll_full() {
-mlfunc @loop_nest_unroll_full() {
+// CHECK-LABEL: func @loop_nest_unroll_full() {
+func @loop_nest_unroll_full() {
   // CHECK-NEXT: %0 = "foo"() : () -> i32
   // CHECK-NEXT: %1 = "bar"() : () -> i32
   // CHECK-NEXT:  return