Rename Operation::getAs to Operation::dyn_cast

Also rename Operation::is to Operation::isa
Introduce Operation::cast

All of these are for consistency with global dyn_cast/cast/isa operators.

PiperOrigin-RevId: 217878786
diff --git a/lib/Analysis/LoopAnalysis.cpp b/lib/Analysis/LoopAnalysis.cpp
index 9e65e7b..5f1b7f2 100644
--- a/lib/Analysis/LoopAnalysis.cpp
+++ b/lib/Analysis/LoopAnalysis.cpp
@@ -145,7 +145,7 @@
   assert(affineApplyOps.size() == 1 &&
          "CompositionAffineMapsPass must have "
          "been run: there should be at most one AffineApplyOp");
-  auto composeOp = affineApplyOps[0]->getAs<AffineApplyOp>();
+  auto composeOp = affineApplyOps[0]->cast<AffineApplyOp>();
   return !AffineValueMap(*composeOp).isFunctionOf(dim, input);
 }
 
@@ -186,8 +186,8 @@
   auto &matches = loadAndStores.match(forStmt);
   for (auto ls : matches) {
     auto *op = cast<OperationStmt>(ls.first);
-    auto load = op->getAs<LoadOp>();
-    auto store = op->getAs<StoreOp>();
+    auto load = op->dyn_cast<LoadOp>();
+    auto store = op->dyn_cast<StoreOp>();
     bool contiguous = load ? isContiguousAccess(forStmt, load)
                            : isContiguousAccess(forStmt, store);
     if (!contiguous) {