[PATCH] Handling store to invariant address in LAA
Adam Nemet
anemet at apple.com
Mon Mar 30 13:27:14 PDT 2015
Please update LAA::print to note if this variable is set and add a test with -analyze in tests/Analysis/LoopAccessAnalysis.
REPOSITORY
rL LLVM
================
Comment at: include/llvm/Analysis/LoopAccessAnalysis.h:432-433
@@ +431,4 @@
+ /// \brief Checks existence of store to invariant address inside loop.
+ /// If the loop has any store to invariant address, then it return true.
+ /// else returns false.
+ bool hasStoreToLoopInvariantAddress() const {
----------------
it returns true, else returns false. ('s' at the end of return and one sentence or start new sentence with upper case)
================
Comment at: include/llvm/Analysis/LoopAccessAnalysis.h:475-477
@@ -467,1 +474,5 @@
+ /// \brief Indicator for storing to uniform addresses.
+ /// If a loop has write to a loop invariant address then it should be true.
+ bool StoreToLoopInvariantAddress;
+
----------------
Please initialize to false in the ctor.
================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:4010-4012
@@ -4009,1 +4009,5 @@
+ if (LAI->hasStoreToLoopInvariantAddress()) {
+ emitAnalysis(VectorizationReport()
+ << "write to a loop invariant address could not be vectorized");
+ DEBUG(dbgs() << "LV: We don't allow storing to uniform addresses\n");
----------------
I think that clang-format likes to indent these further, please check with clang-format-diff.py.
http://reviews.llvm.org/D8653
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list