1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00

[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 183de26ac5
commit a22bf96241
2 changed files with 3 additions and 3 deletions

View File

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