search for: offer_fn

Displaying 6 results from an estimated 6 matches for "offer_fn".

2012 Jun 05
3
[LLVMdev] alloc_size metadata
...c_size_fn and offset_fn are functions that return either i32/i64 > depending on the platform, and they must have the same number of > arguments (not necessarily the same as the as allocation function). > The parameters are given in the metadata as well. > To accommodate the common case, offer_fn can be null, meaning it is a > zero offset. > > The usage would be something like this: > > %r = call i8* @my_realloc(i32* %ptr, i32 %n), !alloc_size !0 > !0 = metadata !{ i32 (i32)* @size, null, i32 %n } suppose the size is %n+4. Then in the function you have to compute %s =...
2012 Jun 04
0
[LLVMdev] alloc_size metadata
...eters* } alloc_size_fn and offset_fn are functions that return either i32/i64 depending on the platform, and they must have the same number of arguments (not necessarily the same as the as allocation function). The parameters are given in the metadata as well. To accommodate the common case, offer_fn can be null, meaning it is a zero offset. The usage would be something like this: %r = call i8* @my_realloc(i32* %ptr, i32 %n), !alloc_size !0 !0 = metadata !{ i32 (i32)* @size, null, i32 %n } Even if my_realloc() gets inlined later, the metadata can still be applied to the returned value (s...
2012 Jun 05
0
[LLVMdev] alloc_size metadata
...fset_fn are functions that return either i32/i64 >> depending on the platform, and they must have the same number of >> arguments (not necessarily the same as the as allocation function). >> The parameters are given in the metadata as well. >> To accommodate the common case, offer_fn can be null, meaning it is a >> zero offset. >> >> The usage would be something like this: >> >> %r = call i8* @my_realloc(i32* %ptr, i32 %n), !alloc_size !0 >> !0 = metadata !{ i32 (i32)* @size, null, i32 %n } > > suppose the size is %n+4. Then in the fun...
2012 Jun 05
2
[LLVMdev] alloc_size metadata
..._fn and offset_fn are functions that return either i32/i64 > depending on the platform, and they must have the same number of > arguments (not necessarily the same as the as allocation function). > The parameters are given in the metadata as well. > To accommodate the common case, offer_fn can be null, meaning it is > a zero offset. > > The usage would be something like this: > > %r = call i8* @my_realloc(i32* %ptr, i32 %n), !alloc_size !0 > !0 = metadata !{ i32 (i32)* @size, null, i32 %n } > > Even if my_realloc() gets inlined later, the metadata can still...
2012 Jun 05
0
[LLVMdev] alloc_size metadata
...fset_fn are functions that return either i32/i64 >> depending on the platform, and they must have the same number of >> arguments (not necessarily the same as the as allocation function). >> The parameters are given in the metadata as well. >> To accommodate the common case, offer_fn can be null, meaning it is >> a zero offset. >> >> The usage would be something like this: >> >> %r = call i8* @my_realloc(i32* %ptr, i32 %n), !alloc_size !0 >> !0 = metadata !{ i32 (i32)* @size, null, i32 %n } >> >> Even if my_realloc() gets inlined...
2012 Jun 02
5
[LLVMdev] alloc_size metadata
Hi Hal, On 02/06/12 14:28, Hal Finkel wrote: > On Sat, 02 Jun 2012 09:56:30 +0200 > Duncan Sands<baldrick at free.fr> wrote: > >> Hi Hal, >> >>> To do bounds checking you need two things: First you need to know >>> the bounds (this requires tracking calls to allocation functions), >>> and then you need to look at memory accesses. My guess is