[Refactor] Have getNonLocalPointerDependency take the query instruction
authorPhilip Reames <listmail@philipreames.com>
Fri, 9 Jan 2015 00:04:22 +0000 (00:04 +0000)
committerPhilip Reames <listmail@philipreames.com>
Fri, 9 Jan 2015 00:04:22 +0000 (00:04 +0000)
commitdba2d125782871a8a9da4bb9b047169de607c865
tree4ef8368e78c780629ffb630a9e599a1a7c811700
parentcce3a8acec071779dc5350e652392ccfc2a91b87
[Refactor] Have getNonLocalPointerDependency take the query instruction

Previously, MemoryDependenceAnalysis::getNonLocalPointerDependency was taking a list of properties about the instruction being queried. Since I'm about to need one more property to be passed down through the infrastructure - I need to know a query instruction is non-volatile in an inner helper - fix the interface once and for all.

I also added some assertions and behaviour clarifications around volatile and ordered field accesses. At the moment, this is mostly to document expected behaviour. The only non-standard instructions which can currently reach this are atomic, but unordered, loads and stores. Neither ordered or volatile accesses can reach here.

The call in GVN is protected by an isSimple check when it first considers the load. The calls in MemDepPrinter are protected by isUnordered checks. Both utilities also check isVolatile for loads and stores.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225481 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/MemoryDependenceAnalysis.h
lib/Analysis/MemDepPrinter.cpp
lib/Analysis/MemoryDependenceAnalysis.cpp
lib/Transforms/Scalar/GVN.cpp