[PATCH] D95271: [CSSPGO] Passing the clang driver switch -fpseudo-probe-for-profiling to the linker.

2021-01-24 Thread Wenlei He via Phabricator via cfe-commits
wenlei accepted this revision. wenlei added a comment. This revision is now accepted and ready to land. lgtm, thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95271/new/ https://reviews.llvm.org/D95271

[PATCH] D95271: [CSSPGO] Passing the clang driver switch -fpseudo-probe-for-profiling to the linker.

2021-01-23 Thread Wenlei He via Phabricator via cfe-commits
wenlei added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:609 + // Pass an option to enable pseudo probe emission. + if (Args.hasArg(options::OPT_fpseudo_probe_for_profiling)) +CmdArgs.push_back("-plugin-opt=pseudo-probe-for-profiling");

[PATCH] D93747: Rename debug linkage name with -funique-internal-linkage-names

2021-01-20 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a subscriber: lxfind. wenlei added a comment. In D93747#2475852 , @dblaikie wrote: > In D93747#2470504 , @hoy wrote: > >> In D93747#2470387 , @dblaikie wrote:

[PATCH] D94333: [Inliner] Change inline remark format and update ReplayInlineAdvisor to use it

2021-01-19 Thread Wenlei He via Phabricator via cfe-commits
wenlei added inline comments. Comment at: llvm/lib/Analysis/InlineAdvisor.cpp:412 + + Remark << ";"; } modimo wrote: > wenlei wrote: > > nit: any special reason for adding this? doesn't seem consistent with other > > remarks we have. > If you grab the remark

[PATCH] D94333: [Inliner] Change inline remark format and update ReplayInlineAdvisor to use it

2021-01-12 Thread Wenlei He via Phabricator via cfe-commits
wenlei added inline comments. Comment at: llvm/lib/Analysis/InlineAdvisor.cpp:412 + + Remark << ";"; } nit: any special reason for adding this? doesn't seem consistent with other remarks we have. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D90507: Adding DWARF64 clang flag

2020-11-13 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a comment. This change covers non-LTO cases. For LTO, I think we would need to pass it from driver to LTO. Something like this: tools::addLTOOptions -> lld -> lto::Config (Config->TargetOptions->MCTargetOptions) ->LTO Backend. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D89066: [Coroutine][Sema] Only tighten the suspend call temp lifetime for final awaiter

2020-10-12 Thread Wenlei He via Phabricator via cfe-commits
wenlei accepted this revision. wenlei added a comment. This revision is now accepted and ready to land. LGTM. I think we can get this in first to address the fall out from https://reviews.llvm.org/D87470, while investigating ASAN failure. Comment at:

[PATCH] D86156: [BFI] Make BFI information available through loop passes inside LoopStandardAnalysisResults

2020-09-15 Thread Wenlei He via Phabricator via cfe-commits
wenlei added subscribers: asbirlea, modimo. wenlei added a comment. Just saw this. Thanks @Alina Sbirlea for fixing the tests, much appreciated! On 9/15/20, 6:44 PM, "Nico Weber via Phabricator" wrote: thakis added a comment. Looks like this breaks tests:

[PATCH] D86156: [BFI] Make BFI information available through loop passes inside LoopStandardAnalysisResults

2020-09-15 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a comment. Committed on behalf of @modimo. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86156/new/ https://reviews.llvm.org/D86156 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D86156: [BFI] Make BFI information available through loop passes inside LoopStandardAnalysisResults

2020-09-15 Thread Wenlei He via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2ea4c2c598b7: [BFI] Make BFI information available through loop passes inside… (authored by wenlei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D77925: Revert "[TLI] Per-function fveclib for math library used for vectorization"

2020-08-28 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a comment. In D77925#2236519 , @tejohnson wrote: > In D77925#2229484 , @mehdi_amini > wrote: > >> Overall that would likely work for XLA. Something I'd like to mention though >> in response to: >>

[PATCH] D86156: [BFI] Preserve BFI information through loop passes via VH callbacks inside LoopStandardAnalysisResults

2020-08-27 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a comment. In D86156#2243393 , @asbirlea wrote: > Diff looks reasonable at this point. Thank you for the patch! > Please wait on @nikic for compile-time impact or additional feedback. > > Just out of curiosity, in D65060

[PATCH] D86156: [BFI] Preserve BFI information through loop passes via VH callbacks inside LoopStandardAnalysisResults

2020-08-23 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a comment. > If only LICM benefits from it, I'd consider creating a BFI instance for the > duration of the LICM pass Currently only LICM uses BFI, but I think it'd be beneficial for other loop passes to be able to use BFI too. BFI not accessible to loop passes seems to be a

[PATCH] D77925: Revert "[TLI] Per-function fveclib for math library used for vectorization"

2020-08-20 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a comment. In D77925#2220177 , @wenlei wrote: > In D77925#2220169 , @mehdi_amini > wrote: > >> I rather have a non closed list of veclib: if you just have a map keyed by >> string instead of an enum

[PATCH] D77925: Revert "[TLI] Per-function fveclib for math library used for vectorization"

2020-08-15 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a comment. In D77925#2220169 , @mehdi_amini wrote: > I rather have a non closed list of veclib: if you just have a map keyed by > string instead of an enum it should just work out? The veclib type is also tied to the accepted values for

[PATCH] D77925: Revert "[TLI] Per-function fveclib for math library used for vectorization"

2020-08-15 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a comment. In D77925#2016326 , @tejohnson wrote: > In D77925#2016299 , @wenlei wrote: > >> @mehdi_amini @tejohnson When can we re-land this (with tweaks)? I'm under >> the impression that a test case

[PATCH] D82213: [Remarks] Add callsite locations to inline remarks

2020-06-24 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a comment. In D82213#2110941 , @fhahn wrote: > That's interesting. We are also using something similar for the matrix > lowering remarks [1]: we traverse the inlining chain bottom up and emit a > remark at each step which contains the

[PATCH] D82213: [Remarks] Add callsite locations to inline remarks

2020-06-21 Thread Wenlei He via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7c8a6936bf6b: [Remarks] Add callsite locations to inline remarks (authored by wenlei). Changed prior to commit: https://reviews.llvm.org/D82213?vs=272263=272289#toc Repository: rG LLVM Github

[PATCH] D82213: [Remarks] Add callsite locations to inline remarks

2020-06-20 Thread Wenlei He via Phabricator via cfe-commits
wenlei marked an inline comment as done. wenlei added inline comments. Comment at: llvm/lib/Analysis/InlineAdvisor.cpp:392 +if (ProfileGuidedInline) + Remark << " by profile guided inliner"; +Remark << " with " << IC; davidxl wrote: > Perhaps reword

[PATCH] D82213: [Remarks] Add callsite locations to inline remarks

2020-06-20 Thread Wenlei He via Phabricator via cfe-commits
wenlei updated this revision to Diff 272263. wenlei added a comment. Update remark message. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82213/new/ https://reviews.llvm.org/D82213 Files:

[PATCH] D82213: [Remarks] Add callsite locations to inline remarks

2020-06-20 Thread Wenlei He via Phabricator via cfe-commits
wenlei updated this revision to Diff 272240. wenlei added a comment. Address David's comments, add test for nested inlinining. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82213/new/ https://reviews.llvm.org/D82213 Files:

[PATCH] D82213: [Remarks] Add callsite locations to inline remarks

2020-06-19 Thread Wenlei He via Phabricator via cfe-commits
wenlei marked an inline comment as done. wenlei added inline comments. Comment at: llvm/lib/Analysis/InlineAdvisor.cpp:391 +Remark << ore::NV("Caller", ); +if (ProfileGuidedInline) + Remark << " by profile guided inliner"; davidxl wrote: > is this

[PATCH] D82213: [Remarks] Add callsite locations to inline remarks

2020-06-19 Thread Wenlei He via Phabricator via cfe-commits
wenlei created this revision. wenlei added reviewers: wmi, davidxl, hoy. Herald added subscribers: llvm-commits, cfe-commits, hiraditya. Herald added projects: clang, LLVM. Add call site location info into inline remarks so we can differentiate inline sites. This can be useful for inliner

[PATCH] D77925: Revert "[TLI] Per-function fveclib for math library used for vectorization"

2020-05-02 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. @mehdi_amini @tejohnson When can we re-land this (with tweaks)? I'm under the impression that a test case demonstrating the 3rd party usage will be added very soon after this revert, then we can tweak

[PATCH] D77952: [TLII] Reduce copies of TLII for TLA

2020-04-12 Thread Wenlei He via Phabricator via cfe-commits
wenlei marked 2 inline comments as done. wenlei 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));

[PATCH] D77952: [TLII] Reduce copies of TLII for TLA

2020-04-12 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a comment. In D77952#1976803 , @tejohnson wrote: > 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

[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

[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.

[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

[PATCH] D77632: [TLI] Per-function fveclib for math library used for vectorization

2020-04-11 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a comment. In D77632#1975619 , @mehdi_amini wrote: > The existing TLI provides a very convenient way to define a VecLib without > LLVM knowing about it ahead of time. This feature is important for any > embedded use of LLVM as a library

[PATCH] D77632: [TLI] Per-function fveclib for math library used for vectorization

2020-04-11 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a comment. In D77632#1974409 , @tejohnson wrote: > In D77632#1974363 , @wenlei wrote: > > > In D77632#1974015 , @nikic wrote: > > > > > This change causes a

[PATCH] D77632: [TLI] Per-function fveclib for math library used for vectorization

2020-04-10 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a comment. In D77632#1974015 , @nikic wrote: > This change causes a ~0.5% compile-time regressions: >

[PATCH] D77632: [TLI] Per-function fveclib for math library used for vectorization

2020-04-09 Thread Wenlei He via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG60c642e74be6: [TLI] Per-function fveclib for math library used for vectorization (authored by wenlei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D77632: [TLI] Per-function fveclib for math library used for vectorization

2020-04-09 Thread Wenlei He via Phabricator via cfe-commits
wenlei updated this revision to Diff 256465. wenlei marked an inline comment as done. wenlei added a comment. rebase, update test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77632/new/ https://reviews.llvm.org/D77632 Files:

[PATCH] D77632: [TLI] Per-function fveclib for math library used for vectorization

2020-04-09 Thread Wenlei He via Phabricator via cfe-commits
wenlei marked 4 inline comments as done. wenlei added inline comments. Comment at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:272 +else + VectLibrary = Impl.ClVectorLibrary; + tejohnson wrote: > wenlei wrote: > > tejohnson wrote: > > > Suggest

[PATCH] D77632: [TLI] Per-function fveclib for math library used for vectorization

2020-04-09 Thread Wenlei He via Phabricator via cfe-commits
wenlei updated this revision to Diff 256437. wenlei marked an inline comment as done. wenlei added a comment. Herald added subscribers: haicheng, eraman. address feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77632/new/

[PATCH] D77632: [TLI] Per-function fveclib for math library used for vectorization

2020-04-09 Thread Wenlei He via Phabricator via cfe-commits
wenlei marked 4 inline comments as done. wenlei added inline comments. Comment at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:272 +else + VectLibrary = Impl.ClVectorLibrary; + tejohnson wrote: > Suggest moving the implementation of this constructor

[PATCH] D77632: [TLI] Per-function fveclib for math library used for vectorization

2020-04-09 Thread Wenlei He via Phabricator via cfe-commits
wenlei updated this revision to Diff 256350. wenlei added a comment. address feedback, allow functions within a module to have different vectlib setting. add test case for inline compatibility check. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D77632: [TLI] Per-function fveclib for math library used for vectorization

2020-04-08 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a comment. Thanks for taking a look and the suggestions, @tejohnson. Yeah, you're right about the potential conflict of attributes. Initially I thought even though we now allow this to be per-function, but since it comes from per-module switch, module level consistency can still

[PATCH] D77632: [TLI] Per-function fveclib for math library used for vectorization

2020-04-07 Thread Wenlei He via Phabricator via cfe-commits
wenlei updated this revision to Diff 255703. wenlei added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77632/new/ https://reviews.llvm.org/D77632 Files: clang/lib/CodeGen/CGCall.cpp clang/test/CodeGen/libcalls-veclib.c

[PATCH] D77632: [TLI] Per-function fveclib for math library used for vectorization

2020-04-07 Thread Wenlei He via Phabricator via cfe-commits
wenlei updated this revision to Diff 255679. wenlei added a comment. update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77632/new/ https://reviews.llvm.org/D77632 Files: clang/lib/CodeGen/CGCall.cpp clang/test/CodeGen/libcalls-veclib.c

[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] D77632: [TLI] Per-function fveclib for math library used for vectorization

2020-04-07 Thread Wenlei He via Phabricator via cfe-commits
wenlei created this revision. Herald added subscribers: cfe-commits, dexonsmith, hiraditya. Herald added a project: clang. wenlei edited the summary of this revision. wenlei added reviewers: tejohnson, hoyFB, spatel, gchatelet. Encode `-fveclib` setting as per-function attribute so it can be

[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-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 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-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

[PATCH] D74814: IR printing for single function with the new pass manager.

2020-02-23 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a comment. Committed on behalf of @hoyFB per request. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74814/new/ https://reviews.llvm.org/D74814 ___ cfe-commits mailing list

[PATCH] D74814: IR printing for single function with the new pass manager.

2020-02-23 Thread Wenlei He via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbae33a7c5a1f: IR printing for single function with the new pass manager. (authored by hoyFB, committed by wenlei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D74814: IR printing for single function with the new pass manager.

2020-02-19 Thread Wenlei He via Phabricator via cfe-commits
wenlei accepted this revision. wenlei added a comment. This revision is now accepted and ready to land. Thanks for the making the changes, it would be nice to have some consistency (the same structure) between test cases for legacy PM and new PM, e.g. `EMPTY` is only tested for legacy PM, but

[PATCH] D74814: IR printing for single function with the new pass manager.

2020-02-19 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a comment. > Sounds good. I was trying to figure out how to invoke the new pass manager > with OPT. Is there a command line switch to do that? If you just do `opt -passes=`, it will invoke new pass manager for `opt`. See https://reviews.llvm.org/D66560 for example - that was for

[PATCH] D74814: IR printing for single function with the new pass manager.

2020-02-19 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a comment. Thanks for fixing this. Could you use `.ll` IR file as test case and place it alongside with `test/Other/module-pass-printer.ll` or just reuse that one? We can also use `opt` to invoke new pass manager, so it doesn't need to be a clang test. Repository: rG LLVM

[PATCH] D73060: [Clang] Fix expansion of response files in -Wp after integrated-cc1 change

2020-01-20 Thread Wenlei He via Phabricator via cfe-commits
wenlei accepted this revision. wenlei added a comment. This revision is now accepted and ready to land. > Is that the desired behavior? This was the previous behavior but I'm not sure > it's the right behavior. Good point. It might be safer to keep that previous behavior though. Thanks for the

[PATCH] D69825: [Clang][Driver] Re-use the calling process instead of creating a new process for the cc1 invocation

2020-01-18 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a comment. @aganea, @hans This patch broke response file expansion for preprocessor via `-Wp` - all our internal builds failed with this patch because we invoke clang with response file passed to preprocessor, e.g. `clang++ ... -Wp,@pp.rsp @cc.rsp`. Looks like we can't just call

[PATCH] D71903: [Coroutines][6/6] Clang schedules new passes

2019-12-30 Thread Wenlei He via Phabricator via cfe-commits
wenlei added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:1228 + MPM.addPass(createModuleToFunctionPassAdaptor(CoroElidePass())); + MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(CoroSplitPass())); +

[PATCH] D69732: [WIP][LTO] Apply SamplePGO pipeline tunes for ThinLTO pre-link to full LTO

2019-11-04 Thread Wenlei He via Phabricator via cfe-commits
wenlei added inline comments. Comment at: llvm/lib/Transforms/IPO/PassManagerBuilder.cpp:614 // during ThinLTO and perform the rest of the optimizations afterward. if (PrepareForThinLTO) { // Ensure we perform any last passes, but do so before renaming anonymous

[PATCH] D69732: [WIP][LTO] Apply SamplePGO pipeline tunes for ThinLTO pre-link to full LTO

2019-11-01 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a comment. > The comments indicate that this is in part due to issues with > the new PM loop pass manager Wondering how different it is for these loop passes to be enabled for MonoLTO vs ThinLTO? If it's due to problems with the newPM, I guess ThinLTO would have the same

[PATCH] D38061: Set AnonymousTagLocations false for ASTContext if column info is expected not to be used

2019-04-30 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a comment. In D38061#1484486 , @dblaikie wrote: > Seems like the right thing would be for the DWARF code that wants a rendered > type name to pass its own printing policy, rather than changing some > relatively global one. > > (though also