mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
[LoopAccesses] Handle case when no memchecks are needed after partitioning
llvm-svn: 233930
This commit is contained in:
parent
53dc058e4d
commit
a56777ef49
@ -1211,9 +1211,8 @@ static Instruction *getFirstInst(Instruction *FirstInst, Value *V,
|
|||||||
|
|
||||||
std::pair<Instruction *, Instruction *> LoopAccessInfo::addRuntimeCheck(
|
std::pair<Instruction *, Instruction *> LoopAccessInfo::addRuntimeCheck(
|
||||||
Instruction *Loc, const SmallVectorImpl<int> *PtrPartition) const {
|
Instruction *Loc, const SmallVectorImpl<int> *PtrPartition) const {
|
||||||
Instruction *tnullptr = nullptr;
|
|
||||||
if (!PtrRtCheck.Need)
|
if (!PtrRtCheck.Need)
|
||||||
return std::pair<Instruction *, Instruction *>(tnullptr, tnullptr);
|
return std::make_pair(nullptr, nullptr);
|
||||||
|
|
||||||
unsigned NumPointers = PtrRtCheck.Pointers.size();
|
unsigned NumPointers = PtrRtCheck.Pointers.size();
|
||||||
SmallVector<TrackingVH<Value> , 2> Starts;
|
SmallVector<TrackingVH<Value> , 2> Starts;
|
||||||
@ -1284,6 +1283,9 @@ std::pair<Instruction *, Instruction *> LoopAccessInfo::addRuntimeCheck(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!MemoryRuntimeCheck)
|
||||||
|
return std::make_pair(nullptr, nullptr);
|
||||||
|
|
||||||
// We have to do this trickery because the IRBuilder might fold the check to a
|
// We have to do this trickery because the IRBuilder might fold the check to a
|
||||||
// constant expression in which case there is no Instruction anchored in a
|
// constant expression in which case there is no Instruction anchored in a
|
||||||
// the block.
|
// the block.
|
||||||
|
Loading…
Reference in New Issue
Block a user