[PATCH] D10161: [SCEV][LoopVectorize] Allow ScalarEvolution to make assumptions about overflows

Renato Golin renato.golin at linaro.org
Mon Jul 20 06:53:20 PDT 2015

rengolin added inline comments.

Comment at: lib/Analysis/LoopAccessAnalysis.cpp:122
@@ -121,1 +121,3 @@
+const SCEV *llvm::rewriteSCEV(ScalarEvolution *SE,
+                              const ValueToValueMap &PtrToStride, Value *Ptr,
Why are you using the llvm namespace here?

Shouldn't these functions be static?

Comment at: lib/Analysis/LoopAccessAnalysis.cpp:127
@@ +126,3 @@
+  const SCEV *Ret = replaceSymbolicStrideSCEV(SE, PtrToStride, Ptr, OrigPtr);
+  Ret = rewriteSCEVWithAssumptions(Ret, L, SE, Preds);
replaceSymbolicStrideSCEV is defined on the header, as namespace llvm, static, and leads to confusions like these.

If you need it in more than one place, it shouldn't be static and it should be implemented in its own cpp file. If these are local only, they should be static or in anonymous namespaces.


More information about the llvm-commits mailing list