[PATCH] [Refactor] Have getNonLocalPointerDependency take the query instruction

Philip Reames listmail at philipreames.com
Thu Jan 8 15:21:02 PST 2015


Hi sanjoy,

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 current 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.  

Review wise, I'm just looking for style comments and a second look to make sure I didn't typo something and accidentally change behaviour.

http://reviews.llvm.org/D6886

Files:
  include/llvm/Analysis/MemoryDependenceAnalysis.h
  lib/Analysis/MemDepPrinter.cpp
  lib/Analysis/MemoryDependenceAnalysis.cpp
  lib/Transforms/Scalar/GVN.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6886.17915.patch
Type: text/x-patch
Size: 5904 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150108/9cca510d/attachment.bin>


More information about the llvm-commits mailing list