mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-22 13:32:09 +00:00
[LSR] Silence static analyzer null dereference warnings with assertions. NFCI.
Add assertions to make it clear that GenerateIVChain / NarrowSearchSpaceByPickingWinnerRegs should succeed in finding non-null values llvm-svn: 372518
This commit is contained in:
parent
322c52a01b
commit
6fd9cdde6b
@ -3165,6 +3165,7 @@ void LSRInstance::GenerateIVChain(const IVChain &Chain, SCEVExpander &Rewriter,
|
||||
LLVM_DEBUG(dbgs() << "Concealed chain head: " << *Head.UserInst << "\n");
|
||||
return;
|
||||
}
|
||||
assert(IVSrc && "Failed to find IV chain source");
|
||||
|
||||
LLVM_DEBUG(dbgs() << "Generate chain at: " << *IVSrc << "\n");
|
||||
Type *IVTy = IVSrc->getType();
|
||||
@ -4835,6 +4836,7 @@ void LSRInstance::NarrowSearchSpaceByPickingWinnerRegs() {
|
||||
}
|
||||
}
|
||||
}
|
||||
assert(Best && "Failed to find best LSRUse candidate");
|
||||
|
||||
LLVM_DEBUG(dbgs() << "Narrowing the search space by assuming " << *Best
|
||||
<< " will yield profitable reuse.\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user