Skip to content

clang 14 supports target_clones

See https://releases.llvm.org/14.0.0/tools/clang/docs/AttributeReference.html#target-clones

Examples :

Asking explicitly @ssnyder on this.

It seem that clang prefers this on declarations (above doc), while GCC prefers this on definitions. So to use it in both we need to apply to a declaration that is also a definitions.

The inline/header methods in bitscan are fine. For the other 2 cases I apply it to an Impl method in an anonymous namespace in the relevant .cxx where I places the bodies we want to be vectorized.

Edited by Christos Anastopoulos

Merge request reports