Hi all, I am trying to insert code which before pointer dereferences would check if the pointer dereference is valid. As this might mean a lot of overhead, I was wondering where would be the best place to insert it so that the overhead can be opitimized away. Especially, I was wondering if any optimization would hoist the check outside loops. Can I inline it and hope some code will get hoisted ? Or do I have to do it explicitly ? The check is likely to be a function call that checks the pointer values against some bounds.
Ideas, other pointers would be great Shrey