Introduce functionality for defining region ancestor relation
authorAlex Zinenko <zinenko@google.com>
Wed, 24 Apr 2019 16:24:57 +0000 (09:24 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Mon, 6 May 2019 15:16:00 +0000 (08:16 -0700)
commit4beef47b3502aa620cd53196bc8f6a1da7db6a49
treeb694c2745e8632afa5d6185dcdf11ff3d616fb5f
parent9f934f2a59a68e44647ef7f3cd5b45878c32f38f
Introduce functionality for defining region ancestor relation

    Add member functions for Regions to query if another Region is a ancestor.  The
    implementation is naive and traverses all parent regions performing one-to-one
    comparisons.  As a side effect, this introduces `getContainingRegion` function
    for Operations and Values to return the Region in which they are defined, and
    for Regions to return the "parent" region if any.

--

PiperOrigin-RevId: 245057980
mlir/include/mlir/IR/Block.h
mlir/include/mlir/IR/Function.h
mlir/include/mlir/IR/OpDefinition.h
mlir/include/mlir/IR/Operation.h
mlir/include/mlir/IR/Value.h
mlir/lib/IR/Block.cpp
mlir/lib/IR/Operation.cpp
mlir/lib/IR/Value.cpp