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

2020-04-07 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a comment. In D77484#1965976 , @tejohnson wrote: > In D77484#1965629 , @wenlei wrote: > > > > Ok then it does sound like these could be handled on a per-function > > > basis, similar to how

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

2020-04-06 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D77484#1965629 , @wenlei wrote: > > 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

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

2020-04-06 Thread Wenlei He via Phabricator via cfe-commits
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.

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

2020-04-06 Thread George Rimar via Phabricator via cfe-commits
grimar added inline comments. Comment at: lld/ELF/Options.td:491 HelpText<"Sample profile file path">; +def lto_vector_library: J<"lto-vector-library=">, + HelpText<"Vector functions library">; You need to update the documentation either

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

2020-04-05 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added inline comments. Comment at: lld/ELF/Config.h:132 callGraphProfile; + llvm::TargetLibraryInfoImpl::VectorLibrary VectLib; bool allowMultipleDefinition; We name variables after their corresponding command line flags, so this should be

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

2020-04-05 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D77484#1962667 , @wenlei wrote: > > Linking against two vectlibs may cause name conflicts or other issues. > > Of all three supported match libraries, all functions from Accelerate are > prefixed with `v`; all MASS library

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

2020-04-05 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a comment. > Linking against two vectlibs may cause name conflicts or other issues. Of all three supported match libraries, all functions from Accelerate are prefixed with `v`; all MASS library functions are suffixed with `_massv`; and all SVML functions are prefixed with

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

2020-04-05 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D77484#1962581 , @hoyFB wrote: > In D77484#1962445 , @tejohnson wrote: > > > We're trying to move towards encoding all of this in the IR. And in fact, I > > recently implemented a

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

2020-04-05 Thread Hongtao Yu via Phabricator via cfe-commits
hoyFB added a comment. In D77484#1962445 , @tejohnson wrote: > We're trying to move towards encoding all of this in the IR. And in fact, I > recently implemented a series of patches to make the TLI to be built > per-function, and along with some patches

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

2020-04-05 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a comment. In D77484#1962445 , @tejohnson wrote: > We're trying to move towards encoding all of this in the IR. And in fact, I > recently implemented a series of patches to make the TLI to be built > per-function, and along with some

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

2020-04-05 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a subscriber: gchatelet. tejohnson added a comment. We're trying to move towards encoding all of this in the IR. And in fact, I recently implemented a series of patches to make the TLI to be built per-function, and along with some patches from @gchatelet to encode -fno-builtin*

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

2020-04-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Added usual lld and LTO side reviewers. I am just a bit worried that option name changes like this patch and D77231 could accidentally slip through if I did not react in time... Repository: rG LLVM Github Monorepo CHANGES SINCE

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

2020-04-04 Thread Wenlei He via Phabricator via cfe-commits
wenlei created this revision. wenlei added reviewers: hoyFB, spatel. Herald added subscribers: cfe-commits, dang, dexonsmith, steven_wu, MaskRay, hiraditya, arichardson, inglorion, emaste. Herald added a reviewer: espindola. Herald added a project: clang. -fveclib switch not propagated to LTO