RFC: Enable vectorization of call instructions in the loop vectorizer
Renato Golin
renato.golin at linaro.org
Thu Dec 19 05:25:46 PST 2013
Hi James,
Comments below.
/// getLibFunc - Search for a particular function name. If it is one of
the
/// known library functions, return true and set F to the corresponding
value.
- bool getLibFunc(StringRef funcName, LibFunc::Func &F) const;
+ virtual bool getLibFunc(StringRef funcName, LibFunc::Func &F) const;
Are you going to use this for non-Lib calls, too? If so, I suggest changing
the names of this and related calls.
+ virtual Function *getScalarized(LibFunc::Func F) {
+ return NULL;
+ }
+ virtual Function *getVectorized(LibFunc::Func F, unsigned VF) {
+ return NULL;
+ }
These could be merged into: getFunction(Func, VF)
and if VF == 1, you return the scalarized one. Other calls in the
vectorizer do that.
+ virtual CallInst *getVectorizedCall(LibFunc::Func F, unsigned VF,
+ ArrayRef<Value*> Args) {
+ return NULL;
+ }
and getFunctionCall(...)
with the same behaviour about VF above.
AFACT, the scalar and vector parts of the vectorizer are well defined, and
you don't need to specify it explicitly.
cheers,
--renato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131219/022074f7/attachment.html>
More information about the llvm-commits
mailing list