This is the first in a sequence of exploratory patches using poison semantics
for uninitialized memory.
The new metadata, freeze_bits, is used to convert poison to a nondeterministic
value. Application of freeze_bits is limited load type instructions only.
See the following URL for the RFC discussion:
To facilitate in place migration of bitcode. A new versions of load and load
atomic are added; numeric identifiers 21 and 53. Auto migration is performed to
older loads by automatically applying freeze_bits metadata.
For convenience, an isFreezing parameter is add IRBuilder load functions. This
appends the attribute !freeze_bits to a load instruction. All IRBuilder
CreateLoad and CreateAlignedLoad function definitions default isFreezing to
true. This will allow front ends to transition to the new load instruction
semantics in a piecemeal fashion.
Load instruction version 1 semantics are supported using the legacy function
LLVMBuildLoad2, which will add attribute !freeze_bits for compatibility. Load
instruction version 2 semantics are supported using function
LLVMBuildLoad3. This commit marks LLVMBuildLoad2 for future deprecation.