[PATCH] D76243: [mlir][spirv] Move type checks from dialect class to type hierarchy
Mahesh Ravishankar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 16 12:35:11 PDT 2020
mravishankar accepted this revision.
mravishankar added a comment.
This revision is now accepted and ready to land.
This is so much nicer! Thanks
================
Comment at: mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp:164
// If the type is already valid in SPIR-V, directly return.
- return spirv::SPIRVDialect::isValidType(type) ? type : Optional<Type>();
+ return type.isa<spirv::SPIRVType>() ? type : Optional<Type>();
});
----------------
You could just make this a dyn_cast<spirv::SPIRVType>()
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76243/new/
https://reviews.llvm.org/D76243
More information about the llvm-commits
mailing list