[PGO] Use isa instead of dyn_cast (NFC)

This commit is contained in:
Kazu Hirata 2020-12-30 17:45:37 -08:00
parent 331c28f60d
commit 95ea86587c
2 changed files with 2 additions and 2 deletions

View File

@ -269,7 +269,7 @@ public:
// FIXME: add other heuristics to detect long running loops. // FIXME: add other heuristics to detect long running loops.
if (SkipRetExitBlock) { if (SkipRetExitBlock) {
for (auto BB : ExitBlocks) for (auto BB : ExitBlocks)
if (dyn_cast<ReturnInst>(BB->getTerminator()) != nullptr) if (isa<ReturnInst>(BB->getTerminator()))
return false; return false;
} }

View File

@ -254,7 +254,7 @@ public:
LibFunc Func; LibFunc Func;
if (TLI.getLibFunc(CI, Func) && if (TLI.getLibFunc(CI, Func) &&
(Func == LibFunc_memcmp || Func == LibFunc_bcmp) && (Func == LibFunc_memcmp || Func == LibFunc_bcmp) &&
!dyn_cast<ConstantInt>(CI.getArgOperand(2))) { !isa<ConstantInt>(CI.getArgOperand(2))) {
WorkList.push_back(MemOp(&CI)); WorkList.push_back(MemOp(&CI));
} }
} }