Skip to content

Conversation

@nhaehnle
Copy link
Collaborator

@nhaehnle nhaehnle commented Aug 2, 2024

This is convenient when operating on vectors in a bulk, bit-manipulating fashion. I plan to use this in a future change.

This is convenient when operating on vectors in a bulk, bit-manipulating
fashion. I plan to use this in a future change.
@nhaehnle nhaehnle requested review from Sisyph and rampitec August 2, 2024 19:44
@llvmbot
Copy link
Member

llvmbot commented Aug 2, 2024

@llvm/pr-subscribers-llvm-adt

Author: Nicolai Hähnle (nhaehnle)

Changes

This is convenient when operating on vectors in a bulk, bit-manipulating fashion. I plan to use this in a future change.


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

1 Files Affected:

  • (modified) llvm/include/llvm/ADT/PackedVector.h (+1)
diff --git a/llvm/include/llvm/ADT/PackedVector.h b/llvm/include/llvm/ADT/PackedVector.h
index 4a6986669c936..b6bb6a4738067 100644
--- a/llvm/include/llvm/ADT/PackedVector.h
+++ b/llvm/include/llvm/ADT/PackedVector.h
@@ -143,6 +143,7 @@ class PackedVector : public PackedVectorBase<T, BitNum, BitVectorTy,
   }
 
   const BitVectorTy &raw_bits() const { return Bits; }
+  BitVectorTy &raw_bits() { return Bits; }
 };
 
 // Leave BitNum=0 undefined.

Copy link
Collaborator

@rampitec rampitec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nhaehnle nhaehnle merged commit 5edb493 into llvm:main Aug 2, 2024
@nhaehnle nhaehnle deleted the pub-packedvector branch August 2, 2024 20:29
@dwblaikie
Copy link
Collaborator

Would be nice to include some (albeit, pretty trivial) test coverage.

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.

4 participants