| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[mlir][AffineExpr] Order arguments in the commutative affine exprs (#146895) Order symbol/dim arguments by position and put dims before symbols. This is to help affine simplifications. | 1 年前 | |
[mlir] Refactor alias generation to support nested aliases We currently only support one level of aliases, which isn't great in situations where an attribute/type can have multiple duplicated components nested within it(e.g. debuginfo metadata). This commit refactors alias generation to support nested aliases, which requires changing alias grouping to take into account the depth of child aliases, to ensure that attributes/types aren't printed before the aliases they use. The only real user facing change here was that we no longer print 0 as an alias suffix, which would be unnecessarily expensive to keep in the new alias generation method (and isn't that valuable of a behavior to preserve). Differential Revision: https://reviews.llvm.org/D136541 | 3 年前 | |
[MLIR] Fix typo bug in AffineExprVisitor for WalkResult return case (#86138) Fix typo bug in AffineExprVisitor for the WalkResult return case. This didn't show up immmediately because most walks in the tree didn't use walk result. | 2 年前 | |
[mlir][IR] Fix enum attribute handling by using parseKeywordOrString instead of parseKeyword (#156662) Change enum attribute parsing to handle special characters and multi-word identifiers. This allows enum attrs to use symbols like "+" and strings with separators like "dash-separated-sentence" instead of being limited to valid identifiers. This also aligns enum attribute parsing with how enums are already handled by the FieldParser: https://github.com/llvm/llvm-project/blob/main/mlir/tools/mlir-tblgen/EnumsGen.cpp#L108 Signed-off-by: Fabian Mora <fabian.mora-cordero@amd.com> | 10 个月前 | |
[mlir] Remove special case parsing/printing of func operations This was leftover from when the standard dialect was destroyed, and when FuncOp moved to the func dialect. Now that these transitions have settled a bit we can drop these. Most updates were handled using a simple regex: replace ^( *)func with $1func.func Differential Revision: https://reviews.llvm.org/D124146 | 4 年前 | |
| 1 年前 | ||
Add custom lilith script. Add custom lilith script with paths set to MLIR tools directories to simplify lit test. PiperOrigin-RevId: 209486232 | 7 年前 | |
[MLIR] NFC. Move leftover memref op test cases out of test/IR (#115583) Move memref dialect ops' test cases of test/IR/. It was also surprising to not find test cases of ops like memref.view in test/Dialect/MemRef/. NFC. | 1 年前 | |
[MLIR] Extend floating point parsing support (#90442) Parsing support for floating point types was missing a few features: 1. Parsing floating point attributes from integer literals was supported only for types with bitwidth smaller or equal to 64. 2. Downstream users could not use AsmParser::parseFloat to parse float types which are printed as integer literals. This commit addresses both these points. It extends Parser::parseFloatFromIntegerLiteral to support arbitrary bitwidth, and exposes a new API to parse arbitrary floating point given an fltSemantics as input. The usage of this new API is introduced in the Test Dialect. | 2 年前 | |
[mlir][ods] Fix generation of optional custom parsers (#84821) We need to generate .has_value for OptionalParseResult, also ensure that auto result doesn't conflict with result which is the variable name for OperationState. | 2 年前 | |
[mlir][tblgen] Add custom parsing and printing within struct (#133939) This PR extends the struct directive in tablegen to support nested custom directives. Note that this assumes/verifies that that custom directive has a single parameter. This enables defining custom field parsing and printing functions if the struct directive doesn't suffice. There is some existing potential downstream usage for it: https://github.com/openxla/stablehlo/blob/a3c7de92425e8035437dae67ab2318a82eca79a1/stablehlo/dialect/StablehloOps.cpp#L3102 | 1 年前 | |
[mlir] Convert raw data in dense element attributes for big-endian machines. This patch fixes a bug [[ https://bugs.llvm.org/show_bug.cgi?id=46091 | 46091 ]] Raw data for the dense-element attribute is written in little endian (LE) format. This commit converts the format to big endian (BE) in ʻAttribute Parser` on the BE machine. Also, when outputting on a BE machine, the BE format is converted to LE in "AsmPrinter". Differential Revision: https://reviews.llvm.org/D80695 | 5 年前 | |
[MLIR] print/parse resource handle key quoted and escaped (#119746) resource keys have the problem that you can’t parse them from mlir assembly if they have special or non-printable characters, but nothing prevents you from specifying such a key when you create e.g. a DenseResourceElementsAttr, and it works fine in other ways, including bytecode emission and parsing this PR solves the parsing by quoting and escaping keys with special or non-printable characters in mlir assembly, in the same way as symbols, e.g.: module attributes { fst = dense_resource<resource_fst> : tensor<2xf16>, snd = dense_resource<"resource\09snd"> : tensor<2xf16> } {} {-# dialect_resources: { builtin: { resource_fst: "0x0200000001000200", "resource\09snd": "0x0200000008000900" } } #-} by not quoting keys without special or non-printable characters, the change is effectively backwards compatible the change is tested by: 1. adding a test with a dense resource handle key with special characters to dense-resource-elements-attr.mlir 2. adding special and unprintable characters to some resource keys in the existing lit tests pretty-resources-print.mlir and mlir/test/Bytecode/resources.mlir | 1 年前 | |
[mlir][Pass] Include anchor op in -pass-pipeline In D134622 the printed form of a pass manager is changed to include the name of the op that the pass manager is anchored on. This updates the -pass-pipeline argument format to include the anchor op as well, so that the printed form of a pipeline can be directly passed to -pass-pipeline. In most cases this requires updating -pass-pipeline='pipeline' to -pass-pipeline='builtin.module(pipeline)'. This also fixes an outdated assert that prevented running a PassManager anchored on 'any'. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D134900 | 3 年前 | |
[mlir] Add metadata to Diagnostic. (#99398) Add metadata to Diagnostic. Motivation: we have a use case where we want to do some filtering in our customized Diagnostic Handler based on some customized info that is not location or severity or diagnostic arguments that are member variables of Diagnostic. Specifically, we want to add a unique ID to the Diagnostic for the handler to filter in a compiler pass that emits errors in async tasks with multithreading and the diagnostic handling is associated to the task. This patch adds a field of metadata to mlir::Diagnostics as a general solution. metadata is of type SmallVector<DiagnosticArgument, 0> to save memory size and reuse existing DiagnosticArgument for metadata type. | 1 年前 | |
[mlir] Add support for regex within expected-* diagnostics This can be enabled by using a -re suffix when defining the expected line, e.g. expected-error-re. This support is similar to what clang provides in its "expected" diagnostic framework(e.g. the -re is also the same). The regex definitions themselves are similar to FileCheck in that regex blocks are specified within {{ }} blocks. Differential Revision: https://reviews.llvm.org/D129343 | 3 年前 | |
[mlir:ODS] Support using attributes in AllTypesMatch to automatically add InferTypeOpInterface This allows for using attribute types in result type inference for use with InferTypeOpInterface. This was a TODO before, but it isn't much additional work to properly support this. After this commit, arith::ConstantOp can now have its InferTypeOpInterface implementation automatically generated. Differential Revision: https://reviews.llvm.org/D124580 | 4 年前 | |
[mlir] Report line number from file rather than split (#150982) Add convention for lexer if the last file is contained in the first, then the first is used for error reporting. This requires that these two overlap to make it easy to find the corresponding spots. Enables going from within split at mlir/test/IR/invalid.mlir::10 offset :6:9: error: reference to an undefined block to mlir/test/IR/invalid.mlir:15:9: error: reference to an undefined block This does change the split to not produce always null terminated buffers and tools that need it, need to do so themselves (which is mostly by copying - this may have little actual impact as previously this was a copy too). | 11 个月前 | |
[mlir] Improve syntax of distinct[n]<unit> In cases where memory is of less of a concern (e.g. small attributes where all instances have to be distinct by definition), using DistinctAttr with a unit attribute is a useful and conscious way of generating deterministic unique IDs. The syntax as is however, makes them less useful to use, as it 1) always prints <unit> at the back and 2) always aliases them leading to not very useful #distinct = distinct[n]<unit> lines in the printer output. This patch fixes that by special casing UnitAttr to simply elide the unit attribute in the back and not printing it as alias in that case. Differential Revision: https://reviews.llvm.org/D155162 | 2 年前 | |
[mlir] Add Dynamic Dialects Dynamic dialects are dialects that can be defined at runtime. Dynamic dialects are extensible by new operations, types, and attributes at runtime. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D125201 | 3 年前 | |
[mlir][test] XFAIL little-endian-only tests on SPARC (#103726) 3 MLIR tests FAIL on SPARC, both Solaris/sparcv9 and Linux/sparc64: MLIR :: Conversion/ArithToSPIRV/arith-to-spirv-le-specific.mlir MLIR :: IR/elements-attr-interface.mlir MLIR :: Target/LLVMIR/llvmir-le-specific.mlir The issue is always the same: the tests in question are little-endian-only currently, so this patch XFAILs them on sparc* as is already done for s390x. Tested on sparcv9-sun-solaris2.11, sparc64-unknown-linux-gnu, amd64-pc-solaris2.11, and x86_64-pc-linux-gnu. | 1 年前 | |
[mlir] Improve EnumProp, making it take an EnumInfo (#132349) This commit improves the EnumProp class, causing it to wrap around an EnumInfo just like EnumAttr does. This EnumProp also has logic for converting to/from an integer attribute and for being read and written as bitcode. The following variants of EnumProp are provided: - EnumPropWithAttrForm - an EnumProp that can be constructed from (and will be converted to, if storeInCustomAttribute is true) a custom attribute, like an EnumAttr, instead of a plain integer. This is meant for backwards compatibility with code that uses enum attributes. NamedEnumProp adds a "mnemonic < $enum >" syntax around the enum, replicating a common pattern seen in MLIR printers and allowing for reduced ambiguity. NamedEnumPropWithAttrForm combines both of these extensions. (Sadly, bytecode auto-upgrade is hampered by the lack of the ability to optionally parse an attribute.) Depends on #132148 | 1 年前 | |
[mlir] Improve EnumProp, making it take an EnumInfo (#132349) This commit improves the EnumProp class, causing it to wrap around an EnumInfo just like EnumAttr does. This EnumProp also has logic for converting to/from an integer attribute and for being read and written as bitcode. The following variants of EnumProp are provided: - EnumPropWithAttrForm - an EnumProp that can be constructed from (and will be converted to, if storeInCustomAttribute is true) a custom attribute, like an EnumAttr, instead of a plain integer. This is meant for backwards compatibility with code that uses enum attributes. NamedEnumProp adds a "mnemonic < $enum >" syntax around the enum, replicating a common pattern seen in MLIR printers and allowing for reduced ambiguity. NamedEnumPropWithAttrForm combines both of these extensions. (Sadly, bytecode auto-upgrade is hampered by the lack of the ability to optionally parse an attribute.) Depends on #132148 | 1 年前 | |
Fix MLIR parser to actually error out when hitting a parse error on TensorType encoding field Fixes #67525 | 2 年前 | |
[mlir] Fix printing of dialect resources It was forgetting commas. Reviewed By: rriddle, jpienaar Differential Revision: https://reviews.llvm.org/D155348 | 2 年前 | |
[mlir] check whether region and block visitors are interrupted The visitor functions for Region and Block types did not always check the value returned by recursive calls. This caused the top-level visitor invocation to return WalkResult::advance() even if one or more recursive invocations returned WalkResult::interrupt(). This patch fixes the problem by check if any recursive call is interrupted, and if so, return WalkResult::interrupt(). Reviewed By: dcaballe Differential Revision: https://reviews.llvm.org/D129718 | 3 年前 | |
[mlir] check whether region and block visitors are interrupted The visitor functions for Region and Block types did not always check the value returned by recursive calls. This caused the top-level visitor invocation to return WalkResult::advance() even if one or more recursive invocations returned WalkResult::interrupt(). This patch fixes the problem by check if any recursive call is interrupted, and if so, return WalkResult::interrupt(). Reviewed By: dcaballe Differential Revision: https://reviews.llvm.org/D129718 | 3 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir] Add fast walk-based pattern rewrite driver (#113825) This is intended as a fast pattern rewrite driver for the cases when a simple walk gets the job done but we would still want to implement it in terms of rewrite patterns (that can be used with the greedy pattern rewrite driver downstream). The new driver is inspired by the discussion in https://github.com/llvm/llvm-project/pull/112454 and the LLVM Dev presentation from @matthias-springer earlier this week. This limitation comes with some limitations: * It does not repeat until a fixpoint or revisit ops modified in place or newly created ops. In general, it only walks forward (in the post-order). * matchAndRewrite can only erase the matched op or its descendants. This is verified under expensive checks. * It does not perform folding / DCE. We could probably relax some of these in the future without sacrificing too much performance. | 1 年前 | |
[mlir] Add fast walk-based pattern rewrite driver (#113825) This is intended as a fast pattern rewrite driver for the cases when a simple walk gets the job done but we would still want to implement it in terms of rewrite patterns (that can be used with the greedy pattern rewrite driver downstream). The new driver is inspired by the discussion in https://github.com/llvm/llvm-project/pull/112454 and the LLVM Dev presentation from @matthias-springer earlier this week. This limitation comes with some limitations: * It does not repeat until a fixpoint or revisit ops modified in place or newly created ops. In general, it only walks forward (in the post-order). * matchAndRewrite can only erase the matched op or its descendants. This is verified under expensive checks. * It does not perform folding / DCE. We could probably relax some of these in the future without sacrificing too much performance. | 1 年前 | |
[mlir][NFC] Remove trailing whitespaces from *.td and *.mlir files. This is generated by running sed --in-place 's/[[:space:]]\+$//' mlir/**/*.td sed --in-place 's/[[:space:]]\+$//' mlir/**/*.mlir Reviewed By: rriddle, dcaballe Differential Revision: https://reviews.llvm.org/D138866 | 3 年前 | |
| 1 年前 | ||
[mlir][IR] Add VectorTypeElementInterface with !llvm.ptr (#133455) This commit extends the MLIR vector type to support pointer-like types such as !llvm.ptr and !ptr.ptr, as indicated by the newly added VectorTypeElementInterface. This makes the LLVM dialect closer to LLVM IR. LLVM IR already supports pointers as vector element type. Only integers, floats, pointers and index are valid vector element types for now. Additional vector element types may be added in the future after further discussions. The interface is still evolving and may eventually turn into one of the alternatives that were discussed on the RFC. This commit also disallows !llvm.ptr as an element type of !llvm.vec. This type exists due to limitations of the MLIR vector type. RFC: https://discourse.llvm.org/t/rfc-allow-pointers-as-element-type-of-vector/85360 | 1 年前 | |
[MLIR] Check that the prop-dict dictionnary does not have extra unknown entries (#138668) At the moment we would just ignore them, which can be surprising and is error prone (a typo for a unit attribute flag for example). | 1 年前 | |
[mlir] Add fallback support for parsing/printing unknown external resources This is necessary/useful for building generic tooling that can roundtrip external resources without needing to explicitly handle them. For example, this allows for viewing the resources encoded within a bytecode file without having to explicitly know how to process them (e.g. making it easier to interact with a reproducer encoded in bytecode). Differential Revision: https://reviews.llvm.org/D133460 | 3 年前 | |
[mlir][Symbol] Add verification that symbol's parent is a SymbolTable (#80590) Following the discussion in https://discourse.llvm.org/t/symboltable-and-symbol-parent-child-relationship/75446, we should enforce that a symbol's immediate parent is a symbol table. I changed some tests to pass the verification. In most cases, we can wrap the func with a module, change the func to another op with regions i.e. scf.if, or change the expected error message. --------- Co-authored-by: Mehdi Amini <joker.eph@gmail.com> | 2 年前 | |
[mlir] Add the ability to define dialect-specific location attrs. (#105584) This patch adds the capability to define dialect-specific location attrs. This is useful in particular for defining location structure that doesn't necessarily fit within the core MLIR location hierarchy, but doesn't make sense to push upstream (i.e. a custom use case). This patch adds an AttributeTrait, IsLocation, which is tagged onto all the builtin location attrs, as well as the test location attribute. This is necessary because previously LocationAttr::classof only returned true if the attribute was one of the builtin location attributes, and well, the point of this patch is to allow dialects to define their own location attributes. There was an alternate implementation I considered wherein LocationAttr becomes an AttrInterface, but that was discarded because there are likely to be *many* locations in a single program, and I was concerned that forcing every MLIR user to pay the cost of the additional lookup/dispatch was unacceptable. It also would have been a *much* more invasive change. It would have allowed for more flexibility in terms of pretty printing, but it's unclear how useful/necessary that flexibility would be given how much customizability there already is for attribute definitions. | 1 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[MLIR] Add verification that symbol operations must not have results (#168390) This patch adds verification to the SymbolOpInterface to enforce the design constraint that symbol operations must not produce SSA results, as documented in [Symbols and SymbolTables](https://mlir.llvm.org/docs/SymbolsAndSymbolTables/#defining-or-declaring-a-symbol). This is a follow-up of #168376 | 8 个月前 | |
[mlir] Remove the type keyword from type alias definitions This was carry over from LLVM IR where the alias definition can be ambiguous, but MLIR type aliases have no such problems. Having the type keyword is superfluous and doesn't add anything. This commit drops it, which also nicely aligns with the syntax for attribute aliases (which doesn't have a keyword). Differential Revision: https://reviews.llvm.org/D125501 | 4 年前 | |
[mlir] Expand error message to include unregistered dialects. (#158028) It is possible to load unregistered dialects, this can result in a confusing error message. Mark unregistered but loaded dialects. This is currently done as a merged list as that is most concise but requires some additional preprocessing (did merge sort given the other two lists are, could do it shorter and probably at not too much extra cost if I just used SetVectors - so alternative which uses less code and may be preferred as performance not critical here). --------- Co-authored-by: Mehdi Amini <joker.eph@gmail.com> | 10 个月前 | |
[MLIR Attr] Allow LocationAttr to be used as an operation attribute (#167690) Enables locations to be used as operation attributes. In contrast to the implicit source location every operation carries ( Operation::getLoc())—which may be fused or modified during transformations—a LocationAttr used as an operation attribute has explicit semantics defined by the operation itself. For example, in our Zig-like language frontend (where types are first-class values), we use a location attribute on struct type operations to store the declaration location, which is part of the type's semantic identity. Using an explicit attribute instead of Operation::getLoc() ensures this semantic information is preserved during transformations. | 8 个月前 | |
Define a NoTerminator traits that allows operations with a single block region to not provide a terminator In particular for Graph Regions, the terminator needs is just a historical artifact of the generalization of MLIR from CFG region. Operations like Module don't need a terminator, and before Module migrated to be an operation with region there wasn't any needed. To validate the feature, the ModuleOp is migrated to use this trait and the ModuleTerminator operation is deleted. This patch is likely to break clients, if you're in this case: - you may iterate on a ModuleOp with getBody()->without_terminator(), the solution is simple: just remove the ->without_terminator! - you created a builder with Builder::atBlockTerminator(module_body), just use Builder::atBlockEnd(module_body) instead. - you were handling ModuleTerminator: it isn't needed anymore. - for generic code, a Block::mayNotHaveTerminator() may be used. Differential Revision: https://reviews.llvm.org/D98468 | 5 年前 | |
[MLIR][TableGen] Add genMnemonicAlias field for OpAsm{Type,Attr}Interface (#131504) Since the introduction of OpAsm{Type,Attr}Interface (#121187), it is possible to generate alias in AsmPrinter solely from the type/attribute itself without consulting the OpAsmDialectInterface. This means the behavior can be put in tablegen file near the type/attribute definition. A common pattern is to just use the type/attr mnemonic as the alias. Previously, like #130479/#130481/#130483, this means adding a default implementation to extraClassDeclaration in LLVM_Attr base class. However, as attribute definition may override extraClassDeclaration, it might be preferred to have a new field in tablegen to specify this behavior. This commit adds a genMnemonicAlias field to AttrOrTypeDef, when enabled, makes mlir-tblgen emit a default implementation of getAlias using mnemonic. When OpAsm{Attr,Type}Interface is not specified by the user, tblgen will automatically add the interface. For users wanting other alias behavior, they can ignore such field and still use extraClassDeclaration way. | 1 年前 | |
[mlir] add an option to print op stats in JSON Differential Revision: https://reviews.llvm.org/D127691 | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[MLIR][Doc] Prepend "Variadic of" in front of variadic operands (#69285) Table of Operands for operations like: https://mlir.llvm.org/docs/Dialects/MemRef/#operands-6 Don't distinguish variadic ODS operands from others right now. After this change, it'll print: | Operand | Description | | dynamicSizes | Variadic of index | instead of: | Operand | Description | | dynamicSizes | index | | 2 年前 | |
Implement recursive support into OperationEquivalence::isEquivalentTo() This allows to use OperationEquivalence to track structural comparison for equality between two operations. Differential Revision: https://reviews.llvm.org/D106422 | 4 年前 | |
Fix endian conversion of sub-byte types When convertEndianOfCharForBEmachine is called with elementBitWidth smaller than CHAR_BIT, the default case is invoked, but this does nothing at all and leaves the output array unchanged. Fix DenseIntOrFPElementsAttr::convertEndianOfArrayRefForBEmachine by not calling convertEndianOfCharForBEmachine in this case, and instead simply copying the input to the output (for sub-byte types, endian conversion is in fact a no-op). Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D125676 | 4 年前 | |
[MLIR][parser] Add token type and parser methods for forward slashes (#125056) This adds a token for a forward slash to the token definition list and the methods to AsmParser::parseSlash() and AsmParser::parseOptionalSlash(), similar to other tokens used as operators (e.g., star, plus, etc.). This allows implementations of attributes that contain arithmetic expressions to support operators with a forward slash, e.g., a division. The newly added check tests trigger the parsing of a slash in an attribute. | 1 年前 | |
[mlir] Remove OpaqueElementsAttr This attribute is technical debt from the early stages of MLIR, before ElementsAttr was an interface and when it was more difficult for dialects to define their own types of attributes. At present it isn't used at all in tree (aside from being convenient for eliding other ElementsAttr), and has had little to no evolution in the past three years. Differential Revision: https://reviews.llvm.org/D129917 | 3 年前 | |
[mlir] Add the ability to define dialect-specific location attrs. (#105584) This patch adds the capability to define dialect-specific location attrs. This is useful in particular for defining location structure that doesn't necessarily fit within the core MLIR location hierarchy, but doesn't make sense to push upstream (i.e. a custom use case). This patch adds an AttributeTrait, IsLocation, which is tagged onto all the builtin location attrs, as well as the test location attribute. This is necessary because previously LocationAttr::classof only returned true if the attribute was one of the builtin location attributes, and well, the point of this patch is to allow dialects to define their own location attributes. There was an alternate implementation I considered wherein LocationAttr becomes an AttrInterface, but that was discarded because there are likely to be *many* locations in a single program, and I was concerned that forcing every MLIR user to pay the cost of the additional lookup/dispatch was unacceptable. It also would have been a *much* more invasive change. It would have allowed for more flexibility in terms of pretty printing, but it's unclear how useful/necessary that flexibility would be given how much customizability there already is for attribute definitions. | 1 年前 | |
[mlir][TestDialect] Fix invalid custom op printers This fixes a few custom printers which were printing IR that couldn't be round-tripped. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D150080 | 3 年前 | |
[NFC][mlir][AsmPrinter] Don't compute resourceStr when --mlir-elide-resource-strings-if-larger=0 (#138275) When skipping the printing of large DenseResourceElementsAttr with --mlir-elide-resource-strings-if-larger, we need to compute resourceStr to check if the string is small enough to print. With --mlir-elide-resource-strings-if-larger set to 0, nothing should be printed, but we still compute the size. This change will allow an early return when --mlir-elide-resource-strings-if-larger=0, making the print process faster. | 1 年前 | |
Fix test dialect to avoid using an unregistered dialect Fixes #61374 | 3 年前 | |
[mlir] Allow trailing digit for alias in AsmPrinter (#127993) When generating aliases from OpAsm{Dialect,Type,Attr}Interface, the result would be sanitized and if the alias provided by the interface has a trailing digit, AsmPrinter would attach an underscore to it to presumably prevent confliction. #### Motivation There are two reasons to motivate the change from the old behavior to the proposed behavior 1. If the type/attribute can generate unique alias from its content, then the extra trailing underscore added by AsmPrinter will be strange mlir func.func @add(%ct: !ct_L0_) -> !ct_L0_ %ct_0 = bgv.add %ct, %ct : (!ct_L0_, !ct_L0_) -> !ct_L0_ %ct_1 = bgv.add %ct_0, %ct_0 : (!ct_L0_, !ct_L0_) -> !ct_L0_ %ct_2 = bgv.add %ct_1, %ct_1 : (!ct_L0_, !ct_L0_) -> !ct_L0_ return %ct_2 : !ct_L0_ } Which aesthetically would be better if we have (!ct_L0, !ct_L0) -> !ct_L0 2. The Value name behavior is that, for the first instance, use no suffix _N, which can be similarly applied to alias name. See the IR above where the first one is called %ct and others are called %ct_N. See uniqueValueName for detail. #### Conflict detection mlir !test.type<a = 3> // suggest !name0 !test.type<a = 4> // suggest !name0 !test.another<b = 3> // suggest !name0_ !test.another<b = 4> // suggest !name0_ The conflict detection is based on nameCounts in initializeAliases, where In the original way, the first two will get sanitized to !name0_ and initializeAlias can assign unique id 0, 1, 2, 3 to them. In the current way, the initializeAlias uses usedAliases to track which name has been used, and use such information to generate a suffix id that will make the printed alias name unique. The result for the above example is !name0, !name0_1, !name0_, !name0_2 now. | 1 年前 | |
[mlir][AsmPrinter] Fallback to using qualified printer if unqualified output is empty The current behaviour of always writing the unqualified form of an attribute or type is problematic for any type or attribute that might output an empty string, making it impossible to parse and therefore roundtrip. This is commonly the case for any types or attributes with optional parameters. One would have to currently woarkaround the issue by either changing ones syntax to not be completetly empty or by explicitly using qualified in ALL ops using that type or attribute. This patch fixes that issue by simply checking whether anything was written to the output. In the case there wasn't, it simply falls back to using the normal printer with the dialect prefix. This also makes the default of unqualified printing always correct and safe. The implementation could theoretically still be tricked if the user were to print just a space or similar. I'd argue this'd be user error and not worth handling. Fixes https://github.com/llvm/llvm-project/issues/61701 Differential Revision: https://reviews.llvm.org/D146944 | 3 年前 | |
[mlir] Set the namespace of the BuiltinDialect to 'builtin' Historically the builtin dialect has had an empty namespace. This has unfortunately created a very awkward situation, where many utilities either have to special case the empty namespace, or just don't work at all right now. This revision adds a namespace to the builtin dialect, and starts to cleanup some of the utilities to no longer handle empty namespaces. For now, the assembly form of builtin operations does not require the builtin. prefix. (This should likely be re-evaluated though) Differential Revision: https://reviews.llvm.org/D105149 | 4 年前 | |
Adopt Properties to store operations inherent Attributes in the Func dialect This is part of an on-going migration to adopt Properties inside MLIR. Differential Revision: https://reviews.llvm.org/D148297 | 3 年前 | |
[mlir] Fix disagreement between document and test(NFC) (#109257) | 1 年前 | |
[mlir][NFC] Make 'printOp' public in AsmPrinter This patch moves the 'printOp' functionality to the public API of AsmPrinter and rename it to 'printCustomOrGenericOp'. No 'parseOp' is needed at this time as existing APIs are able to parse operations producing results where results are omitted in the textual form (the LHS of an operation is redundant when it comes to building the operation itself as it only contains the result names). Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D135006 | 3 年前 | |
Change filecheck default to dump input on failure Having the input dumped on failure seems like a better default: I debugged FileCheck tests for a while without knowing about this option, which really helps to understand failures. Remove -dump-input-on-failure and the environment variable FILECHECK_DUMP_INPUT_ON_FAILURE which are now obsolete. Differential Revision: https://reviews.llvm.org/D81422 | 6 年前 | |
Improve diagnostic when emitting operations with regions This has a broad impact on diagnostics that attach an operation. Ops with one or more regions will now be printed on a new line. It was confusing and hard to read with a trailing first line for ops with regions. Before: <unknown>:0: note: see current operation: affine.for %arg3 = 0 to 8192 { affine.for %arg4 = 0 to 8192 step 512 { affine.for %arg5 = 0 to 8192 step 128 { ... After: <unknown>:0: note: see current operation: affine.for %arg3 = 0 to 8192 { affine.for %arg4 = 0 to 8192 step 512 { affine.for %arg5 = 0 to 8192 step 128 { ... Differential Revision: https://reviews.llvm.org/D132645 | 3 年前 | |
[mlir] Add op printing flag to skip regions (#77726) The new flag, --mlir-print-skip-regions, sets the op printing option that disables region printing. This results in the usual --mlir-print-ir-* debug options printing only the names of the executed passes and the signatures of the ops. Example: mlir // -----// IR Dump Before CSE (cse) //----- // func.func @bar(%arg0: f32, %arg1: f32) -> f32 {...} // -----// IR Dump Before Canonicalizer (canonicalize) //----- // func.func @bar(%arg0: f32, %arg1: f32) -> f32 {...} The main use-case is to be triage compilation issues (crashes, slowness) on very deep pass pipelines and with very large IR files, where printing IR is prohibitively slow otherwise. | 2 年前 | |
[MLIR][IR] add -mlir-print-unique-ssa-ids to AsmPrinter (#91241) Add an option to unique the numbers of values, block arguments and naming conflicts when requested and/or printing generic op form. This is helpful when debugging. For example, if you have: scf.for %0 = %1 = opA %0 scf.for %0 = %1 = opB %0 And you get a verifier error which says opB's "operand #0 does not dominate this use", it looks like %0 does dominate the use. This is not intuitive. If these were numbered uniquely, it would look like: scf.for %0 = %1 = opA %0 scf.for %2 = %3 = opB %0 And thus, much clearer as to why you are getting the error since %0 is out of scope. Since generic op form should aim to give you the most possible information, it seems like a good idea to use unique numbers in this situation. Adding an option also gives those an option to use it outside of generic op form. Co-authored-by: Scott Manley <scmanley@nvidia.com> | 2 年前 | |
[mlir] add option to print SSA IDs using NameLocs as prefixes (#119996) This PR adds an AsmPrinter option -mlir-use-nameloc-as-prefix which uses trailing NameLocs, if the source IR provides them, as prefixes when printing SSA IDs. | 1 年前 | |
[mlir][NFC] Remove trailing whitespaces from *.td and *.mlir files. This is generated by running sed --in-place 's/[[:space:]]\+$//' mlir/**/*.td sed --in-place 's/[[:space:]]\+$//' mlir/**/*.mlir Reviewed By: rriddle, dcaballe Differential Revision: https://reviews.llvm.org/D138866 | 3 年前 | |
[mlir] Add opt-in default property bytecode read and write implementation Using properties currently requires at the very least implementing four methods/code snippets: * convertToAttribute * convertFromAttribute * writeToMlirBytecode * readFromMlirBytecode This makes replacing attributes with properties harder than it has to be: Attributes by default do not require immediately defining custom bytecode encoding. This patch therefore adds opt-in implementations of writeToMlirBytecode and readFromMlirBytecode that work with the default implementations of convertToAttribute and convertFromAttribute. They are provided by defvars in OpBase.td and can be used by adding: let writeToMlirBytecode = writeMlirBytecodeWithConvertToAttribute; let readFromMlirBytecode = readMlirBytecodeUsingConvertFromAttribute; to ones TableGen definition. While this bytecode encoding is almost certainly not ideal for a given property, it allows more incremental use of properties and getting something sane working before optimizing the bytecode format. Differential Revision: https://reviews.llvm.org/D155286 | 2 年前 | |
[MLIR] Add support for IntArrayProp<I32Prop> (#146685) The conversion to attribute was missing. | 1 年前 | |
[mlir] Allow trailing digit for alias in AsmPrinter (#127993) When generating aliases from OpAsm{Dialect,Type,Attr}Interface, the result would be sanitized and if the alias provided by the interface has a trailing digit, AsmPrinter would attach an underscore to it to presumably prevent confliction. #### Motivation There are two reasons to motivate the change from the old behavior to the proposed behavior 1. If the type/attribute can generate unique alias from its content, then the extra trailing underscore added by AsmPrinter will be strange mlir func.func @add(%ct: !ct_L0_) -> !ct_L0_ %ct_0 = bgv.add %ct, %ct : (!ct_L0_, !ct_L0_) -> !ct_L0_ %ct_1 = bgv.add %ct_0, %ct_0 : (!ct_L0_, !ct_L0_) -> !ct_L0_ %ct_2 = bgv.add %ct_1, %ct_1 : (!ct_L0_, !ct_L0_) -> !ct_L0_ return %ct_2 : !ct_L0_ } Which aesthetically would be better if we have (!ct_L0, !ct_L0) -> !ct_L0 2. The Value name behavior is that, for the first instance, use no suffix _N, which can be similarly applied to alias name. See the IR above where the first one is called %ct and others are called %ct_N. See uniqueValueName for detail. #### Conflict detection mlir !test.type<a = 3> // suggest !name0 !test.type<a = 4> // suggest !name0 !test.another<b = 3> // suggest !name0_ !test.another<b = 4> // suggest !name0_ The conflict detection is based on nameCounts in initializeAliases, where In the original way, the first two will get sanitized to !name0_ and initializeAlias can assign unique id 0, 1, 2, 3 to them. In the current way, the initializeAlias uses usedAliases to track which name has been used, and use such information to generate a suffix id that will make the printed alias name unique. The result for the above example is !name0, !name0_1, !name0_, !name0_2 now. | 1 年前 | |
[mlir][tblgen] Fix region and successor references in custom directives (#146242) Previously, references to regions and successors were incorrectly disallowed outside the top-level assembly form. This change enables the use of bound regions and successors as variables in custom directives. | 1 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[MLIR][Doc] Prepend "Variadic of" in front of variadic operands (#69285) Table of Operands for operations like: https://mlir.llvm.org/docs/Dialects/MemRef/#operands-6 Don't distinguish variadic ODS operands from others right now. After this change, it'll print: | Operand | Description | | dynamicSizes | Variadic of index | instead of: | Operand | Description | | dynamicSizes | index | | 2 年前 | |
Reapply "Extend getBackwardSlice to track values captured… (#114452) This commit fixes the failure in the original PR when building with shared libs. The problem is that visitUsedValuesDefinedAbove is defined in MLIRTransformUtils, but that lib depends on this lib (MLIRAnalysis). To fix, I dropped the use of visitUsedValuesDefinedAbove and use Region::walk to traverse values defined above. Reapplies PR https://github.com/llvm/llvm-project/pull/113478 Reverts PR https://github.com/llvm/llvm-project/pull/114432 This reverts commit a9a8351. | 1 年前 | |
[mlir][SliceAnalysis] Add an options object to forward and backward slice. Add an options object to allow control of the slice computation (for both forward and backward slice). This makes the ABI stable, and also allows avoiding an assert that makes the slice analysis unusable for operations with multiple blocks. Reviewed By: hanchung, nicolasvasilache Differential Revision: https://reviews.llvm.org/D151520 | 3 年前 | |
[mlir] Add a builtin distinct attribute A distinct attribute associates a referenced attribute with a unique identifier. Every call to its create function allocates a new distinct attribute instance. The address of the attribute instance temporarily serves as its unique identifier. Similar to the names of SSA values, the final unique identifiers are generated during pretty printing. Examples: #distinct = distinct[0]<42.0 : f32> #distinct1 = distinct[1]<42.0 : f32> #distinct2 = distinct[2]<array<i32: 10, 42>> This mechanism is meant to generate attributes with a unique identifier, which can be used to mark groups of operations that share a common properties such as if they are aliasing. The design of the distinct attribute ensures minimal memory footprint per distinct attribute since it only contains a reference to another attribute. All distinct attributes are stored outside of the storage uniquer in a thread local store that is part of the context. It uses one bump pointer allocator per thread to ensure distinct attributes can be created in-parallel. Reviewed By: rriddle, Dinistro, zero9178 Differential Revision: https://reviews.llvm.org/D153360 | 3 年前 | |
[mlir] Clone attrs of unregistered dialect ops (#151847) Operation::clone does not clone the properties of unregistered ops. This patch modifies the property initialization for unregistered ops to initialize properties as attributes. fixes #151640 --------- Signed-off-by: Boyana Norris <brnorris03@gmail.com> | 11 个月前 | |
Introduce MLIR Op Properties This new features enabled to dedicate custom storage inline within operations. This storage can be used as an alternative to attributes to store data that is specific to an operation. Attribute can also be stored inside the properties storage if desired, but any kind of data can be present as well. This offers a way to store and mutate data without uniquing in the Context like Attribute. See the OpPropertiesTest.cpp for an example where a struct with a std::vector<> is attached to an operation and mutated in-place: struct TestProperties { int a = -1; float b = -1.; std::vector<int64_t> array = {-33}; }; More complex scheme (including reference-counting) are also possible. The only constraint to enable storing a C++ object as "properties" on an operation is to implement three functions: - convert from the candidate object to an Attribute - convert from the Attribute to the candidate object - hash the object Optional the parsing and printing can also be customized with 2 extra functions. A new options is introduced to ODS to allow dialects to specify: let usePropertiesForAttributes = 1; When set to true, the inherent attributes for all the ops in this dialect will be using properties instead of being stored alongside discardable attributes. The TestDialect showcases this feature. Another change is that we introduce new APIs on the Operation class to access separately the inherent attributes from the discardable ones. We envision deprecating and removing the getAttr(), getAttrsDictionary(), and other similar method which don't make the distinction explicit, leading to an entirely separate namespace for discardable attributes. Recommit d572cd1b067f after fixing python bindings build. Differential Revision: https://reviews.llvm.org/D141742 | 3 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir] allow function type cloning to fail (#137130) FunctionOpInterface assumed the fact that the function type (attribute of the operation) can be cloned with arbirary lists of function arguments and results to support argument and result list mutation. This is not always correct, in particular, LLVM dialect functions require exactly one result making it impossible to erase the result. Allow function type cloning to fail and propagate this failure through various APIs that use it. The common assumption is that existing IR has not been modified. Fixes #131142. Reland a8c7ecdcbc3e89b493b495c6831cc93671c3b844 / #136300. | 1 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
Introduce MLIR Op Properties This new features enabled to dedicate custom storage inline within operations. This storage can be used as an alternative to attributes to store data that is specific to an operation. Attribute can also be stored inside the properties storage if desired, but any kind of data can be present as well. This offers a way to store and mutate data without uniquing in the Context like Attribute. See the OpPropertiesTest.cpp for an example where a struct with a std::vector<> is attached to an operation and mutated in-place: struct TestProperties { int a = -1; float b = -1.; std::vector<int64_t> array = {-33}; }; More complex scheme (including reference-counting) are also possible. The only constraint to enable storing a C++ object as "properties" on an operation is to implement three functions: - convert from the candidate object to an Attribute - convert from the Attribute to the candidate object - hash the object Optional the parsing and printing can also be customized with 2 extra functions. A new options is introduced to ODS to allow dialects to specify: let usePropertiesForAttributes = 1; When set to true, the inherent attributes for all the ops in this dialect will be using properties instead of being stored alongside discardable attributes. The TestDialect showcases this feature. Another change is that we introduce new APIs on the Operation class to access separately the inherent attributes from the discardable ones. We envision deprecating and removing the getAttr(), getAttrsDictionary(), and other similar method which don't make the distinction explicit, leading to an entirely separate namespace for discardable attributes. Recommit d572cd1b067f after fixing python bindings build. Differential Revision: https://reviews.llvm.org/D141742 | 3 年前 | |
[mlir][matchers] Add m_Op(StringRef) and m_Attr matchers This patch introduces support for m_Op with a StringRef argument and m_Attr matchers. These matchers will be very useful for mlir-query that is being developed currently. Submitting this patch separately to reduce the final patch size and make it easier to upstream mlir-query. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D147262 | 3 年前 | |
[mlir] Add predicates to tablegen-defined properties (#120176) Give the properties from tablegen a predicate field that holds the predicate that the property needs to satisfy, if one exists, and hook that field up to verifier generation. | 1 年前 | |
Default DEBUG_TYPE to the current filename for logging (#158494) This makes it optional to define a debug type and uses the current FileName instead. This both reduced the size of the prefix printed by LDBG() and makes it possible to pass a filename to --debug-only to filter on. | 10 个月前 | |
[mlir][RegionBranchOpInterface] explicitly check for existance of block terminator (#76831) | 2 年前 | |
[mlir][vector] Fix attaching write effects on transfer_write's base (#142940) This fixes an issue with TransferWriteOp's implementation of the MemoryEffectOpInterface where the write effect was attached to the stored value rather than the base. This had the effect that when asking for the memory effects for the input memref buffer using getEffectsOnValue(...), the function would return no-effects (as the effect would have been attached to the stored value rather than the input buffer). | 1 年前 | |
[mlir] Add a builtin distinct attribute A distinct attribute associates a referenced attribute with a unique identifier. Every call to its create function allocates a new distinct attribute instance. The address of the attribute instance temporarily serves as its unique identifier. Similar to the names of SSA values, the final unique identifiers are generated during pretty printing. Examples: #distinct = distinct[0]<42.0 : f32> #distinct1 = distinct[1]<42.0 : f32> #distinct2 = distinct[2]<array<i32: 10, 42>> This mechanism is meant to generate attributes with a unique identifier, which can be used to mark groups of operations that share a common properties such as if they are aliasing. The design of the distinct attribute ensures minimal memory footprint per distinct attribute since it only contains a reference to another attribute. All distinct attributes are stored outside of the storage uniquer in a thread local store that is part of the context. It uses one bump pointer allocator per thread to ensure distinct attributes can be created in-parallel. Reviewed By: rriddle, Dinistro, zero9178 Differential Revision: https://reviews.llvm.org/D153360 | 3 年前 | |
[mlir] Add a builtin distinct attribute A distinct attribute associates a referenced attribute with a unique identifier. Every call to its create function allocates a new distinct attribute instance. The address of the attribute instance temporarily serves as its unique identifier. Similar to the names of SSA values, the final unique identifiers are generated during pretty printing. Examples: #distinct = distinct[0]<42.0 : f32> #distinct1 = distinct[1]<42.0 : f32> #distinct2 = distinct[2]<array<i32: 10, 42>> This mechanism is meant to generate attributes with a unique identifier, which can be used to mark groups of operations that share a common properties such as if they are aliasing. The design of the distinct attribute ensures minimal memory footprint per distinct attribute since it only contains a reference to another attribute. All distinct attributes are stored outside of the storage uniquer in a thread local store that is part of the context. It uses one bump pointer allocator per thread to ensure distinct attributes can be created in-parallel. Reviewed By: rriddle, Dinistro, zero9178 Differential Revision: https://reviews.llvm.org/D153360 | 3 年前 | |
[mlir][NFC] Remove trailing whitespaces from *.td and *.mlir files. This is generated by running sed --in-place 's/[[:space:]]\+$//' mlir/**/*.td sed --in-place 's/[[:space:]]\+$//' mlir/**/*.mlir Reviewed By: rriddle, dcaballe Differential Revision: https://reviews.llvm.org/D138866 | 3 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[MLIR][Test] Avoid buffer overflow for test.verifiers Fixes buffer overflows which occurred anytime a "test.verifiers" op was used. Fixes #61378, fixes #61379, fixes #61381. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D154792 | 3 年前 | |
[mlir][IR] Add VectorTypeElementInterface with !llvm.ptr (#133455) This commit extends the MLIR vector type to support pointer-like types such as !llvm.ptr and !ptr.ptr, as indicated by the newly added VectorTypeElementInterface. This makes the LLVM dialect closer to LLVM IR. LLVM IR already supports pointers as vector element type. Only integers, floats, pointers and index are valid vector element types for now. Additional vector element types may be added in the future after further discussions. The interface is still evolving and may eventually turn into one of the alternatives that were discussed on the RFC. This commit also disallows !llvm.ptr as an element type of !llvm.vec. This type exists due to limitations of the MLIR vector type. RFC: https://discourse.llvm.org/t/rfc-allow-pointers-as-element-type-of-vector/85360 | 1 年前 | |
[MLIR] Stop visiting unreachable blocks in the walkAndApplyPatterns driver (#154038) This is similar to the fix to the greedy driver in #153957 ; except that instead of removing unreachable code, we just ignore it. Operations like: %add = arith.addi %add, %add : i64 are legal in unreachable code. Unfortunately many patterns would be unsafe to apply on such IR and can lead to crashes or infinite loops. | 11 个月前 | |
[mlir] Set implicit operation loc to start of split. (#151499) | 11 个月前 | |
[mlir] Add property combinators, initial ODS support (#94732) While we have had a Properties.td that allowed for defining non-attribute-backed properties, such properties were not plumbed through the basic autogeneration facilities available to attributes, forcing those who want to migrate to the new system to write such code by hand. ## Potentially breaking changes - The setFoo() methods on Properties struct no longer take their inputs by const reference. Those wishing to pass non-owned values of a property by reference to constructors and setters should set the interface type to const [storageType]& - Adapters and operations now define getters and setters for properties listed in ODS, which may conflict with custom getters. - Builders now include properties listed in ODS specifications, potentially conflicting with custom builders with the same type signature. ## Extensions to the Property class This commit adds several fields to the Property class, including: - parser, optionalParser, and printer (for parsing/printing properties of a given type in ODS syntax) - storageTypeValueOverride, an extension of defaultValue to allow the storage and interface type defaults to differ - baseProperty (allowing for classes like DefaultValuedProperty) Existing fields have also had their documentation comments updated. This commit does not add a PropertyConstraint analogous to AttrConstraint, but this is a natural evolution of the work here. This commit also adds the concrete property kinds I32Property, I64Property, UnitProperty (and special handling for it like for UnitAttr), and BoolProperty. ## Property combinators Properties.td also now includes several ways to combine properties. One is ArrayProperty<Property elem>, which now stores a variable-length array of some property as SmallVector<elem.storageType> and uses ArrayRef<elem.storageType> as its interface type. It has IntArrayProperty subclasses that change its conversion to attributes to use DenseI[N]Attrs instead of an ArrayAttr. Similarly, OptionalProperty<Property p> wraps a property's storage in std::optional<> and adds a std::nullopt default value. In the case where the underlying property can be parsed optionally but doesn't have its own default value, OptionalProperty can piggyback off the optional parser to produce a cleaner syntax, as opposed to its general form, which is either none or some<[value]>. (Note that OptionalProperty can be nested if desired). ## Autogeneration changes Operations and adaptors now support getters and setters for properties like those for attributes. Unlike for attributes, there aren't separate value and attribute forms, since there is no FooAttr() available for a getFooAttr() to return. The largest change is to operation formats. Previously, properties could only be used in custom directives. Now, they can be used anywhere an attribute could be used, and have parsers and printers defined in their tablegen records. These updates include special UnitProperty logic like that used for UnitAttr. ## Misc. Some attempt has been made to test the new functionality. This commit takes tentative steps towards updating the documentation to account for properties. A full update will be in order once any followup work has been completed and the interfaces have stabilized. --------- Co-authored-by: Mehdi Amini <joker.eph@gmail.com> Co-authored-by: Christian Ulmann <christianulmann@gmail.com> | 1 年前 | |
[mlir][IR] Change block/region walkers to enumerate this block/region (#75020) This change makes block/region walkers consistent with operation walkers. An operation walk enumerates the current operation. Similarly, block/region walks should enumerate the current block/region. Example: // Current behavior: op1->walk([](Operation *op2) { /* op1 is enumerated */ }); block1->walk([](Block *block2) { /* block1 is NOT enumerated */ }); region1->walk([](Block *block) { /* blocks of region1 are NOT enumerated */ }); region1->walk([](Region *region2) { /* region1 is NOT enumerated }); // New behavior: op1->walk([](Operation *op2) { /* op1 is enumerated */ }); block1->walk([](Block *block2) { /* block1 IS enumerated */ }); region1->walk([](Block *block) { /* blocks of region1 ARE enumerated */ }); region1->walk([](Region *region2) { /* region1 IS enumerated }); | 2 年前 | |
Adopt Properties to store operations inherent Attributes in the Func dialect This is part of an on-going migration to adopt Properties inside MLIR. Differential Revision: https://reviews.llvm.org/D148297 | 3 年前 | |
[mlir][NFC] Update remaining textual references of un-namespaced func operations The special case parsing of operations in the func dialect is being removed, and operations will require the dialect namespace prefix. | 4 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 10 个月前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 7 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 5 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 11 个月前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 8 个月前 | ||
| 4 年前 | ||
| 10 个月前 | ||
| 8 个月前 | ||
| 5 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 6 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 11 个月前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 10 个月前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 11 个月前 | ||
| 11 个月前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 4 年前 |