This is an archive of the discontinued LLVM Phabricator instance.

[mlir][ods] Use lambda in element type check pred rather than repeated casts
ClosedPublic

Authored by jpienaar on Nov 10 2021, 3:29 PM.

Details

Summary

Avoids multiple cast & getElementType calls. Just a local change for ShapedType
containers but reduces one run from 24.7 to 24.04s.

Resultant code generated change:
https://gist.github.com/jpienaar/7ffd2e9b0737134ba2ea2729b91c9572

Diff Detail

Event Timeline

jpienaar created this revision.Nov 10 2021, 3:29 PM
jpienaar requested review of this revision.Nov 10 2021, 3:29 PM
rriddle accepted this revision.Nov 10 2021, 3:32 PM
rriddle added inline comments.
mlir/include/mlir/IR/OpBase.td
570–574

Was this used by anything else?

575
This revision is now accepted and ready to land.Nov 10 2021, 3:32 PM
Mogball accepted this revision.Nov 10 2021, 3:49 PM
This revision was automatically updated to reflect the committed changes.
jpienaar marked 2 inline comments as done.