[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)
commit567feb98f0941b455420dc165283bc37a40553b8
tree4cb2c8cdcedcb14047c0839b4bad407187e42fb6
parentbfbc3690bb6673ecb518ec1310b6a05c859f8618
[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.

llvm-svn: 225481
llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h
llvm/lib/Analysis/MemDepPrinter.cpp
llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
llvm/lib/Transforms/Scalar/GVN.cpp