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)
Feb 4 2024, 4:30 PM
Unknown Object (File)
Dec 20 2023, 5:38 AM
Unknown Object (File)
Oct 25 2023, 10:51 AM
Unknown Object (File)
Oct 23 2023, 8:57 AM
Unknown Object (File)
Oct 18 2023, 1:22 AM
Unknown Object (File)
Jun 16 2023, 3:25 AM
Unknown Object (File)
Jun 13 2023, 1:31 PM
Unknown Object (File)
Jun 3 2023, 8:07 AM
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