[PATCH] D29695: FunctionAttrs: Factor out a function for querying memory access of a specific copy of a function. NFC.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 13 13:50:41 PST 2017


pcc added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/FunctionAttrs.cpp:55
   FunctionModRefBehavior MRB = AAR.getModRefBehavior(&F);
   if (MRB == FMRB_DoesNotAccessMemory)
     // Already perfect!
----------------
tejohnson wrote:
> Why don't we want to check this in the callers of computeFunctionBodyMemoryAccess? Isn't it a strong guarantee?
Yes, we could (and that would let us simplify the caller in D29803 a little). I've uploaded a new patch that does that, and also simplifies the signature of computeFunctionBodyMemoryAccess a little by removing the SCCNodeSet, as we currently have no plans to call that function from an SCC pass.


https://reviews.llvm.org/D29695





More information about the llvm-commits mailing list