Skip to content

[IR] Bump AttributeBitSet width to 16 bytes #106138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

yuxuanchen1997
Copy link
Member

@yuxuanchen1997 yuxuanchen1997 commented Aug 26, 2024

As discussed in #106134, we are bumping the width of this set to 16 bytes to accommodate more attributes. This allows us to have a total of 128 attributes instead of 96 as we stand today.

@yuxuanchen1997 yuxuanchen1997 self-assigned this Aug 26, 2024
@yuxuanchen1997 yuxuanchen1997 requested a review from nikic August 26, 2024 20:49
@llvmbot
Copy link
Member

llvmbot commented Aug 26, 2024

@llvm/pr-subscribers-llvm-ir

Author: Yuxuan Chen (yuxuanchen1997)

Changes

As discussed in #106134, we are bumping the width of this set to 16 bytes to accommodate more attributes.


Full diff: https://github.com/llvm/llvm-project/pull/106138.diff

1 Files Affected:

  • (modified) llvm/lib/IR/AttributeImpl.h (+1-1)
diff --git a/llvm/lib/IR/AttributeImpl.h b/llvm/lib/IR/AttributeImpl.h
index b9441729b48c69..2f1c7b85e66502 100644
--- a/llvm/lib/IR/AttributeImpl.h
+++ b/llvm/lib/IR/AttributeImpl.h
@@ -275,7 +275,7 @@ class ConstantRangeListAttributeImpl final
 
 class AttributeBitSet {
   /// Bitset with a bit for each available attribute Attribute::AttrKind.
-  uint8_t AvailableAttrs[12] = {};
+  uint8_t AvailableAttrs[16] = {};
   static_assert(Attribute::EndAttrKinds <= sizeof(AvailableAttrs) * CHAR_BIT,
                 "Too many attributes");
 

@yuxuanchen1997 yuxuanchen1997 merged commit 1200d35 into main Aug 27, 2024
10 checks passed
@yuxuanchen1997 yuxuanchen1997 deleted the users/yuxuanchen1997/bump-attr-bitset branch August 27, 2024 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants