-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[NFC][ConstraintGraph] Address fixme and switch CG::Component dependsOn type #34621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NFC][ConstraintGraph] Address fixme and switch CG::Component dependsOn type #34621
Conversation
@swift-ci Please smoke test |
@swift-ci please smoke test MacOS Platform |
@swift-ci please smoke test Linux Platform |
@swift-ci please smoke test MacOS Platform |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the idea was to change it to store Component *
in a TinyPtrVector
(which allocates a single element on stack) because (currently) only components with one-way constraints could be co-dependent, this would be less expensive than SmallVector<unsigned, 2>
in majority of cases which wouldn't have any dependencies at all.
dced2c6
to
2d3c72e
Compare
That makes sense thanks @xedin, I made the changes :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! A couple of minor suggestions regarding naming and keep in mind that instead of returning a reference that it's better to return ArrayRef
when possible.
4006882
to
3494233
Compare
Awesome, Thank you! All adjustments applied |
@swift-ci Please smoke test |
3494233
to
eedacf5
Compare
…ncies type to SmallVector<unsigned>
eedacf5
to
72b594b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
@swift-ci Please smoke test |
@swift-ci please smoke test MacOS Platform |
Thanks @xedin! |
Minor NFC changing the member type. Seems like
TinyPointerVector
is only for pointers, so aSmallVector
should be good in this case.