[PGO] Use isa instead of dyn_cast (NFC)
authorKazu Hirata <kazu@google.com>
Thu, 31 Dec 2020 01:45:37 +0000 (17:45 -0800)
committerKazu Hirata <kazu@google.com>
Thu, 31 Dec 2020 01:45:38 +0000 (17:45 -0800)
llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp

index 480de54..9efc7d1 100644 (file)
@@ -269,7 +269,7 @@ public:
     // FIXME: add other heuristics to detect long running loops.
     if (SkipRetExitBlock) {
       for (auto BB : ExitBlocks)
-        if (dyn_cast<ReturnInst>(BB->getTerminator()) != nullptr)
+        if (isa<ReturnInst>(BB->getTerminator()))
           return false;
     }
 
index 7acbdb9..55a93b6 100644 (file)
@@ -254,7 +254,7 @@ public:
     LibFunc Func;
     if (TLI.getLibFunc(CI, Func) &&
         (Func == LibFunc_memcmp || Func == LibFunc_bcmp) &&
-        !dyn_cast<ConstantInt>(CI.getArgOperand(2))) {
+        !isa<ConstantInt>(CI.getArgOperand(2))) {
       WorkList.push_back(MemOp(&CI));
     }
   }