Invariant start/end intrinsics overloaded for address space
authorAnna Thomas <anna@azul.com>
Thu, 21 Jul 2016 18:41:44 +0000 (18:41 +0000)
committerAnna Thomas <anna@azul.com>
Thu, 21 Jul 2016 18:41:44 +0000 (18:41 +0000)
commit29b24dfe44f29d6adbcc84e725aa7836fc0d4831
treea0e578e891c5b585c0c2fd6390bed97718e27a65
parent3c944ec81ac4716cba307379929832aad333ba3f
Invariant start/end intrinsics overloaded for address space

Summary:
The llvm.invariant.start and llvm.invariant.end intrinsics currently
support specifying invariant memory objects only in the default address space.

With this change, these intrinsics are overloaded for any adddress space for memory objects
and we can use these llvm invariant intrinsics in non-default address spaces.

Example: llvm.invariant.start.p1i8(i64 4, i8 addrspace(1)* %ptr)

This overloaded intrinsic is needed for representing final or invariant memory in managed languages.

Reviewers: tstellarAMD, reames, apilipenko

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D22519

llvm-svn: 276316
llvm/docs/LangRef.rst
llvm/include/llvm/IR/Intrinsics.td
llvm/lib/IR/AutoUpgrade.cpp
llvm/test/Assembler/auto_upgrade_intrinsics.ll
llvm/test/CodeGen/AMDGPU/promote-alloca-invariant-markers.ll
llvm/test/Feature/memorymarkers.ll
llvm/test/Transforms/GlobalOpt/invariant-nodatalayout.ll
llvm/test/Transforms/GlobalOpt/invariant.ll
llvm/test/Transforms/InstCombine/invariant.ll