Page MenuHomeFreeBSD

bitset: avoid pessimized code when bitset size is not constant
ClosedPublic

Authored by rlibby on Dec 3 2019, 7:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 31, 11:09 AM
Unknown Object (File)
Oct 17 2024, 1:02 PM
Unknown Object (File)
Oct 12 2024, 3:11 PM
Unknown Object (File)
Oct 11 2024, 2:51 PM
Unknown Object (File)
Oct 11 2024, 4:50 AM
Unknown Object (File)
Oct 10 2024, 10:06 PM
Unknown Object (File)
Oct 10 2024, 7:46 PM
Unknown Object (File)
Oct 5 2024, 8:44 PM
Subscribers

Details

Summary

We have a couple optimizations for when the bitset is known to be just
one word. But with dynamically sized bitsets, it was actually more work
to determine the size than just to do the necessary computation. Now,
only use the optimization when the size is known to be constant.

Test Plan

kyua test -k /usr/tests/sys/Kyuafile

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj added inline comments.
sys/sys/bitset.h
37 ↗(On Diff #65151)

I'd add a brief comment explaining why this is used.

This revision is now accepted and ready to land.Dec 3 2019, 3:53 PM

markj feedback: add a comment. Also, wrap a long line.

This revision now requires review to proceed.Dec 3 2019, 4:36 PM
This revision is now accepted and ready to land.Dec 3 2019, 4:45 PM