llvm_ir_generator: change !{→unconditionally_}dereferenceable.

Since LLVM 3.8, !dereferenceable is weaker, so we introduce
!unconditionally_dereferenceable (http://reviews.llvm.org/D18738)
to regain its functionality.
This commit is contained in:
whitequark 2016-04-03 10:53:03 +00:00
parent 72b952e850
commit ad83b092fa

View File

@ -654,7 +654,7 @@ class LLVMIRGenerator:
assert isinstance(load, ll.LoadInstr) and isinstance(load.type, ll.PointerType)
pointee_size = load.type.pointee.get_abi_size(self.lldatalayout, context=self.llcontext)
metadata = self.llmodule.add_metadata([ll.Constant(lli64, pointee_size)])
load.set_metadata('dereferenceable', metadata)
load.set_metadata('unconditionally_dereferenceable', metadata)
def process_GetLocal(self, insn):
env = insn.environment()