-
Notifications
You must be signed in to change notification settings - Fork 10.5k
SILOptimizer: use BasicBlockSet instead of SmallPtrSet in various transformations. #35583
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
Changes from all commits
1dc8cbb
c638a2f
ddd0f4d
2f890dc
3e6fe70
f7f7188
4d61dad
f481919
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -199,7 +199,7 @@ class SILFunction | |
|
||
/// A monotonically increasing ID which is incremented whenever a | ||
/// BasicBlockBitfield is constructed. | ||
/// Usually this stays below 1000, so a 32-bit unsigned is more than | ||
/// Usually this stays below 100000, so a 32-bit unsigned is more than | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we have an assert so in asserts builds we catch this if anyone breaks it? Or maybe you already have one? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is already an assert in the BasicBlockBitfield constructor |
||
/// sufficient. | ||
/// For details see BasicBlockBitfield::bitfieldID; | ||
unsigned currentBitfieldID = 1; | ||
|
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.
Can you change the name of this to reflect that one can only add and can never remove? The name suggests it is a general utility.
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.
Hm, I like this name. It describes best what this class is.
I even think that there shouldn't be a
remove
method in llvm:SetVector. It is O(n), but people use it as if it was O(0).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.
@eeckstein hmmm... maybe the right thing to do is to make this a blot set vector then? Blot set vectors do not have this issue and are a generic algorithm.