This enables querying shapes/values as shapes without mutating the IR directly
(e.g., towards enabling doing inference in analysis & application steps,
inferring function shape with constant from callsite, ...). Add a new
ShapeAdaptor that abstracts over whether shape is from Type or
ShapedTypeComponents or DenseIntElementsAttribute. This adds new accessors to
ValueShapeRange to get Shape and value as shape, but doesn't restrict or remove
the previous way of accessing Type via the Value for now, that does mean a less
refined shape could be accidentally queried and will be restricted in follow
up.
Currently restricted Value query to what can be represented as Shape. So only
supports cases where constant subgraph evaluation's output is a shape. I had
considered making it more general, but without TBD extern attribute concept or
some such a user cannot today uniformly avoid overhead (it does happen less
frequently shape inference side, but we've run into OOMs here and so rather
starting more restrictive here).
Update TOSA ops and also (but potentially more as an example and for discussion)
the shape inference pass.
This looks sketchy, why is this necessary?