[PATCH] Handling store to invariant address in LAA
Nema, Ashutosh
Ashutosh.Nema at amd.com
Tue Mar 31 20:19:09 PDT 2015
Thanks for review Adam. I'll incorporate your comments.
-----Original Message-----
From: Adam Nemet [mailto:anemet at apple.com]
Sent: Tuesday, March 31, 2015 1:57 AM
To: Nema, Ashutosh; hfinkel at anl.gov; listmail at philipreames.com; anemet at apple.com
Cc: llvm-commits at cs.uiuc.edu
Subject: Re: [PATCH] Handling store to invariant address in LAA
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