[PATCH] D38403: [Polly][ScopBuilder] Introduce -polly-stmt-granularity=scalar-indep option.
Siddharth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 4 07:13:58 PDT 2017
bollu added inline comments.
================
Comment at: lib/Analysis/ScopBuilder.cpp:711
+/// of two such instructions.
+static bool isOrderedInstruction(Instruction *Inst) {
+ return Inst->mayHaveSideEffects() || Inst->mayReadOrWriteMemory();
----------------
Just to clarify: An Instruction `I` is ordered if there exists an instruction `J` such that `I; J != J; I`, correct?
================
Comment at: lib/Analysis/ScopBuilder.cpp:739
+/// Join the PHI write epilogue if necessary.
+static void joinEpilogue(EquivalenceClasses<Instruction *> &UnionFind,
+ ArrayRef<Instruction *> ModeledInsts, BasicBlock *BB) {
----------------
Consider `joinPHIWritesToEpilogue`?
================
Comment at: lib/Analysis/ScopBuilder.cpp:799
+/// 'ordered instruction'.
+static void joinEpilogueLast(EquivalenceClasses<Instruction *> &UnionFind,
+ ArrayRef<Instruction *> ModeledInsts) {
----------------
Consider a name such as `joinAllAfterEpilogue`? I feel that this name carries the intent a little better.
================
Comment at: test/ScopInfo/granularity_scalar-indep_noepilogue.ll:3
+;
+; This case has no explicit epilogie for PHI writes because it would
+; have a scalar dependency to the previous statement.
----------------
Nit: `epilogie` -> `epilogue`
https://reviews.llvm.org/D38403
More information about the llvm-commits
mailing list