- Mar 19, 2021
-
-
Andrew Young authored
When deleting operations in DCE, the algorithm uses a post-order walk of the IR to ensure that value uses were erased before value defs. Graph regions do not have the same structural invariants as SSA CFG, and this post order walk could delete value defs before uses. This problem is guaranteed to occur when there is a cycle in the use-def graph. This change stops DCE from visiting the operations and blocks in any meaningful order. Instead, we rely on explicitly dropping all uses of a value before deleting it. Reviewed By: mehdi_amini, rriddle Differential Revision: https://reviews.llvm.org/D98919
-
- Mar 11, 2021
-
-
River Riddle authored
The current implementation has some inefficiencies that become noticeable when running on large modules. This revision optimizes the code, and updates some out-dated idioms with newer utilities. The main components of this optimization include: * Add an overload of Block::eraseArguments that allows for O(N) erasure of disjoint arguments. * Don't process entry block arguments given that we don't erase them at this point. * Don't track individual operation results, given that we don't erase them. We can just track the parent operation. Differential Revision: https://reviews.llvm.org/D98309
-
- Feb 09, 2021
-
-
River Riddle authored
These properties were useful for a few things before traits had a better integration story, but don't really carry their weight well these days. Most of these properties are already checked via traits in most of the code. It is better to align the system around traits, and improve the performance/cost of traits in general. Differential Revision: https://reviews.llvm.org/D96088
-
- Jan 07, 2021
-
-
Kazuaki Ishizaki authored
fix typo under include and lib directories Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D94220
-
- Nov 20, 2020
-
-
William S. Moses authored
Block merging in MLIR will incorrectly merge blocks with operations whose values are used outside of that block. This change forbids this behavior and provides a test where it is illegal to perform such a merge. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D91745
-
- Aug 26, 2020
-
-
River Riddle authored
The merging algorithm was previously not checking for type equivalence. Fixes PR47314 Differential Revision: https://reviews.llvm.org/D86594
-
- May 15, 2020
-
-
Stephen Neuendorffer authored
MLIRSideEffects -> MLIRSideEffectInterfaces SideEffects.h -> SideEffectInterfaces.h SideEffects.cpp -> SideEffectInterface.cpp Note that I haven't renamed TableGen/SideEffects.h or TableGen/SideEffects.cpp find -name "*.h" -exec sed -i "s/SideEffects.h/SideEffectInterfaces.h/" "{}" \; find -name "CMakeLists.txt" -exec sed -i "s/MLIRSideEffects/MLIRSideEffectInterfaces/" "{}" \; Differential Revision: https://reviews.llvm.org/D79890
-
- May 05, 2020
-
-
River Riddle authored
This revision adds support for merging identical blocks, or those with the same operations that branch to the same successors. Operands that mismatch between the different blocks are replaced with new block arguments added to the merged block. Differential Revision: https://reviews.llvm.org/D79134
-
- Apr 30, 2020
-
-
River Riddle authored
This range allows for performing many different operations on successor operands, including erasing/adding/setting. This removes the need for the explicit canEraseSuccessorOperand and eraseSuccessorOperand methods. Differential Revision: https://reviews.llvm.org/D79077
-
- Mar 12, 2020
-
-
River Riddle authored
HasNoSideEffect can now be implemented using the MemoryEffectInterface, removing the need to check multiple things for the same information. This also removes an easy foot-gun for users as 'Operation::hasNoSideEffect' would ignore operations that dynamically, or recursively, have no side effects. This also leads to an immediate improvement in some of the existing users, such as DCE, now that they have access to more information. Differential Revision: https://reviews.llvm.org/D76036
-
- Mar 10, 2020
-
-
River Riddle authored
The interfaces themselves aren't really analyses, they may be used by analyses though. Having them in Analysis can also create cyclic dependencies if an analysis depends on a specific dialect, that also provides one of the interfaces. Differential Revision: https://reviews.llvm.org/D75867
-
- Mar 05, 2020
-
-
River Riddle authored
Summary: This revision removes all of the functionality related to successor operands on the core Operation class. This greatly simplifies a lot of handling of operands, as well as successors. For example, DialectConversion no longer needs a special "matchAndRewrite" for branching terminator operations.(Note, the existing method was also broken for operations with variadic successors!!) This also enables terminator operations to define their own relationships with successor arguments, instead of the hardcoded "pass-through" behavior that exists today. Differential Revision: https://reviews.llvm.org/D75318
-
River Riddle authored
The existing API for successor operands on operations is in the process of being removed. This revision simplifies a later one that completely removes the existing API. Differential Revision: https://reviews.llvm.org/D75316
-
- Jan 26, 2020
-
-
Mehdi Amini authored
This is an artifact from merging MLIR into LLVM, the file headers are now aligned with the rest of the project.
-
- Jan 13, 2020
-
-
River Riddle authored
This was left over debugging.
-
- Jan 11, 2020
-
-
River Riddle authored
Summary: These were temporary methods used to simplify the transition. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D72548
-
- Dec 24, 2019
-
-
River Riddle authored
ValuePtr was a temporary typedef during the transition to a value-typed Value. PiperOrigin-RevId: 286945714
-
Mehdi Amini authored
PiperOrigin-RevId: 286906740
-
- Dec 23, 2019
-
-
River Riddle authored
NFC: Introduce new ValuePtr/ValueRef typedefs to simplify the transition to Value being value-typed. This is an initial step to refactoring the representation of OpResult as proposed in: https://groups.google.com/a/tensorflow.org/g/mlir/c/XXzzKhqqF_0/m/v6bKb08WCgAJ This change will make it much simpler to incrementally transition all of the existing code to use value-typed semantics. PiperOrigin-RevId: 286844725
-
- Dec 18, 2019
-
-
River Riddle authored
Aside from being cleaner, this also makes the codebase more consistent. PiperOrigin-RevId: 286206974
-
- Nov 21, 2019
-
-
River Riddle authored
PiperOrigin-RevId: 281656603
-
River Riddle authored
This moves the different canonicalizations of regions into one place and invokes them in the fixed-point iteration of the canonicalizer. PiperOrigin-RevId: 281617072
-
- Sep 08, 2019
-
-
Mehdi Amini authored
This will allow clients to implement a different collection strategy on these values, including collecting each uses within the region for example. PiperOrigin-RevId: 267803978
-
- Sep 02, 2019
-
-
Mehdi Amini authored
This is a convenient utility around the existing `getUsedValuesDefinedAbove()` that take two regions. PiperOrigin-RevId: 266686854
-
- Aug 10, 2019
-
-
River Riddle authored
There are currently several different terms used to refer to a parent IR unit in 'get' methods: getParent/getEnclosing/getContaining. This cl standardizes all of these methods to use 'getParent*'. PiperOrigin-RevId: 262680287
-
- Jun 20, 2019
-
-
Alex Zinenko authored
Arguably, this function is only useful for transformations and should not pollute the main IR. Also make sure it accepts a the resulting container by-reference instead of returning it. PiperOrigin-RevId: 253622981
-
Alex Zinenko authored
This converts entire loops into threads/blocks. No check on the size of the block or grid, or on the validity of parallelization is performed, it is under the responsibility of the caller to strip-mine the loops and to perform the dependence analysis before calling the conversion. PiperOrigin-RevId: 253189268
-
- May 20, 2019
-
-
Geoffrey Martin-Noble authored
This is in preparation for making it also support/be a parent class of MemRefType. MemRefs have similar shape/rank/element semantics and it would be useful to be able to use these same utilities for them. This CL should not change any semantics and only change variables, types, string literals, and comments. In follow-up CLs I will prepare all callers to handle MemRef types or remove their dependence on ShapedType. Discussion/Rationale in https://groups.google.com/a/tensorflow.org/forum/#!topic/mlir/cHLoyfGu8y8 -- PiperOrigin-RevId: 248476449
-
Stella Laurenzo authored
This adds some additional core types and utilities, notably the constraint analysis graph (CAG) structures, associated metadata and configuration policy object base class. The CAG is not particularly memory efficient as it stands now. I had started some work to turn it into a form that could be better managed by a bump pointer allocator but abandoned that for now in favor of having something that does semantically what I was going for as a starting point. -- PiperOrigin-RevId: 248413133
-
Jacques Pienaar authored
These are only required in .h files to disambiguate between C and C++ header files. -- PiperOrigin-RevId: 248219135
-
- May 06, 2019
-
-
Lei Zhang authored
Certain ops can have multiple variadic operands/results, e.g., `tf.DynamicStitch`. Even if an op has only one variadic operand/result, it is not necessarily the very last one, e.g., `tf.RaggedGather`. This CL enhances TableGen subsystem to be able to represent such cases. In order to deduce the operand/result value range for each variadic operand, currently we only support variadic operands/results all of the same size. So two new traits, `SameVariadicOperandSize` and `SameVariadicResultSize` are introduced. -- PiperOrigin-RevId: 245310628
-
- Apr 18, 2019
-
-
Smit Hinsu authored
Now, op attribute names don't have '.' in their names so the special handling for it can be removed. Attributes for functions still have dialect prefix with '.' as separator but TableGen does not deal with functions. TESTED with existing unit tests -- PiperOrigin-RevId: 243287462
-
- Mar 30, 2019
-
-
Jacques Pienaar authored
Previously Value was a pair of name & Type, but for operands/result a TypeConstraint rather then a Type is specified. Update C++ side to match declarative side. PiperOrigin-RevId: 238984799
-
River Riddle authored
Change the TensorFlow attribute prefix from "tf$" to "tf." to match the specification of dialect attributes. This also fixes tblgen generation of dialect attributes that used the sugared name "tf$attr" as c++ identifiers. PiperOrigin-RevId: 236924392
-
Lei Zhang authored
We specify op operands and results in TableGen op definition using the same syntax. They should be modelled similarly in TableGen driver wrapper classes. PiperOrigin-RevId: 234153332
-
Lei Zhang authored
This is another step towards hiding raw TableGen API calls. PiperOrigin-RevId: 231580827
-
- Mar 29, 2019
-
-
Lei Zhang authored
PiperOrigin-RevId: 230923050
-