forked from M-Labs/artiq
1
0
Fork 0

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 committed by Sebastien Bourdeauducq
parent 75252ca5a4
commit d4f1614a23
1 changed files with 1 additions and 1 deletions

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()