aeubanks added a comment.

I agree that we really should only have one attribute builder class.

A SmallVector does seem nicer than having a static array the size of all 
possible attributes. We should avoid creating copies of AttributeLists/Sets 
into AttrBuilders and just have AttrBuilder be a list of attribute diffs, 
basically what you have as SmallAttrBuilder, although I'm not sure if we also 
want to handle a list of attributes we want to *remove* from an AttributeSet in 
SmallAttrBuilder as well?

As for querying the AttrBuilder for attributes it contains, IMO we shouldn't 
need to in most cases, typically we can directly query the AttributeList/Set 
directly. https://reviews.llvm.org/D115819 shows that a bunch of the query 
methods in AttrBuilder are easily removed. `LLParser::validateEndOfModule()` is 
the last major user of AttributeList functionality we may not want to support 
but it seems fixable.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115798/new/

https://reviews.llvm.org/D115798

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to