[PATCH] D12843: [Polly] Merge IRAccess into MemoryAccess

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 14 14:25:40 PDT 2015


Meinersbur added a comment.

Same background on why the order change might be useful:

buildAccessFunctions() collected the IRAccess of those accesses (Loads, stores, PHI reads and some scalar writes) in a Functions list and appended it to the main list afterwards. Other accesses might have already been added to the main list from processing other BBs and the current BB. IRAccess was a copyable class, but after MemoryAccess has been merged in, it is not any more (because of the reference-counted ISL members), so it cannot be temporarily added to another list.

Hence, I removed the temporary list and add MemoryAccess objects directly to the main list. The order in which they are added to the main list remains the same, but other accessed might be added in between while iterating over the the same BB. This happened in the changed test case loop_carry.ll with the PHI %k.05 which has an incoming edge from the same BB "bb"for which the write is added.


================
Comment at: include/polly/ScopInfo.h:96
@@ -95,3 +95,3 @@
 
-typedef std::vector<std::pair<IRAccess, Instruction *>> AccFuncSetType;
+typedef std::deque<MemoryAccess> AccFuncSetType;
 typedef std::map<const BasicBlock *, AccFuncSetType> AccFuncMapType;
----------------
Maybe use a std::forward_list instead?


http://reviews.llvm.org/D12843





More information about the llvm-commits mailing list