================
@@ -114,31 +112,39 @@ class FactEntry : public CapabilityExpr {
   };
 
 private:
-  const FactEntryKind Kind : 8;
+  const FactEntryKind Kind : 4;
 
   /// Exclusive or shared.
-  LockKind LKind : 8;
+  const LockKind LKind : 4;
+
+  /// How it was acquired.
+  const SourceKind Source : 4;
 
-  // How it was acquired.
-  SourceKind Source : 8;
+  /// Reentrancy depth; 16 bits should be enough given that FactID is a short,
+  /// and thus we can't store more than 65536 facts anyway.
+  unsigned int ReentrancyDepth : 16;
----------------
aaronpuchert wrote:

This should probably be in `LockableFactEntry`. I don't think we want to 
support reentrant scoped locks, and they don't really make sense to me.

I understand that you want to pack these, but that's probably not so important: 
we're looking at one function at a time, and will clean up everything before we 
go check out the next function. The existing packing is just to make it not too 
wasteful. (Also, computers have byte-addressable memory, so there is no need to 
reserve an entire word if we only need a byte.)

https://github.com/llvm/llvm-project/pull/137133
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to