summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorAlex Zinenko <zinenko@google.com>2020-06-15 11:40:56 +0200
committerAlex Zinenko <zinenko@google.com>2020-06-15 17:55:49 +0200
commit36150c3637309dabe0e287727c81717dfbe9bc84 (patch)
tree6de855eb94c16e7e98c7a23bef434f8e75451535 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parent3813f24e971bb406efa6436c48fdeb8e24a2654b (diff)
[mlir] Affine symbols: do not expect AffineScope to always exist
In the affine symbol and dimension check, the code currently assumes `getAffineScope` and its users `isValidDim` and `isValidSymbol` are only called on values defined in regions that have a parent Op with `AffineScope` trait. This is not necessarily the case, and these functions may be called on valid IR that does not satisfy this assumption. Return `nullptr` from `getAffineScope` if there is no parent op with `AffineScope` trait. Treat this case conservatively in `isValidSymbol` by only accepting as symbols the values that are guaranteed to be symbols (constants, and certain operations). No modifications are necessary to `isValidDim` that delegates most of the work to `isValidDim`. Differential Revision: https://reviews.llvm.org/D81753
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions