[PATCH] D43064: [LV] Fix analyzeInterleaving when -pass-remarks enabled

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 8 11:46:29 PST 2018


mtrofin added inline comments.


================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:5931-5932
+      // in the case of atomic loads. We shouldn't see those here, canVectorizeMemory()
+      // should have returned false - except for the case we asked for optimization
+      // remarks.
+      if (isInterleaved(A) || (A->mayReadFromMemory() != B->mayReadFromMemory())
----------------
hsaito wrote:
> The root-cause of this problem is the fact that Interleaved Access Analysis is invoked as part of legality check ---- most likely because the original developer did not want to pass one extra arg to CostModel, etc., decided to keep InterleaveInfo in Legality class, and reviewers did not object to it. I'm currently working on a change set to address this architectural problem (i.e., optimization/cost model related work done in legal) by moving interleave access analysis outside of Legality.
> 
> Having said that, tightening "same kind of memory operation" check is a good thing to have even after the above mentioned refactoring is done.
Thank you for the insight!


Repository:
  rL LLVM

https://reviews.llvm.org/D43064





More information about the llvm-commits mailing list