[MemorySSA, BPF] Use isa instead of dyn_cast (NFC)

This commit is contained in:
Kazu Hirata 2020-12-31 09:39:12 -08:00
parent 7bc76fd0ec
commit b557c32ae9
2 changed files with 3 additions and 3 deletions

View File

@ -1779,8 +1779,8 @@ MemoryUseOrDef *MemorySSA::createNewAccess(Instruction *I,
bool Def, Use; bool Def, Use;
if (Template) { if (Template) {
Def = dyn_cast_or_null<MemoryDef>(Template) != nullptr; Def = isa<MemoryDef>(Template);
Use = dyn_cast_or_null<MemoryUse>(Template) != nullptr; Use = isa<MemoryUse>(Template);
#if !defined(NDEBUG) #if !defined(NDEBUG)
ModRefInfo ModRef = AAP->getModRefInfo(I, None); ModRefInfo ModRef = AAP->getModRefInfo(I, None);
bool DefCheck, UseCheck; bool DefCheck, UseCheck;

View File

@ -221,7 +221,7 @@ bool BPFAdjustOptImpl::avoidSpeculation(Instruction &I) {
} }
} }
if (!dyn_cast<LoadInst>(&I) && !dyn_cast<CallInst>(&I)) if (!isa<LoadInst>(&I) && !isa<CallInst>(&I))
return false; return false;
// For: // For: