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

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 25 14:29:38 PDT 2024


aeubanks wrote:

> The main thing I would be concerned about at this point is whether the entire approach is viable or not -- I'd rather not add the attribute (plus a whole new attribute _kind_) if it later turns out that this is too expensive.
+1
> 
> Anyway, a couple of high level comments:
> 
> * I'm not sure this is the ideal attribute name. `initialized` to me sounds like this attribute promises that the memory is initialized on entry to the function, not that the function will initialize it. Maybe `will_initialize` is a better name? Or `initializes`?
Makes sense, `initializes` sounds good.
> * How important is it to represent multiple ranges? We have _just_ added support for ConstantRange attributes, so a single range can be represented out of the box. This also avoids the tricky question of how to deal with non-zero start offsets in DSE, which we don't really have AA support for right now. My intuition would be that you usually get whole object initializations -- but maybe this is not the case due to padding holes?
Yes the concern was padding holes. @haopliu do you have any data on how often padding prevents whole object initialization?

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


More information about the llvm-commits mailing list