[clang] [clang] Avoid evaluating the BitWidth expression over and over again (PR #66203)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 6 05:48:45 PDT 2023


tbaederr wrote:

Well, this is not going to make a noticeable difference in runtime. https://reviews.llvm.org/D155548 didn't land because there are no measurements to make where this makes a measurable difference.

As for my earlier comment, it would also make sense to rename that function to `computeBitWidth()` or just cache the computed value (we compute it when parsing anyway to diagnose 0 size, etc. right?).

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


More information about the cfe-commits mailing list