[PATCH] D13194: [Polly] Identify and hoist definitively invariant loads

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 26 15:17:17 PDT 2015


Meinersbur added a comment.

What's the motivational use case that cannot be handled by LICM?

Could you create a separate pass that modifies the ScopInfo, i.e. lib/Transform/HoistInvariantLoads.cpp

Michael


================
Comment at: include/polly/CodeGen/IslNodeBuilder.h:209
@@ +208,3 @@
+  /// Note that if the runtime context implies the condition C conditional
+  /// execution is not necessary.
+  Value *preloadInvariantLoad(const MemoryAccess &MA,
----------------
Grammar? I don't understand this sentence

================
Comment at: lib/Analysis/ScopInfo.cpp:1299
@@ +1298,3 @@
+    MemAccs.erase(MemAccsIt);
+  }
+
----------------
list::remove_if

================
Comment at: lib/Analysis/ScopInfo.cpp:2285
@@ +2284,3 @@
+
+    StmtIt = Stmts.erase(StmtIt);
+  }
----------------
Could you refactor removing a ScopStmt from a Scop into another function so it might be used by other code as well?

================
Comment at: lib/CodeGen/IslNodeBuilder.cpp:830
@@ +829,3 @@
+
+Value *IslNodeBuilder::preloadInvariantLoad(const MemoryAccess &MA,
+                                            isl_ast_build *Build,
----------------
Can you write a comment about how the CFG will look like?


http://reviews.llvm.org/D13194





More information about the llvm-commits mailing list