This is an archive of the discontinued LLVM Phabricator instance.

[polly] Change SmallPtrSet which are being iterated into SmallSetVector
ClosedPublic

Authored by mgrang on Oct 20 2016, 7:26 PM.

Diff Detail

Event Timeline

mgrang updated this revision to Diff 75388.Oct 20 2016, 7:26 PM
mgrang retitled this revision from to [polly] Change SmallPtrSet which are being iterated into SmallSetVector.
mgrang updated this object.
mgrang added reviewers: grosser, Unknown Object (User), zinob.
mgrang added a project: Restricted Project.
mgrang added a comment.EditedOct 20 2016, 7:30 PM

Tobias,

There is another SmallPtrSet in lib/Analysis/ScopInfo.h which is being iterated IslNodeBuilder.cpp:

SmallPtrSet<ScopArrayInfo *, 2> DerivedSAIs;
 const SmallPtrSetImpl<ScopArrayInfo *> &getDerivedSAIs() const {
   return DerivedSAIs;
}

I wanted to change this into a SmallSetVector but I am not sure how to replace SmallPtrSetImpl with a SmallSetVector version.

Any pointers would be appreciated.

Thanks,
Mandeep

grosser accepted this revision.Oct 20 2016, 10:27 PM
grosser edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Oct 20 2016, 10:27 PM

Regarding the second change. I also don't see how we can use a SmallSetVectorImpl. I suggest to just use a SetVector for now. This is certainly correct and I doubt this part is performance critical. Feel free to commit such a change without further review.

This revision was automatically updated to reflect the committed changes.