search for: iterate_my_sect

Displaying 2 results from an estimated 2 matches for "iterate_my_sect".

2014 Dec 08
3
[LLVMdev] Incorrect loop optimization when building the Linux kernel
...ion that is compelling. Joerg suggested adding 'weak' as a workaround, but it doesn't seem particularly compelling to me: extern void *__start_my_ptr_section[]; extern void *__end_my_ptr_section[] __attribute__((weak)); // I'm assuming Joerg implied the attribute goes here... void iterate_my_section() { for (void **i = __start_my_ptr_section; i != __end_my_ptr_section; i++) { use_ptr(*i); } } LLVM has had the concept of "appending" globals for a very long time, but it doesn't have an actual object file lowering. It also provides no mechanism for iteration, because it...
2014 Dec 08
4
[LLVMdev] Incorrect loop optimization when building the Linux kernel
> It's difficult to say without a full example, but I'm very suspicious > of those global declarations. I think the compiler would be entirely > justified in assuming you could *never* get from __start_builtin_fw to > __end_builtin_fw, let alone on the first iteration: they're distinct > array objects and by definition (within C99) can't overlap. I think this should