[llvm] [CodeGen][SDAG] Remove Combiner WorklistMap (PR #92900)

via llvm-commits llvm-commits at lists.llvm.org
Thu May 23 08:11:16 PDT 2024


aengelke wrote:

> Can we do something with PersistentId instead? Or at least, steal the bytes in release builds?

I guess, we probably could? I'm not too familiar how SDAG behaves under pressure, but I can imagine that the worklist could exceed 64k nodes, so the worklist index would need 32 bits. SDNodeFlags is 2 bytes (14 bits), so there are 2 padding bytes near the end before CFIType (which btw appears to be only used for KCFI calls). When swapping Flags and PersistentId, we should get 32 bits where to put the combiner index (+ place the PersistentId under ENABLE_ABI_BREAKING_CHECKS, see [D120714](https://reviews.llvm.org/D120714)). (NB: just from glancing at the code, I haven't compile-checked.)

> it takes all the padding bits we'd be considering using to extend NumOperands/NumValues to U32 to fix https://github.com/llvm/llvm-project/issues/55737 etc. :(

Well... I *personally* think that nobody should use large aggregates as IR values (especially not with >65k values) in the first place -- it's been discouraged for as long as I can remember -- and that this is something we shouldn't need to support. It's probably easier (and also in their interest w.r.t. compile times) to generate different IR in the front-end.

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


More information about the llvm-commits mailing list