[mlir][spirv] Use larger range for target environment lookup function
authorLei Zhang <antiagainst@google.com>
Wed, 11 Mar 2020 20:02:56 +0000 (16:02 -0400)
committerLei Zhang <antiagainst@google.com>
Thu, 12 Mar 2020 23:37:45 +0000 (19:37 -0400)
commit66c378d66e93b67c71aaf99974577f2bd72f336e
treee489c92cb9b7833c4d67f01e36135d53a261505b
parente115a40f5020b188c01ecfd435b02e7e46393b0d
[mlir][spirv] Use larger range for target environment lookup function

Previously we only look at the directly passed-in op for a potential
spv.target_env attribute. This commit switches to use a larger range
and recursively check enclosing symbol tables.

Differential Revision: https://reviews.llvm.org/D75869
mlir/docs/Dialects/SPIR-V.md
mlir/include/mlir/Dialect/SPIRV/TargetAndABI.h
mlir/lib/Dialect/SPIRV/TargetAndABI.cpp