Provide better factoring for the SSA types to allow type agnostic def/use
iterators, along with type specific ones.

Also provide mechanics to cast from Operation up to OperationStmt etc.

PiperOrigin-RevId: 205175333
diff --git a/lib/IR/Instructions.cpp b/lib/IR/Instructions.cpp
index e9e28cb..23aaa4a 100644
--- a/lib/IR/Instructions.cpp
+++ b/lib/IR/Instructions.cpp
@@ -81,8 +81,9 @@
                              unsigned numResults,
                              ArrayRef<NamedAttribute> attributes,
                              MLIRContext *context)
-    : Operation(name, attributes, context), Instruction(Kind::Operation),
-      numOperands(numOperands), numResults(numResults) {}
+    : Operation(name, /*isInstruction=*/ true, attributes, context),
+      Instruction(Kind::Operation), numOperands(numOperands),
+      numResults(numResults) {}
 
 OperationInst::~OperationInst() {
   // Explicitly run the destructors for the operands and results.