Author: Kazu Hirata Date: 2020-12-30T17:45:38-08:00 New Revision: 95ea86587c54240b3f1b7ed5a18d2f3660cb7573
URL: https://github.com/llvm/llvm-project/commit/95ea86587c54240b3f1b7ed5a18d2f3660cb7573 DIFF: https://github.com/llvm/llvm-project/commit/95ea86587c54240b3f1b7ed5a18d2f3660cb7573.diff LOG: [PGO] Use isa instead of dyn_cast (NFC) Added: Modified: llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp Removed: ################################################################################ diff --git a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp index 480de5483358..9efc7d1ac500 100644 --- a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp +++ b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp @@ -269,7 +269,7 @@ class PGOCounterPromoter { // 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; } diff --git a/llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp b/llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp index 7acbdb9f55b7..55a93b6152dc 100644 --- a/llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp +++ b/llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp @@ -254,7 +254,7 @@ class MemOPSizeOpt : public InstVisitor<MemOPSizeOpt> { 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)); } } _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits