llvm-project/mlir/lib/Transforms
Andrew Young f178c13fa8
[mlir] Support use-def cycles in graph regions during regionDCE
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
2021-03-18 23:06:45 -07:00
..
Utils [mlir] Support use-def cycles in graph regions during regionDCE 2021-03-18 23:06:45 -07:00
BufferDeallocation.cpp [MLIR] Create memref dialect and move dialect-specific ops from std. 2021-03-15 11:14:09 +01:00
BufferOptimizations.cpp [MLIR] Create memref dialect and move dialect-specific ops from std. 2021-03-15 11:14:09 +01:00
BufferResultsToOutParams.cpp [MLIR] Create memref dialect and move dialect-specific ops from std. 2021-03-15 11:14:09 +01:00
BufferUtils.cpp [mlir] NFC: fix trivial typos 2021-01-08 02:10:12 +09:00
Bufferize.cpp [MLIR] Create memref dialect and move dialect-specific ops from std. 2021-03-15 11:14:09 +01:00
CMakeLists.txt [MLIR] Create memref dialect and move dialect-specific ops from std. 2021-03-15 11:14:09 +01:00
CSE.cpp [mlir][IR] Remove the concept of `OperationProperties` 2021-02-09 12:00:15 -08:00
Canonicalizer.cpp [MLIR] Create memref dialect and move dialect-specific ops from std. 2021-03-15 11:14:09 +01:00
CopyRemoval.cpp [mlir] Fix bug in copy removal 2020-09-08 14:17:13 +02:00
Inliner.cpp [mlir][Inliner] Don't optimize callees in async mode if there is only one to optimize 2021-02-23 18:44:09 -08:00
LocationSnapshot.cpp [mlir] Simplify various pieces of code now that Identifier has access to the Context/Dialect 2021-02-26 18:00:05 -08:00
LoopCoalescing.cpp [mlir] Use mlir::OpState::operator->() to get to methods of mlir::Operation. This is a preparation step to remove the corresponding methods from OpState. 2020-12-09 12:11:32 +01:00
LoopFusion.cpp [MLIR] Create memref dialect and move dialect-specific ops from std. 2021-03-15 11:14:09 +01:00
LoopInvariantCodeMotion.cpp [mlir][BuiltinDialect] Resolve comments from D91571 2020-11-19 11:12:49 -08:00
MemRefDataFlowOpt.cpp [MLIR] Create memref dialect and move dialect-specific ops from std. 2021-03-15 11:14:09 +01:00
NormalizeMemRefs.cpp [MLIR] Create memref dialect and move dialect-specific ops from std. 2021-03-15 11:14:09 +01:00
OpStats.cpp [mlir][BuiltinDialect] Resolve comments from D91571 2020-11-19 11:12:49 -08:00
ParallelLoopCollapsing.cpp [mlir] NFC: Rename LoopOps dialect to SCF (Structured Control Flow) 2020-05-11 15:04:27 +02:00
PassDetail.h [MLIR] Create memref dialect and move dialect-specific ops from std. 2021-03-15 11:14:09 +01:00
PipelineDataTransfer.cpp [MLIR] Create memref dialect and move dialect-specific ops from std. 2021-03-15 11:14:09 +01:00
SCCP.cpp [mlir][IR] Remove the concept of `OperationProperties` 2021-02-09 12:00:15 -08:00
StripDebugInfo.cpp [mlir][BuiltinDialect] Resolve comments from D91571 2020-11-19 11:12:49 -08:00
SymbolDCE.cpp [mlir] Optimize symbol related checks in SymbolDCE 2020-10-16 12:08:48 -07:00
ViewOpGraph.cpp [mlir] Register the print-op-graph pass using ODS 2021-02-20 15:42:02 -08:00
ViewRegionGraph.cpp [mlir][Pass] Update the PassGen to generate base classes instead of utilities 2020-04-07 14:08:52 -07:00