[PATCH] D77484: [Vector] Pass VectLib to LTO backend so TLI build correct vector function list

Wenlei He via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 6 16:22:10 PDT 2020


wenlei added a comment.

> Ok then it does sound like these could be handled on a per-function basis, similar to how -fno-builtin* are handled. I.e. a function attribute to indicate the veclib, which would then be naturally preserved during LTO even after merging/importing across modules. Similar to how -fno-builtin* are handled, these would need to be examined when inlining (see the new TargetLibraryInfo::areInlineCompatible). Presumably we would want to block inlining between functions with different veclib attributes in the LTO backends.

@tejohnson, we could do that. But then on the other hand, technically almost everything for module or whole program can be passed as a function attribute, and yet we have switches passed to backend for many of those things. Wondering what's the convention or rule (if there's one) we want to follow? Specifically, if we only use function attributes for stuff that's indeed going to be different between functions, then vectlib isn't in that category; or if we use function attributes for the greatest flexibility whenever we can, then many other things should be function attributes too (though it's essentially duplication in IR, and probably not the most efficient).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77484/new/

https://reviews.llvm.org/D77484





More information about the cfe-commits mailing list