[PATCH] D32819: [IR] Switch AttributeList to use an array for O(1) access
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 9 10:01:32 PDT 2017
rnk added inline comments.
================
Comment at: llvm/include/llvm/IR/Attributes.h:287
public:
enum AttrIndex : unsigned {
+ FunctionIndex = 0,
----------------
javed.absar wrote:
> Yes, make the code much neater. Unfortunately, because of legacy stuff, as you mention, adjustments are needed in lot of places. I think encapsulating the index change inside AttributeList might be neater (less pervasive change).
OK, I'll go ahead and split the changes.
================
Comment at: llvm/include/llvm/IR/Attributes.h:303
/// the empty attributes list.
AttributeListImpl *pImpl = nullptr;
----------------
javed.absar wrote:
> Should pImpl also have 'private' access-specifier, given getImpl is moved to there?
It is already private.
https://reviews.llvm.org/D32819
More information about the llvm-commits
mailing list