[llvm] Assert range attribute is not empty nor full (PR #100601)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 28 07:04:12 PDT 2024


nikic wrote:

I think it would be somewhat unusual to allow no-op attributes, e.g. we don't do this for some other things like dereferenceable(0) either. Instead, some key places will simply not add the attribute if it would have no effect (e.g. https://github.com/llvm/llvm-project/blob/bb064535bd071c1bddaf55ff7fe283fc8d23c1fc/llvm/lib/IR/Attributes.cpp#L1932-L1936).

Though my main concern there would be that in textual IR it's kind of hard to distinguish empty & full range without knowing LLVM implementation details, as they are both represented using lo=hi.

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


More information about the llvm-commits mailing list