forked from M-Labs/artiq
1
0
Fork 0

llvm_ir_generator: use !{→unconditionally.}invariant.load metadata.

This helps LICM, among other things.
This commit is contained in:
whitequark 2016-11-12 04:08:58 +00:00
parent 8b6418c604
commit d3ee858d16
1 changed files with 3 additions and 3 deletions

View File

@ -651,7 +651,7 @@ class LLVMIRGenerator:
llptr = self.llbuilder.gep(llenv, [self.llindex(0), self.llindex(outer_index)],
inbounds=True)
llouterenv = self.llbuilder.load(llptr)
llouterenv.set_metadata('invariant.load', self.empty_metadata)
llouterenv.set_metadata('unconditionally.invariant.load', self.empty_metadata)
llouterenv.set_metadata('nonnull', self.empty_metadata)
return self.llptr_to_var(llouterenv, env_ty.params["$outer"], var_name)
@ -795,7 +795,7 @@ class LLVMIRGenerator:
inbounds=True, name="ptr.{}".format(insn.name))
llvalue = self.llbuilder.load(llptr, name="val.{}".format(insn.name))
if types.is_instance(typ) and attr in typ.constant_attributes:
llvalue.set_metadata('invariant.load', self.empty_metadata)
llvalue.set_metadata('unconditionally.invariant.load', self.empty_metadata)
if isinstance(llvalue.type, ll.PointerType):
self.mark_dereferenceable(llvalue)
return llvalue
@ -1050,7 +1050,7 @@ class LLVMIRGenerator:
llptr = self.llbuilder.gep(llenv, [self.llindex(0), self.llindex(outer_index)],
inbounds=True)
llouterenv = self.llbuilder.load(llptr)
llouterenv.set_metadata('invariant.load', self.empty_metadata)
llouterenv.set_metadata('unconditionally.invariant.load', self.empty_metadata)
llouterenv.set_metadata('nonnull', self.empty_metadata)
return self.llptr_to_var(llouterenv, env_ty.params["$outer"], var_name)
else: