[LLVMdev] IR extension proposal: bitset constants

Renato Golin renato.golin at linaro.org
Thu Jan 29 04:16:58 PST 2015


On 29 Jan 2015 11:36, "Sean Silva" <chisophugis at gmail.com> wrote:
>
>
>
> On Thu, Jan 29, 2015 at 12:53 AM, Renato Golin <renato.golin at linaro.org>
wrote:
>>
>> So, bitset would be a property that means : globals with the same name
will append on a string of bits in the order in which they appear, and it's
the job of the front end to make sure the correct order is followed in
every unit, so that linking does the right job in every corner case?
>>
>> Could that be used for efficient global boolean flags, like LLVM's
options? Even if you don't need the range check, you get the bit mask check
for free.
>
> Maybe during LTO... in general they would need to have distinct addresses.
>
> Actually, Peter, would it be possible to prototype this with an appending
i8 array that we already have in the IR? Some space overhead compared to
appending bits, but could allow for a quick prototype.

This would work, and you could make the packaging during your lowering
pass, no?

Cheers,
Renato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150129/f77055d6/attachment.html>


More information about the llvm-dev mailing list