[llvm] Add the 'initialized' attribute langref and support (PR #84803)

Haopeng Liu via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 5 15:12:39 PDT 2024


haopliu wrote:

Renamed the attr to "initializes" and changed the attr type to ConstantRangeList.

For the compilation-time regression, we further optimized the attr inference and the new compilation cost looks good:
https://llvm-compile-time-tracker.com/compare.php?from=762cbd82da4debf8b026a4eb4ade66720acf3182&to=f2f31b0407f20e4000c5bb290215ae6614a28837&stat=instructions%3Au

As for multiple ranges, it seem not uncommon, at least in our internal benchmarks. Here is the data we got:
- The range size: 1-23, 25-31, 33-34, 37, 39, 41, 42, 45, 46, 49, 50, 54, 55, 59, 75, 76, 114, 216
- Percent: #. attrs whose size = 1 VS. > 1 is about 3 : 1.
- It could be caused by padding or a function just initializes the specific non-consecutive fields.

Meanwhile, we would like to have a good extensibility with multiple ranges. We experimented a prototype that improves DSE with zero start offsets/attributes and the result looks promising. We are exploring how to deal with non-zero start offsets in DSE :-D

Please take another look at your convenience. Thank you all!

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


More information about the llvm-commits mailing list