llvm-project/mlir/test/Transforms
Jeff Niu 62fe67f9eb [mlir][DCA] Fix visiting call ops when run at function scopes
When dead-code analysis is run at the scope of a function, call ops to
other functions at the same level were being marked as unreachable,
since the analysis optimistically assumes the call op to have no known
predecessors and that all predecessors are known, but the callee would
never get visited.

This patch fixes the bug by checking if a referenced function is above
the top-level op of the analysis, and is thus considered an external
callable.

Fixes #56830

Reviewed By: zero9178

Differential Revision: https://reviews.llvm.org/D130829
2022-07-31 16:03:46 -04:00
..
buffer-results-to-out-params.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
canonicalize-block-merge.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
canonicalize-dce.mlir [mlir] Ignore effects on allocated results when checking whether the op is trivially dead. 2022-07-19 10:58:25 +02:00
canonicalize-td.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
canonicalize.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
compose-subview.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
constant-fold.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
control-flow-sink-test.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
control-flow-sink.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
cse.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
decompose-call-graph-types.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
inlining-dce.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
inlining-recursive.mlir [mlir][Inliner] Support recursion in Inliner 2022-06-30 18:52:45 +01:00
inlining-repeated-use.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
inlining.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
location-snapshot.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
loop-fusion-2.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
loop-fusion-3.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
loop-fusion-4.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
loop-fusion-dependence-check.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
loop-fusion-slice-computation.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
loop-fusion-transformation.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
loop-fusion.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
loop-invariant-code-motion.mlir [mlir][NFC] Update remaining textual references of un-namespaced `func` operations 2022-04-20 22:17:31 -07:00
memref-bound-check.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
memref-dependence-check.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
normalize-memrefs-ops-dynamic.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
normalize-memrefs-ops.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
normalize-memrefs.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
parallel-loop-collapsing.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
parametric-mapping.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
parametric-tiling.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
pipeline-data-transfer.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
print-op-graph.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
promote-buffers-to-stack.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
sccp-callgraph.mlir [mlir][DCA] Fix visiting call ops when run at function scopes 2022-07-31 16:03:46 -04:00
sccp-structured.mlir [mlir][arith] cmpi: move constant to the right side 2022-07-22 12:39:17 +02:00
sccp.mlir [mlir] SCCP add missing pessimistic setting 2022-07-25 17:41:17 -07:00
scf-if-utils.mlir [mlir] Remove special case parsing/printing of `func` operations 2022-05-06 13:36:15 -07:00
scf-loop-unroll.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
scf-replace-with-new-yields.mlir [mlir][SCF] Add utility method to add new yield values to a loop. 2022-05-10 18:44:11 +00:00
single-parallel-loop-collapsing.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
strip-debuginfo.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
test-canonicalize-filter.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
test-canonicalize.mlir [mlir][Canonicalize] Fix command-line options 2022-05-18 00:28:18 -07:00
test-commutativity-utils.mlir [MLIR] Add a utility to sort the operands of commutative ops 2022-07-30 19:25:18 -04:00
test-convert-call-op.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
test-inlining.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
test-legalize-erased-op-with-uses.mlir [mlir] Remove special case parsing/printing of `func` operations 2022-05-06 13:36:15 -07:00
test-legalize-remapped-value.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
test-legalize-target-materialization-no-uses.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
test-legalize-type-conversion.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
test-legalize-unknown-root.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
test-legalizer-analysis.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
test-legalizer-full.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
test-legalizer.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
test-merge-blocks.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
test-operation-folder-commutative.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
test-operation-folder.mlir [GreedyPatternRewriter] Avoid reversing constant order 2022-05-18 00:55:59 -07:00
test-pattern-selective-replacement.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
test-rewrite-dynamic-op.mlir [mlir] Remove special case parsing/printing of `func` operations 2022-05-06 13:36:15 -07:00
test-strict-pattern-driver.mlir [mlir:MultiOpDriver] Add operands to worklist should be checked 2022-06-11 15:56:23 +00:00
test-symbol-dce.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
test-symbol-privatize.mlir [mlir][NFC] Update textual references of `func` to `func.func` in Transform tests 2022-04-20 22:17:30 -07:00
test-toposort.mlir [mlir][transforms] Add a topological sort utility and pass 2022-05-16 20:47:30 +00:00