On Thu, Jul 30, 2020 at 10:24:50AM -0500, Steven Munroe wrote:
> For targets which do support the target attribute, each
> function should be marked with the right set of options
> before streaming it,
Looking at the source (opencv 4.3.0) I can not find any usage of
__attribute__ ((target)) or #pragma ... optimization associated with ppc
specific code.
For LTO, gcc should use that attribute (well, the underlying behavior) for
all functions, essentially if one TU is compiled with
-mcpu=power8, then functions in there (unless they have other target
attributes already, then it would be slightly different) should get
behavior like with target ("cpu=power8"), similarly TUs that are compiled
with -mcpu=power9 should get target ("cpu=power9"), etc.
Now, the important question is e.g. if the backend disallows inlining
between those two target attributes or not.
The powerpc backend does implement rs6000_can_inline_p though.
So I guess the question is, in which function the error actually appears,
whether that one has been compiled with -mcpu=power9 or not, and whether
the vec_absd builtin call doesn't appear from something inlined into it.
Jakub