search for: builtin_object_size

Displaying 3 results from an estimated 3 matches for "builtin_object_size".

Did you mean: __builtin_object_size
2017 Jan 02
2
RFC: Allowing @llvm.objectsize to be more conservative with null.
Hi George, Have you considered changing our existing behavior to match GCC's builtin_object_size instead of adding a new parameter? That may be simpler overall. There's also a clear upgrade strategy -- fold every old style call to "<min> ? 0 : 1". You probably already know this, but GCC folds builtin_object_size(0, 0) to -1 and builtin_object_size(0, 2) to 0. We'll h...
2017 Jan 02
2
RFC: Allowing @llvm.objectsize to be more conservative with null.
Hi George, On Mon, Jan 2, 2017 at 10:41 AM, George Burgess IV <george.burgess.iv at gmail.com> wrote: > Thanks for the comments! > >> Have you considered changing our existing behavior to match GCC's >> builtin_object_size instead of adding a new parameter > > Yup! My issue with turning `i1 %min` into `i8 %flags` is that > __builtin_object_size would get lowered like: > > __builtin_object_size(p, 0) -> @llvm.objectsize(i8* %p, i8 2) > __builtin_object_size(p, 1) -> @llvm.objectsize(i8* %p, i8...
2016 Dec 21
2
RFC: Allowing @llvm.objectsize to be more conservative with null.
tl;dr: We'd like to add a bit to @llvm.objectsize to make it optionally be conservative when it's handed a null pointer. Happy Wednesday! We're trying to fix PR23277, which is a bug about how clang+LLVM treat __builtin_object_size when it's given a null pointer. For compatibility with GCC, clang would like to be able to hand back a conservative result (e.g. (size_t)-1), but the LLVM intrinsic that clang lowers __builtin_object_size(p, N) to, @llvm.objectsize, only hands back 0 when given a null pointer. Because it's...