[PATCH] D15307: [Polly] ScopInfo: Harmonize the different ARRAY_KINDs
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 10 02:09:50 PST 2015
Meinersbur added inline comments.
================
Comment at: include/polly/ScopInfo.h:312
@@ -203,3 +311,3 @@
/// normal scalar array modeling.
- bool isPHI() const { return Kind == KIND_PHI; };
+ bool isPHI() const { return Kind == MK_PHI; };
----------------
Rename to hasKindPHI() for consistency with MemoryAccess::hasKindPHI?
================
Comment at: include/polly/ScopInfo.h:603-604
@@ -581,3 +602,4 @@
ArrayRef<const SCEV *> Subscripts, ArrayRef<const SCEV *> Sizes,
- Value *AccessValue, AccessOrigin Origin, StringRef BaseName);
+ Value *AccessValue, ScopArrayInfo::MemoryKind Kind,
+ StringRef BaseName);
~MemoryAccess();
----------------
The style guide also seem to prefer consistency with existing styles. enum AccessType uses all caps values. We could change it as well (in a different patch).
================
Comment at: include/polly/ScopInfo.h:699
@@ -676,3 +698,3 @@
/// @brief Whether this is an access of an explicit load or store in the IR.
- bool isExplicit() const { return Origin == EXPLICIT; }
+ bool hasKindArray() const { return Kind == ScopArrayInfo::MK_Array; }
----------------
Personally, I'd prefer isArrayKind() or isArrayAccess(). No objective reasons.
http://reviews.llvm.org/D15307
More information about the llvm-commits
mailing list