1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
llvm-mirror/include/llvm/Bitcode
Sanjoy Das 2d08e46e8b [IR] Introduce a dereferenceable_or_null(N) attribute.
Summary:
If a pointer is marked as dereferenceable_or_null(N), LLVM assumes it
is either `null` or `dereferenceable(N)` or both.  This change only
introduces the attribute and adds a token test case for the `llvm-as`
/ `llvm-dis`.  It does not hook up other parts of the optimizer to
actually exploit the attribute -- those changes will come later.

For pointers in address space 0, `dereferenceable(N)` is now exactly
equivalent to `dereferenceable_or_null(N)` && `nonnull`.  For other
address spaces, `dereferenceable(N)` is potentially weaker than
`dereferenceable_or_null(N)` && `nonnull` (since we could have a null
`dereferenceable(N)` pointer).

The motivating case for this change is Java (and other managed
languages), where pointers are either `null` or dereferenceable up to
some usually known-at-compile-time constant offset.

Reviewers: rafael, hfinkel

Reviewed By: hfinkel

Subscribers: nicholas, llvm-commits

Differential Revision: http://reviews.llvm.org/D8650

llvm-svn: 235132
2015-04-16 20:29:50 +00:00
..
BitCodes.h Remove empty non-virtual destructors or mark them =default when non-public 2015-04-11 15:32:26 +00:00
BitcodeWriterPass.h uselistorder: Pull bit through BitcodeWriterPass 2015-04-15 00:34:24 +00:00
BitstreamReader.h Revert "Verify sizes when trying to read a VBR" 2015-04-15 11:10:17 +00:00
BitstreamWriter.h
LLVMBitCodes.h [IR] Introduce a dereferenceable_or_null(N) attribute. 2015-04-16 20:29:50 +00:00
ReaderWriter.h uselistorder: Pull the bit through WriteToBitcodFile() 2015-04-15 00:10:50 +00:00