[PATCH] D79922: [MLIR] Allow unreachable blocks to violate dominance property.

Stephen Neuendorffer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 13 23:23:15 PDT 2020


stephenneuendorffer created this revision.
Herald added subscribers: llvm-commits, jurahul, Kayjukh, frgossen, grosul1, Joonsoo, liufengdb, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, jpienaar, rriddle, mehdi_amini.
Herald added a reviewer: rriddle.
Herald added a project: LLVM.
stephenneuendorffer added a reviewer: lattner.

It is possible for optimizations to create SSA code which violates
the dominance property in unreachable blocks.  Equivalently, dominance
computed using normal mechanisms is undefined in unreachable blocks.

See discussion here: https://llvm.discourse.group/t/rfc-allowing-dialects-to-relax-the-ssa-dominance-condition/833/51

This patch only checks the dominance condition inside blocks which are
reachable from the the entry block of their region.  Note that the
dominance conditions of regions contained in an unreachable block are
still checked.

Depends on D79906 <https://reviews.llvm.org/D79906>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79922

Files:
  mlir/include/mlir/IR/Dominance.h
  mlir/lib/IR/Dominance.cpp
  mlir/lib/IR/Verifier.cpp
  mlir/test/IR/invalid.mlir
  mlir/test/IR/parser.mlir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79922.263921.patch
Type: text/x-patch
Size: 4375 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200514/6f04f8f9/attachment.bin>


More information about the llvm-commits mailing list