[llvm-dev] [cfe-dev] [RFC] Expose user provided vector function for auto-vectorization.
Renato Golin via llvm-dev
llvm-dev at lists.llvm.org
Fri May 31 09:57:24 PDT 2019
On Fri, 31 May 2019 at 17:19, Francesco Petrogalli via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> TOPIC 2: metadata vs attribute
> Also, @Renato expressed concern that metadata might be dropped by optimization passes - would using attributes prevent that?
I think it would, thanks!
> TOPIC 3: "there are no special arguments / flags / status regs that are used / changed in the vector version that the compiler will have to "just know”
> I believe that this concern is raised by the problem of handling FP exceptions? If that’s the case, the compiler is not allowed to do any assumption on the vector function about that, and treat it with the same knowledge of any other function, depending on the visibility it has in the compilation unit. @Renato, does this answer your question?
So, if there are side-effects on the scalar version, there will be
also in the vector version? Unfortunately, this does not work in
practice by default (different units have different rules).
If we want to enforce this, it's up to the library implementation to
provide similar behaviour (either hide or create side-effects) and it
will be "library error" if they do not.
This seems a bit heavy handed, though...
More information about the llvm-dev