This is an archive of the discontinued LLVM Phabricator instance.

[mlir][spirv] Use larger range for target environment lookup function
ClosedPublic

Authored by antiagainst on Mar 9 2020, 1:56 PM.

Details

Summary

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.

Depends On D75868

Diff Detail

Event Timeline

antiagainst created this revision.Mar 9 2020, 1:56 PM
Herald added a project: Restricted Project. · View Herald Transcript
denis13 added inline comments.Mar 10 2020, 2:15 AM
mlir/docs/Dialects/SPIR-V.md
936

Do you mean handy here?

mravishankar accepted this revision.Mar 10 2020, 11:24 AM
mravishankar added inline comments.
mlir/lib/Dialect/SPIRV/TargetAndABI.cpp
298–310

Nit: make this a while loop?

This revision is now accepted and ready to land.Mar 10 2020, 11:24 AM
antiagainst marked 4 inline comments as done.

Address comments

antiagainst added inline comments.Mar 11 2020, 1:04 PM
mlir/docs/Dialects/SPIR-V.md
936

Oops, yes, good catch!

This revision was automatically updated to reflect the committed changes.