[llvm] r175370 - Turn the enum attributes DenseSet in AttrBuilder into a set of bits.

Benjamin Kramer benny.kra at gmail.com
Sun Feb 17 04:09:54 PST 2013


On 17.02.2013, at 11:46, Bill Wendling <wendling at apple.com> wrote:

> Holy cow...could you have told me first before you went and did this?! I've kinda been working on this a lot, and would have liked to review your changes first. :-(

I would've asked you for review on major changes, but this is just a minor implementation detail. DenseSet is really not the right data structure to store a set of 34 enums and I fixed that. And yes, I should've seen that when you first committed the enum DenseMapInfo stuff.

If you have problems with this commit I'm sure they can be fixed. Working on a public tree yields merge conflicts from time to time, sorry for any extra work created by that.

- Ben
> 
> -bw
> 
> On Feb 16, 2013, at 2:29 PM, Benjamin Kramer <benny.kra at gmail.com> wrote:
> 
>> 
>> On 16.02.2013, at 23:24, Chandler Carruth <chandlerc at google.com> wrote:
>> 
>>> 
>>> On Sat, Feb 16, 2013 at 11:13 AM, Benjamin Kramer <benny.kra at googlemail.com> wrote:
>>> Author: d0k
>>> Date: Sat Feb 16 13:13:18 2013
>>> New Revision: 175370
>>> 
>>> URL: http://llvm.org/viewvc/llvm-project?rev=175370&view=rev
>>> Log:
>>> Turn the enum attributes DenseSet in AttrBuilder into a set of bits.
>>> 
>>> Avoids malloc and is a lot denser. We lose iteration over target independent
>>> attributes, but that's a strange interface anyways and didn't have any users
>>> outside of AttrBuilder.
>>> 
>>> One of the goals was to remove the arbitrary upper limit of 64 -- could you maybe use a BitVector so that we don't hit this later?
>> 
>> Sure, I can use a std::bitset. There are currently 34 attrs so I thought this wasn't necessary.
>> 
>> - Ben
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 





More information about the llvm-commits mailing list