[llvm] [mlir] mlir/Presburger/MPInt: move into llvm/ADT (PR #94953)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 2 10:33:11 PDT 2024


artagnon wrote:

> * The representation of MPInt seems somewhat non-optimal to me, in that it has the separate `unsigned HoldsLarge` field -- we could use `APInt.BitWidth == 0` to indicate this and cut the structure by 8 bytes (I think? I don't think the APInt padding would get used with the current implementation). This probably wasn't an option with the class in MLIR, but if it's in ADT we can make it a friend of APInt and make use of internal implementation details.

Hi @nikic, I'm trying to fix this issue, and I have a question: before SlowDynamicAPInt or APInt are even constructed for the fast-case of DynamicAPInt, how can we be assured that `Val.BitWidth == 0`?

https://github.com/llvm/llvm-project/pull/94953


More information about the llvm-commits mailing list