[PATCH] D77952: [TLI] Reduce copies for TLI and TLA

2020-04-12 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. Also, just a nit, because TLI is sometimes used to refer to the TargetLibraryInfo and occasionally to the TargetLibraryInfoImpl, and the latter is frequently referred to as TLII, could you change the description to say TLII or TLI Impl? Since this doesn't affect Targe

[PATCH] D77952: [TLI] Reduce copies for TLI and TLA

2020-04-12 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:689 // Set up the per-function pass manager. - FPM.add(new TargetLibraryInfoWrapperPass(*TLII)); + FPM.add(new TargetLibraryInfoWrapperPass(TargetTriple)); if (CodeGenOpts.VerifyModule) ---

[PATCH] D77952: [TLI] Reduce copies for TLI and TLA

2020-04-11 Thread Wenlei He via Phabricator via cfe-commits
wenlei updated this revision to Diff 256806. wenlei added a comment. address feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77952/new/ https://reviews.llvm.org/D77952 Files: clang/lib/CodeGen/BackendUtil.cpp llvm/include/llvm/Analysis/

[PATCH] D77952: [TLI] Reduce copies for TLI and TLA

2020-04-11 Thread Wenlei He via Phabricator via cfe-commits
wenlei marked an inline comment as done. wenlei added a comment. In D77952#1976336 , @tejohnson wrote: > Some parts of this are dependent on the patch that got reverted, but I have > some other questions below about the changes in BackendUtil.cpp. Thank

[PATCH] D77952: [TLI] Reduce copies for TLI and TLA

2020-04-11 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. Some parts of this are dependent on the patch that got reverted, but I have some other questions below about the changes in BackendUtil.cpp. Comment at: clang/lib/CodeGen/BackendUtil.cpp:689 // Set up the per-function pass manager. - FPM.add(new

[PATCH] D77952: [TLI] Reduce copies for TLI and TLA

2020-04-11 Thread Hongtao Yu via Phabricator via cfe-commits
hoyFB accepted this revision. hoyFB added inline comments. This revision is now accepted and ready to land. Comment at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:456 + TargetLibraryAnalysis(const Triple &T) + : BaselineInfoImpl(TargetLibraryInfoImpl(T)) {} + TargetLib

[PATCH] D77952: [TLI] Reduce copies for TLI and TLA

2020-04-11 Thread Hongtao Yu via Phabricator via cfe-commits
hoyFB added a comment. Thanks for the nice cleanup! Comment at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:456 + TargetLibraryAnalysis(const Triple &T) + : BaselineInfoImpl(TargetLibraryInfoImpl(T)) {} + TargetLibraryAnalysis(const TargetLibraryInfoImpl &BaselineInfo

[PATCH] D77952: [TLI] Reduce copies for TLI and TLA

2020-04-11 Thread Wenlei He via Phabricator via cfe-commits
wenlei created this revision. wenlei added reviewers: tejohnson, nikic, mehdi_amini, hoyFB. Herald added subscribers: cfe-commits, hiraditya. Herald added a project: clang. Minor changes to reduce the copying needed for TLI and TLA by using move whenever possible. Repository: rG LLVM Github M