mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool>
This is to be consistent with StringSet and ultimately with the standard library's associative container insert function. This lead to updating SmallSet::insert to return pair<iterator, bool>, and then to update SmallPtrSet::insert to return pair<iterator, bool>, and then to update all the existing users of those functions... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222334 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -4801,7 +4801,7 @@ bool LoopVectorizationLegality::canVectorizeMemory() {
|
||||
|
||||
// If we did *not* see this pointer before, insert it to the read-write
|
||||
// list. At this phase it is only a 'write' list.
|
||||
if (Seen.insert(Ptr)) {
|
||||
if (Seen.insert(Ptr).second) {
|
||||
++NumReadWrites;
|
||||
|
||||
AliasAnalysis::Location Loc = AA->getLocation(ST);
|
||||
@@ -4834,7 +4834,8 @@ bool LoopVectorizationLegality::canVectorizeMemory() {
|
||||
// read a few words, modify, and write a few words, and some of the
|
||||
// words may be written to the same address.
|
||||
bool IsReadOnlyPtr = false;
|
||||
if (Seen.insert(Ptr) || !isStridedPtr(SE, DL, Ptr, TheLoop, Strides)) {
|
||||
if (Seen.insert(Ptr).second ||
|
||||
!isStridedPtr(SE, DL, Ptr, TheLoop, Strides)) {
|
||||
++NumReads;
|
||||
IsReadOnlyPtr = true;
|
||||
}
|
||||
@@ -5097,7 +5098,7 @@ bool LoopVectorizationLegality::AddReductionVar(PHINode *Phi,
|
||||
// value must only be used once, except by phi nodes and min/max
|
||||
// reductions which are represented as a cmp followed by a select.
|
||||
ReductionInstDesc IgnoredVal(false, nullptr);
|
||||
if (VisitedInsts.insert(UI)) {
|
||||
if (VisitedInsts.insert(UI).second) {
|
||||
if (isa<PHINode>(UI))
|
||||
PHIs.push_back(UI);
|
||||
else
|
||||
|
||||
@@ -1724,7 +1724,7 @@ int BoUpSLP::getTreeCost() {
|
||||
for (UserList::iterator I = ExternalUses.begin(), E = ExternalUses.end();
|
||||
I != E; ++I) {
|
||||
// We only add extract cost once for the same scalar.
|
||||
if (!ExtractCostCalculated.insert(I->Scalar))
|
||||
if (!ExtractCostCalculated.insert(I->Scalar).second)
|
||||
continue;
|
||||
|
||||
// Uses by ephemeral values are free (because the ephemeral value will be
|
||||
@@ -1922,7 +1922,7 @@ Value *BoUpSLP::vectorizeTree(TreeEntry *E) {
|
||||
ValueList Operands;
|
||||
BasicBlock *IBB = PH->getIncomingBlock(i);
|
||||
|
||||
if (!VisitedBBs.insert(IBB)) {
|
||||
if (!VisitedBBs.insert(IBB).second) {
|
||||
NewPhi->addIncoming(NewPhi->getIncomingValueForBlock(IBB), IBB);
|
||||
continue;
|
||||
}
|
||||
@@ -3632,7 +3632,7 @@ bool SLPVectorizer::vectorizeChainsInBlock(BasicBlock *BB, BoUpSLP &R) {
|
||||
|
||||
for (BasicBlock::iterator it = BB->begin(), e = BB->end(); it != e; it++) {
|
||||
// We may go through BB multiple times so skip the one we have checked.
|
||||
if (!VisitedInstrs.insert(it))
|
||||
if (!VisitedInstrs.insert(it).second)
|
||||
continue;
|
||||
|
||||
if (isa<DbgInfoIntrinsic>(it))
|
||||
|
||||
Reference in New Issue
Block a user