[PATCH] D22295: Introduce !splitpoint metadata and GlobalSplit pass.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 15 12:20:55 PDT 2016


pcc added a comment.

Here's the extension I had in mind: allow the "inbounds" keyword to appear before any index operand of a getelementptr constant. That keyword causes any derived pointer outside of the bounds of the element referred to by that index, other than the pointer one past the end of the pointer, to be treated as a poison value. For example:

`i8** getelementptr inbounds ({[4 x i8*], [4 x i8*]}, {[4 x i8*], [4 x i8*]}* @_ZTVfoo, i32 0, inbounds i32 1, i32 2)`

This is a reference to the address point of the second element of `_ZTVfoo`, a virtual table group with two virtual tables, such that any pointer extending beyond the bounds of the second virtual table is a poison value.

Please let me know what you think.


https://reviews.llvm.org/D22295





More information about the llvm-commits mailing list