[llvm-dev] The semantics of nonnull attribute (original) (raw)
Nicolai Hähnle via llvm-dev llvm-dev at lists.llvm.org
Tue Feb 18 19:14:00 PST 2020
- Previous message: [llvm-dev] The semantics of nonnull attribute
- Next message: [llvm-dev] The semantics of nonnull attribute
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Feb 19, 2020 at 3:51 AM Juneyoung Lee via llvm-dev <llvm-dev at lists.llvm.org> wrote:
I think notpoison (Johannes's used keyword) makes sense. We can simulate the original UB semantics by simply attaching it, as explained. For the attributes other than nonnull, we may need more discussion; align attribute seems to be okay with defining it as poison, dereferenceable may need UB even without nonnull (because it needs to be non-poison as shown Nuno's hoisting example).
For reference, the hoisting example was:
f(dereferenceable(4) %p) { loop() { %v = load %p use(%v) } } => f(dereferenceable(4) %p) { %v = load %p loop() { use(%v) } }
Would it be correct to resolve this by saying that dereferenceable(N) implies not_poison? This would be helpful as a clarification of how it all fits together.
Cheers, Nicolai
- Previous message: [llvm-dev] The semantics of nonnull attribute
- Next message: [llvm-dev] The semantics of nonnull attribute
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]