mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Memory Dependence Analysis (not mem-dep test) take advantage of "invariant.load" metadata.
The "invariant.load" metadata indicates the memory unit being accessed is immutable. A load annotated with this metadata can be moved across any store. As I am not sure if it is legal to move such loads across barrier/fence, this change dose not allow such transformation. rdar://11311484 Thank Arnold for code review. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176562 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -58,6 +58,11 @@ LLVMContext::LLVMContext() : pImpl(new LLVMContextImpl(*this)) {
|
||||
unsigned TBAAStructID = getMDKindID("tbaa.struct");
|
||||
assert(TBAAStructID == MD_tbaa_struct && "tbaa.struct kind id drifted");
|
||||
(void)TBAAStructID;
|
||||
|
||||
// Create the 'invariant.load' metadata kind.
|
||||
unsigned InvariantLdId = getMDKindID("invariant.load");
|
||||
assert(InvariantLdId == MD_invariant_load && "invariant.load kind id drifted");
|
||||
(void)InvariantLdId;
|
||||
}
|
||||
LLVMContext::~LLVMContext() { delete pImpl; }
|
||||
|
||||
|
Reference in New Issue
Block a user