search for: d69477

Displaying 7 results from an estimated 7 matches for "d69477".

Did you mean: 369477
2020 Feb 18
8
The semantics of nonnull attribute
...son)` whereas the optimized one is `f(nonnull poison)`. `f(nonnull poison)` should be UB because `f(nonnull null)` is UB. So, the transformation introduced UB. This optimization is correct if both `f(nonnull null)` and `f(nonnull poison)` are equivalent to `f(poison)`. 3. https://reviews.llvm.org/D69477 f(nonnull ptr); use(ptr); => llvm.assume(ptr != null); use(ptr); f(nonnull ptr); If f(nonnull null) is f(poison), this is incorrect. If ptr was null, the added llvm.assume(ptr != null) raises UB whereas the source may not raise UB at all. (e.g. assume that f() was an empty function) If f(nonnu...
2020 Feb 18
2
The semantics of nonnull attribute
...`f(nonnull poison)`. > `f(nonnull poison)` should be UB because `f(nonnull null)` is UB. So, the > transformation introduced UB. > This optimization is correct if both `f(nonnull null)` and `f(nonnull > poison)` are equivalent to `f(poison)`. > > > 3. https://reviews.llvm.org/D69477 > > f(nonnull ptr); > use(ptr); > => > llvm.assume(ptr != null); > use(ptr); > f(nonnull ptr); > > If f(nonnull null) is f(poison), this is incorrect. If ptr was null, the > added llvm.assume(ptr != null) raises UB whereas the source may not raise > UB at all....
2019 Dec 16
7
[RFC] How to manifest information in LLVM-IR, or, revisiting llvm.assume
...f which is a `ptrtoint` and therefore not really optimizer friendly. Dereferenceability, is even scarier. Thus, we are currently limited to (almost) boolean information when we want to manifest information in the IR (which happens due to inlining or code motion, see https://reviews.llvm.org/D69477 for an example). B) The one-use checks. Various pattern matching passes check the number of uses of a value. However, while `llvm.assume` is eventually eliminated by the backend it will still increase the use count of the operand. I doubt we are able to not increase the use count at all (a...
2020 Feb 18
3
The semantics of nonnull attribute
...null poison)` should be UB because `f(nonnull null)` is UB. > > So, the transformation introduced UB. > > This optimization is correct if both `f(nonnull null)` and > > `f(nonnull poison)` are equivalent to `f(poison)`. > > > > > > 3. https://reviews.llvm.org/D69477 > > > > f(nonnull ptr); > > use(ptr); > > => > > llvm.assume(ptr != null); > > use(ptr); > > f(nonnull ptr); > > > > If f(nonnull null) is f(poison), this is incorrect. If ptr was null, > > the added llvm.assume(ptr != null) raises U...
2019 Dec 18
2
[RFC] How to manifest information in LLVM-IR, or, revisiting llvm.assume
...t really > > optimizer friendly. Dereferenceability, is even scarier. Thus, we are > > currently limited to (almost) boolean information when we want to > > manifest information in the IR (which happens due to inlining or code > > motion, see https://reviews.llvm.org/D69477 for an example). > > > > B) The one-use checks. > > Various pattern matching passes check the number of uses of a value. > > However, while `llvm.assume` is eventually eliminated by the backend > > it will still increase the use count of the operand. I doubt we a...
2020 Feb 18
8
The semantics of nonnull attribute
...because `f(nonnull null)` is UB. > > > So, the transformation introduced UB. > > > This optimization is correct if both `f(nonnull null)` and > > > `f(nonnull poison)` are equivalent to `f(poison)`. > > > > > > > > > 3. https://reviews.llvm.org/D69477 > > > > > > f(nonnull ptr); > > > use(ptr); > > > => > > > llvm.assume(ptr != null); > > > use(ptr); > > > f(nonnull ptr); > > > > > > If f(nonnull null) is f(poison), this is incorrect. If ptr was null, > > &...
2019 Dec 18
2
[RFC] How to manifest information in LLVM-IR, or, revisiting llvm.assume
...imizer friendly. Dereferenceability, is even scarier. Thus, we are > >>> currently limited to (almost) boolean information when we want to > >>> manifest information in the IR (which happens due to inlining or code > >>> motion, see https://reviews.llvm.org/D69477 for an example). > >>> > >>> B) The one-use checks. > >>> Various pattern matching passes check the number of uses of a value. > >>> However, while `llvm.assume` is eventually eliminated by the backend > >>> it will still increase th...