[PATCH] [SCEV][LoopVectorize] Allow ScalarEvolution to make assumptions about overflows
hfinkel at anl.gov
hfinkel at anl.gov
Mon Jun 22 19:49:42 PDT 2015
Thanks for working on this! cc'ing Andy in case he has an opinion regarding the general approach.
================
Comment at: include/llvm/Analysis/ScalarEvolution.h:613
@@ +612,3 @@
+
+ virtual const SCEV *getZeroExtendExpr(const SCEV *Op, Type *Ty);
+ virtual const SCEV *getSignExtendExpr(const SCEV *Op, Type *Ty);
----------------
Are these two methods special in theory, in this context, or in the future would overrides for more methods be useful?
================
Comment at: include/llvm/Analysis/ScalarEvolution.h:990
@@ +989,3 @@
+ /// make and track assumptions. The rationale behind this is that most
+ /// users of ScalarEvolution need a chrec returned as a result in order
+ /// to perform some other action.
----------------
Don't use 'chrec' here without defining it.
================
Comment at: include/llvm/Analysis/ScalarEvolution.h:1041
@@ +1040,3 @@
+ public:
+ void setAnalyzedLoop(const Loop *L) {AnalyzedLoop = L;}
+
----------------
You should clear the cache here?
================
Comment at: lib/Analysis/ScalarEvolution.cpp:8816
@@ +8815,3 @@
+ }
+ // FIXME: Some of these checks can be redundant. We should remove them here.
+ // FIXME: The number of overflow checks is not a good metric. A lot of
----------------
Given that the SCEVs are uniqued, you could at least eliminate those that are structurally identical easily.
================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:2242
@@ +2241,3 @@
+ BasicBlock *CheckBlock =
+ LastBypassBlock->splitBasicBlock(FirstOFCheckInst, "vector.overflowcheck");
+ if (ParentLoop)
----------------
Line too long?
http://reviews.llvm.org/D10161
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list