Displaying 2 results from an estimated 2 matches for "754912".
2020 Jun 23
2
[RFC] Small Bitfield utilities
...0;
> using Amount = Bitfield<unsigned, 0, 4>;
>
> bitfield<Amount>(Storage) = true;
> unsigned Value = bitfield<Amount>(Storage);
> bool Cond = bitfield<Amount>(Storage).isSet();
>
> 3. In between
> code: https://reviews.llvm.org/D82058#inline-754912
>
> uint8_t Storage = 0;
> using Amount = Bitfield<unsigned, 0, 4>;
>
> Amount::fieldOf(Storage) = true;
> unsigned Value = Amount::fieldOf(Storage);
> bool Cond = Amount::isSet(Storage);
>
>
> Proposal 1 has the inconvenience of polluting the llvm name...
2020 Jun 11
2
[RFC] Small Bitfield utilities
TL;DR: Have support in ADT for typed values packing into opaque scalar types
- Code & design choices: https://reviews.llvm.org/D81580
- Usage:
https://reviews.llvm.org/differential/changeset/?ref=2005337&whitespace=ignore-most
- Example of rewrite: https://reviews.llvm.org/D81662
*CONTEXT*
There are places in LLVM where we need to pack typed fields into opaque
values.
For instance,