[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] 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 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] D83176: [OpenMPIRBuilder][Fix] Move llvm::omp::types to OpenMPIRBuilder.

2020-07-05 Thread Hongtao Yu via Phabricator via cfe-commits
hoyFB added a comment. Thanks for the quick turnaround! I confirm the change fixes our build break. Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:313 { \ SmallVector ArgsTypes({__VA_ARGS__})

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

2020-07-14 Thread Hongtao Yu via Phabricator via cfe-commits
hoyFB added a comment. In D69732#1771950 , @ormris wrote: > I've done testing with the following global parameters. > > - The base for the branch is llvmorg-10-init-8655-g94a4a2c97f8 > - Used llvm, clang, lld, and llvm-ar from this branch. > - The sqlite k

[PATCH] D82822: [OpenMP][FIX] Consistently use OpenMPIRBuilder if requested

2020-08-02 Thread Hongtao Yu via Phabricator via cfe-commits
hoyFB added a comment. In D82822#2187576 , @jdoerfert wrote: > @davezarzycki The bots reported this as well, didn't build MLIR locally, this > should have been fixed by 4d83aa4771d84940626d86c883193af390812281 >

[PATCH] D82822: [OpenMP][FIX] Consistently use OpenMPIRBuilder if requested

2020-08-02 Thread Hongtao Yu via Phabricator via cfe-commits
hoyFB added a comment. In D82822#2189692 , @jdoerfert wrote: > In D82822#2189366 , @hoyFB wrote: > >> In D82822#2187576 , @jdoerfert >> wrote: >> >>> @davezarzycki The bots

[PATCH] D121969: Pass split-machine-functions to code generator when flto is used

2022-03-23 Thread Hongtao Yu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG72acd042bad3: Pass split-machine-functions to code generator when flto is used (authored by junfd, committed by hoy). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D106193: [CSSPGO] Turn on unique linkage name by default for pseudo probe.

2021-07-16 Thread Hongtao Yu via Phabricator via cfe-commits
hoy created this revision. Herald added subscribers: modimo, wenlei. hoy requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Turning on -funique-internal-linkage-names when -fpseudo-probe-for-profiling is on, unless -fno-unique-internal-linkag

[PATCH] D106193: [CSSPGO] Turn on unique linkage name by default for pseudo probe.

2021-07-16 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added inline comments. Comment at: clang/test/Driver/pseudo-probe.c:4 // RUN: %clang -### -fpseudo-probe-for-profiling -fdebug-info-for-profiling %s 2>&1 | FileCheck %s --check-prefix=CONFLICT +// RUN: %clang -### -fpseudo-probe-for-profiling -funique-internal-linkage-name

[PATCH] D106193: [CSSPGO] Turn on unique linkage name by default for pseudo probe.

2021-07-16 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added inline comments. Comment at: clang/test/Driver/pseudo-probe.c:4 // RUN: %clang -### -fpseudo-probe-for-profiling -fdebug-info-for-profiling %s 2>&1 | FileCheck %s --check-prefix=CONFLICT +// RUN: %clang -### -fpseudo-probe-for-profiling -funique-internal-linkage-name

[PATCH] D106193: [CSSPGO] Turn on unique linkage name by default for pseudo probe.

2021-07-16 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added inline comments. Comment at: clang/test/Driver/pseudo-probe.c:4 // RUN: %clang -### -fpseudo-probe-for-profiling -fdebug-info-for-profiling %s 2>&1 | FileCheck %s --check-prefix=CONFLICT +// RUN: %clang -### -fpseudo-probe-for-profiling -funique-internal-linkage-name

[PATCH] D106193: [CSSPGO] Turn on unique linkage name by default for pseudo probe.

2021-07-16 Thread Hongtao Yu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG77aec978a911: [CSSPGO] Turn on unique linkage name by default for pseudo probe. (authored by hoy). Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D121969: Pass split-machine-functions to code generator when flto is used

2022-03-21 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:577 + if (Args.hasArg(options::OPT_fsplit_machine_functions)) { +CmdArgs.push_back("-plugin-opt=-split-machine-functions"); Should also check `OPT_fno_split_machine_functions

[PATCH] D121969: Pass split-machine-functions to code generator when flto is used

2022-03-22 Thread Hongtao Yu via Phabricator via cfe-commits
hoy accepted this revision. hoy 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/D121969/new/ https://reviews.llvm.org/D121969

[PATCH] D87853: [Sema] Update specialization iterator after template argument deduction.

2020-09-17 Thread Hongtao Yu via Phabricator via cfe-commits
hoy created this revision. Herald added subscribers: cfe-commits, wenlei. Herald added a project: clang. hoy requested review of this revision. Template argument deduction may update the underlying specialization container and invalidate previous iterators of the container. This triggered an asse

[PATCH] D87853: [Sema] Update specialization iterator after template argument deduction.

2020-09-17 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added a comment. The bug is exposed by instantiating a large variadic template. I haven't managed to get down to a decent size of regression test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87853/new/ https://reviews.llvm.org/D87853 __

[PATCH] D86193: [CSSPGO] Pseudo probe instrumentation for basic blocks.

2020-09-23 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added a comment. @davidxl I'm wondering if it is a good time for you to start reviewing the patches. Please let me know if you need more time. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86193/new/ https://reviews.llvm.org/D86193 __

[PATCH] D86193: [CSSPGO] Pseudo probe instrumentation for basic blocks

2020-08-18 Thread Hongtao Yu via Phabricator via cfe-commits
hoy created this revision. Herald added subscribers: llvm-commits, cfe-commits, dang, laytonio, asbirlea, hiraditya, mgorny. Herald added projects: clang, LLVM. hoy requested review of this revision. Herald added a subscriber: jdoerfert. Repository: rG LLVM Github Monorepo https://reviews.llvm

[PATCH] D86193: [CSSPGO] Pseudo probe instrumentation for basic blocks

2020-08-18 Thread Hongtao Yu via Phabricator via cfe-commits
hoy updated this revision to Diff 286476. hoy added a comment. Updating D86193 : [CSSPGO] Pseudo probe instrumentation for basic blocks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86193/new/ https://reviews.llvm.

[PATCH] D86193: [CSSPGO] Pseudo probe instrumentation for basic blocks.

2020-08-19 Thread Hongtao Yu via Phabricator via cfe-commits
hoy updated this revision to Diff 286664. hoy edited the summary of this revision. hoy added a comment. Updating D86193 : [CSSPGO] Pseudo probe instrumentation for basic blocks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D86193: [CSSPGO] Pseudo probe instrumentation for basic blocks.

2020-08-19 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added a comment. In D86193#2227129 , @davidxl wrote: > A heads up -- I won't be able to review patch until mid Sept. Hope this is > fine. Thanks for the heads-up. That's fine. We can wait for your input. Repository: rG LLVM Github Monorepo CHANG

[PATCH] D86193: [CSSPGO] Pseudo probe instrumentation for basic blocks.

2020-08-24 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added a comment. In D86193#2232609 , @wmi wrote: > Thanks for the patch! A few questions: > >> probe blocks some CFG transformations that can mess up profile correlation. > > Can you enumerate some CFG transformations which be blocked? Is it possible

[PATCH] D86502: [CSSPGO] Pseudo probe instrumentation for basic blocks

2020-08-24 Thread Hongtao Yu via Phabricator via cfe-commits
hoy created this revision. Herald added subscribers: llvm-commits, cfe-commits, wenlei, dang, dexonsmith, hiraditya. Herald added projects: clang, LLVM. hoy requested review of this revision. This change introduces a new clang switch `-fpseudo-probe-for-profiling` to enable AutoFDO with pseudo i

[PATCH] D86193: [CSSPGO] Pseudo probe instrumentation for basic blocks.

2020-08-26 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added a comment. In D86193#2240353 , @wmi wrote: >> There are some optimizations such as if-convert, tail call elimination, that >> were initially blocked by the pseudo probe intrinsic but is now unblocked by >> fixes included in this change. With th

[PATCH] D86193: [CSSPGO] Pseudo probe instrumentation for basic blocks.

2020-08-26 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added a comment. In D86193#2240596 , @wmi wrote: > In D86193#2240502 , @hoy wrote: > >> In D86193#2240353 , @wmi wrote: >> There are some optimizations such as if-co

[PATCH] D86502: [CSSPGO] A Clang switch -fpseudo-probe-for-profiling for pseudo-probe instrumentation.

2020-08-28 Thread Hongtao Yu via Phabricator via cfe-commits
hoy marked an inline comment as done. hoy added a comment. In D86502#2245460 , @wmi wrote: >> The early instrumentation also allows the inliner to duplicate probes for >> inlined instances. When a probe along with the other instructions of a >> callee fu

[PATCH] D86502: [CSSPGO] A Clang switch -fpseudo-probe-for-profiling for pseudo-probe instrumentation.

2020-08-28 Thread Hongtao Yu via Phabricator via cfe-commits
hoy updated this revision to Diff 288716. hoy marked an inline comment as done. hoy added a comment. Updating D86502 : [CSSPGO] A Clang switch -fpseudo-probe-for-profiling for pseudo-probe instrumentation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D92661: [RFC] Fix TLS and Coroutine

2020-12-07 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added inline comments. Comment at: llvm/include/llvm/IR/Intrinsics.td:1309 +// Intrinsic to obtain the address of a thread_local variable. +def int_threadlocal : Intrinsic<[llvm_ptr_ty], [llvm_ptr_ty]>; + lxfind wrote: > hoy wrote: > > lxfind wrote: > > > hoy

[PATCH] D93264: [CSSPGO] Introducing distribution factor for pseudo probe

2020-12-14 Thread Hongtao Yu via Phabricator via cfe-commits
hoy created this revision. Herald added subscribers: dexonsmith, wenlei, hiraditya. hoy requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, jdoerfert. Herald added projects: clang, LLVM. Sample re-annotation is required in LTO time to achieve a reasonable post-

[PATCH] D93264: [CSSPGO] Introducing distribution factor for pseudo probe.

2020-12-16 Thread Hongtao Yu via Phabricator via cfe-commits
hoy updated this revision to Diff 312339. hoy added a comment. Rebasing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93264/new/ https://reviews.llvm.org/D93264 Files: clang/test/CodeGen/pseudo-probe-emit.c llvm/include/llvm/IR/IntrinsicInst.

[PATCH] D93656: Moving UniqueInternalLinkageNamesPass to the start of IR pipelines.

2020-12-21 Thread Hongtao Yu via Phabricator via cfe-commits
hoy created this revision. Herald added subscribers: dexonsmith, wenlei, hiraditya. hoy requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. `UniqueInternalLinkageNamesPass` is useful to CSSPGO, especially when pseudo probe is

[PATCH] D93656: Moving UniqueInternalLinkageNamesPass to the start of IR pipelines.

2020-12-21 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added inline comments. Comment at: llvm/lib/Transforms/Utils/UniqueInternalLinkageNames.cpp:27 +static cl::opt UniqueDebugAndProfileNames( +"unqiue-debug-profile-names", cl::init(false), cl::Hidden, +cl::desc("Uniqueify debug and profile symbol Names")); -

[PATCH] D93656: Moving UniqueInternalLinkageNamesPass to the start of IR pipelines.

2020-12-21 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added a comment. In D93656#2466689 , @tmsriram wrote: > https://reviews.llvm.org/D73307#1932131 rnk@ mentioned this : "At a higher > level, should this just be an IR pass that clang adds into the pipeline when > the flag is set? It should be safe t

[PATCH] D93656: Moving UniqueInternalLinkageNamesPass to the start of IR pipelines.

2020-12-21 Thread Hongtao Yu via Phabricator via cfe-commits
hoy marked 2 inline comments as done. hoy added inline comments. Comment at: llvm/lib/IR/DebugInfoMetadata.cpp:881 +void DISubprogram::replaceRawLinkageName(MDString *LinkageName) { + replaceOperandWith(3, LinkageName); +} tmsriram wrote: > Nit, Move the body to

[PATCH] D93656: Moving UniqueInternalLinkageNamesPass to the start of IR pipelines.

2020-12-21 Thread Hongtao Yu via Phabricator via cfe-commits
hoy updated this revision to Diff 313187. hoy marked an inline comment as done. hoy added a comment. Addressing feedbacks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93656/new/ https://reviews.llvm.org/D93656 Files: clang/lib/CodeGen/BackendU

[PATCH] D92806: Single function compilation mode.

2020-12-21 Thread Hongtao Yu via Phabricator via cfe-commits
hoy updated this revision to Diff 313221. hoy added a comment. Herald added subscribers: cfe-commits, dexonsmith, dang, steven_wu, MaskRay, arichardson, emaste. Herald added a reviewer: espindola. Herald added a reviewer: MaskRay. Herald added a project: clang. Adding LTO, linker and clang suppor

[PATCH] D93656: Moving UniqueInternalLinkageNamesPass to the start of IR pipelines.

2020-12-22 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added inline comments. Comment at: llvm/include/llvm/IR/DebugInfoMetadata.h:2056-2059 + void replaceRawLinkageName(MDString *LinkageName) { +replaceOperandWith(3, LinkageName); + } + tmsriram wrote: > dblaikie wrote: > > The need to add this API makes m

[PATCH] D93656: Moving UniqueInternalLinkageNamesPass to the start of IR pipelines.

2020-12-22 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added a comment. In D93656#2468821 , @aeubanks wrote: > Also it looks like this is doing 2 different things, the moving of things > from Clang to LLVM's PassBuilder, and separately the change to the pass > itself. Can these be separated? I'm not sur

[PATCH] D93656: Moving UniqueInternalLinkageNamesPass to the start of IR pipelines.

2020-12-22 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added a comment. In D93656#2468841 , @aeubanks wrote: > In D93656#2468834 , @hoy wrote: > >> In D93656#2468821 , @aeubanks wrote: >> >>> Also it looks like this is doing

[PATCH] D93656: Moving UniqueInternalLinkageNamesPass to the start of IR pipelines.

2020-12-22 Thread Hongtao Yu via Phabricator via cfe-commits
hoy updated this revision to Diff 313487. hoy added a comment. Separated PassBuilder changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93656/new/ https://reviews.llvm.org/D93656 Files: clang/lib/CodeGen/BackendUtil.cpp llvm/include/llvm/P

[PATCH] D93656: Moving UniqueInternalLinkageNamesPass to the start of IR pipelines.

2020-12-22 Thread Hongtao Yu via Phabricator via cfe-commits
hoy updated this revision to Diff 313488. hoy added a comment. Fixing IR test failure. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93656/new/ https://reviews.llvm.org/D93656 Files: clang/lib/CodeGen/BackendUtil.cpp llvm/include/llvm/Passes/P

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

2020-12-22 Thread Hongtao Yu via Phabricator via cfe-commits
hoy created this revision. Herald added subscribers: dexonsmith, wenlei, hiraditya. hoy requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Funtions that are renamed under -funique-internal-linkage-names have their debug link

[PATCH] D93656: Moving UniqueInternalLinkageNamesPass to the start of IR pipelines.

2020-12-22 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added a comment. The changes that rename debug linkage name has been separated as D93747 . I'm moving the discussion there. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93656/new/ https://reviews.llvm.org/D936

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

2020-12-22 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added a comment. > In D93656 , @dblaikie wrote: > Though the C case is interesting - it means you'll end up with C functions > with the same DWARF 'name' but different linkage name. I don't know what > that'll do to DWARF consumers - I guess they'll probably

[PATCH] D93656: Moving UniqueInternalLinkageNamesPass to the start of IR pipelines.

2020-12-22 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added a comment. In D93656#2469504 , @dblaikie wrote: > In D93656#2469485 , @hoy wrote: > >> In D93656#2468841 , @aeubanks wrote: >> >>> In D93656#2468834

[PATCH] D93656: Moving UniqueInternalLinkageNamesPass to the start of IR pipelines.

2020-12-23 Thread Hongtao Yu via Phabricator via cfe-commits
hoy updated this revision to Diff 313566. hoy edited the summary of this revision. hoy added a comment. Checking pipeline in clang test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93656/new/ https://reviews.llvm.org/D93656 Files: clang/lib/Co

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

2020-12-23 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added a comment. In D93747#2470178 , @tmsriram wrote: > In D93747#2469556 , @hoy wrote: > >>> In D93656 , @dblaikie wrote: >>> Though the C case is interesting - it means you'll

[PATCH] D93656: Moving UniqueInternalLinkageNamesPass to the start of IR pipelines.

2020-12-23 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added inline comments. Comment at: clang/test/CodeGen/unique-internal-linkage-names.cpp:48-49 +// LPIPELINE: Unique Internal Linkage Names +// NPIPELINE: Running pass: UniqueInternalLinkageNamesPass // PLAIN: @_ZL4glob = internal global dblaikie wrote: > D

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

2020-12-23 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added a comment. In D93747#2470387 , @dblaikie wrote: > Please remove the clang test change - if this is an LLVM change with LLVM > test coverage, that's enough. (we don't generally test every LLVM change from > both LLVM and Clang) Sounds good. >

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

2020-12-23 Thread Hongtao Yu via Phabricator via cfe-commits
hoy updated this revision to Diff 313607. hoy added a comment. Undoing changes to the clang test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93747/new/ https://reviews.llvm.org/D93747 Files: llvm/include/llvm/IR/DebugInfoMetadata.h llvm/lib

[PATCH] D93656: Moving UniqueInternalLinkageNamesPass to the start of IR pipelines.

2020-12-23 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added inline comments. Comment at: clang/test/CodeGen/unique-internal-linkage-names.cpp:48-49 +// LPIPELINE: Unique Internal Linkage Names +// NPIPELINE: Running pass: UniqueInternalLinkageNamesPass // PLAIN: @_ZL4glob = internal global aeubanks wrote: > d

[PATCH] D93656: Moving UniqueInternalLinkageNamesPass to the start of IR pipelines.

2020-12-23 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added inline comments. Comment at: clang/test/CodeGen/unique-internal-linkage-names.cpp:48-49 +// LPIPELINE: Unique Internal Linkage Names +// NPIPELINE: Running pass: UniqueInternalLinkageNamesPass // PLAIN: @_ZL4glob = internal global aeubanks wrote: > h

[PATCH] D93656: Moving UniqueInternalLinkageNamesPass to the start of IR pipelines.

2020-12-23 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added inline comments. Comment at: clang/test/CodeGen/unique-internal-linkage-names.cpp:48-49 +// LPIPELINE: Unique Internal Linkage Names +// NPIPELINE: Running pass: UniqueInternalLinkageNamesPass // PLAIN: @_ZL4glob = internal global dblaikie wrote: > a

[PATCH] D93656: Moving UniqueInternalLinkageNamesPass to the start of IR pipelines.

2020-12-23 Thread Hongtao Yu via Phabricator via cfe-commits
hoy updated this revision to Diff 313630. hoy added a comment. Adding PTO checks in LLVM test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93656/new/ https://reviews.llvm.org/D93656 Files: llvm/include/llvm/Passes/PassBuilder.h llvm/lib/Pass

[PATCH] D93656: Moving UniqueInternalLinkageNamesPass to the start of IR pipelines.

2020-12-23 Thread Hongtao Yu via Phabricator via cfe-commits
hoy marked an inline comment as done. hoy added inline comments. Comment at: llvm/test/Transforms/UniqueLinkageNames/unique-internal-linkage-names.ll:20 + +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, enums: !2) +!1 = !DIFile(filename: "test.c", directory: "") -

[PATCH] D93656: Moving UniqueInternalLinkageNamesPass to the start of IR pipelines.

2020-12-23 Thread Hongtao Yu via Phabricator via cfe-commits
hoy updated this revision to Diff 313650. hoy marked an inline comment as done. hoy added a comment. Removing unnecessary test code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93656/new/ https://reviews.llvm.org/D93656 Files: llvm/include/llv

[PATCH] D86502: [CSSPGO] A Clang switch -fpseudo-probe-for-profiling for pseudo-probe instrumentation.

2020-11-18 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added a comment. In D86502#2245734 , @wmi wrote: > In D86502#2245578 , @hoy wrote: > >> In D86502#2245460 , @wmi wrote: >> The early instrumentation also allows the

[PATCH] D91756: [CSSPGO] Pseudo probes for function calls.

2020-11-18 Thread Hongtao Yu via Phabricator via cfe-commits
hoy created this revision. Herald added subscribers: llvm-commits, cfe-commits, dexonsmith, wenlei, pengfei, hiraditya, mgorny. Herald added projects: clang, LLVM. hoy requested review of this revision. An indirect call site needs to be probed for its potential call targets. With CSSPGO a direct

[PATCH] D91756: [CSSPGO] Pseudo probes for function calls.

2020-11-18 Thread Hongtao Yu via Phabricator via cfe-commits
hoy updated this revision to Diff 306280. hoy edited the summary of this revision. hoy added a comment. Updating D91756 : [CSSPGO] Pseudo probes for function calls. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D9175

[PATCH] D86502: [CSSPGO] A Clang switch -fpseudo-probe-for-profiling for pseudo-probe instrumentation.

2020-11-19 Thread Hongtao Yu via Phabricator via cfe-commits
hoy updated this revision to Diff 306488. hoy added a comment. Updating D86502 : [CSSPGO] A Clang switch -fpseudo-probe-for-profiling for pseudo-probe instrumentation. Changing test corresponding to intrinsic attributes. Repository: rG LLVM Github Monorepo C

[PATCH] D91756: [CSSPGO] Pseudo probes for function calls.

2020-11-19 Thread Hongtao Yu via Phabricator via cfe-commits
hoy updated this revision to Diff 306497. hoy added a comment. Updating D91756 : [CSSPGO] Pseudo probes for function calls. Corresponding changes to support IR/MIR intrinsic attributes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[PATCH] D88338: [clangd] clangd --check: standalone diagnosis of common problems

2020-10-01 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added inline comments. Comment at: clang-tools-extra/clangd/tool/Check.cpp:243 + size_t N = 50; + auto xxx = std::string(N, 'x'); +)cpp"; Hi, I'm seeing an error with this "tweak: ExpandAutoType ==> FAIL: Could not deduce type for 'auto' type".

[PATCH] D88338: [clangd] clangd --check: standalone diagnosis of common problems

2020-10-02 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added a comment. In D88338#2307976 , @sammccall wrote: > Sorry @rsmith @hoy, I've replaced the test with one without such dependencies > in bc18d8d9b705d31a94c51900c8b18e4feaf9c7fb >

[PATCH] D86502: [CSSPGO] A Clang switch -fpseudo-probe-for-profiling for pseudo-probe instrumentation.

2020-11-20 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:978-982 Opts.DebugInfoForProfiling = Args.hasFlag( OPT_fdebug_info_for_profiling, OPT_fno_debug_info_for_profiling, false); + Opts.PseudoProbeForProfiling = + Args.hasFlag(OPT_fpseudo

[PATCH] D86193: [CSSPGO] Pseudo probe instrumentation for basic blocks.

2020-11-30 Thread Hongtao Yu via Phabricator via cfe-commits
hoy abandoned this revision. hoy added a comment. Abandoning this diff which has been broken into four other diffs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86193/new/ https://reviews.llvm.org/D86193 __

[PATCH] D86502: [CSSPGO] A Clang switch -fpseudo-probe-for-profiling for pseudo-probe instrumentation.

2020-11-30 Thread Hongtao Yu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGc083fededfa6: [CSSPGO] A Clang switch -fpseudo-probe-for-profiling for pseudo-probe… (authored by hoy). Repository: rG LLVM Github Monorepo CHANG

[PATCH] D91756: [CSSPGO] Pseudo probes for function calls.

2020-12-01 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added inline comments. Comment at: llvm/lib/CodeGen/PseudoProbeInserter.cpp:50 +for (MachineBasicBlock &MBB : MF) { + MachineInstr *FirstInstr = nullptr; + for (MachineInstr &MI : MBB) { wmi wrote: > What is the usage of FirstInstr? Good patch.

[PATCH] D91756: [CSSPGO] Pseudo probes for function calls.

2020-12-01 Thread Hongtao Yu via Phabricator via cfe-commits
hoy updated this revision to Diff 308806. hoy added a comment. Updating D91756 : [CSSPGO] Pseudo probes for function calls. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91756/new/ https://reviews.llvm.org/D91756

[PATCH] D91756: [CSSPGO] Pseudo probes for function calls.

2020-12-01 Thread Hongtao Yu via Phabricator via cfe-commits
hoy updated this revision to Diff 308874. hoy added a comment. Updating D91756 : [CSSPGO] Pseudo probes for function calls. Adding messages for asserts. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91756/new/ htt

[PATCH] D91756: [CSSPGO] Pseudo probes for function calls.

2020-12-01 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added a comment. In D91756#2427759 , @wmi wrote: > Another question. Sorry for not bringing it up earlier. When a call with > probe metadata attached is inlined, the probe will be gone or it will be kept > somehow? I think you want to keep the probe

[PATCH] D91756: [CSSPGO] Pseudo probes for function calls.

2020-12-02 Thread Hongtao Yu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG24d4291ca704: [CSSPGO] Pseudo probes for function calls. (authored by hoy). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D92661: [RFC] Fix TLS and Coroutine

2020-12-04 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added inline comments. Comment at: llvm/include/llvm/IR/Intrinsics.td:1309 +// Intrinsic to obtain the address of a thread_local variable. +def int_threadlocal : Intrinsic<[llvm_ptr_ty], [llvm_ptr_ty]>; + With the intrinsic, can TLS variable reference in the

[PATCH] D92661: [RFC] Fix TLS and Coroutine

2020-12-04 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added inline comments. Comment at: llvm/include/llvm/IR/Intrinsics.td:1309 +// Intrinsic to obtain the address of a thread_local variable. +def int_threadlocal : Intrinsic<[llvm_ptr_ty], [llvm_ptr_ty]>; + hoy wrote: > With the intrinsic, can TLS variable refe

[PATCH] D92661: [RFC] Fix TLS and Coroutine

2020-12-04 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added inline comments. Comment at: llvm/include/llvm/IR/Intrinsics.td:1309 +// Intrinsic to obtain the address of a thread_local variable. +def int_threadlocal : Intrinsic<[llvm_ptr_ty], [llvm_ptr_ty]>; + lxfind wrote: > hoy wrote: > > hoy wrote: > > > With t

[PATCH] D98799: [UniqueLinkageName] Use consistent checks when mangling symbo linkage name and debug linkage name.

2021-05-12 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added inline comments. Comment at: clang/test/CodeGen/unique-internal-linkage-names-dwarf.c:34-39 +static int go(a) int a; +{ + return glob + a; +} + + aaron.ballman wrote: > dblaikie wrote: > > hoy wrote: > > > dblaikie wrote: > > > > hoy wrote: > > > > > d

[PATCH] D98799: [UniqueLinkageName] Use consistent checks when mangling symbo linkage name and debug linkage name.

2021-05-12 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added inline comments. Comment at: clang/test/CodeGen/unique-internal-linkage-names-dwarf.c:34-39 +static int go(a) int a; +{ + return glob + a; +} + + aaron.ballman wrote: > hoy wrote: > > aaron.ballman wrote: > > > dblaikie wrote: > > > > hoy wrote: > > >

[PATCH] D102356: [UniqueLinkageName] Use exsiting GlobalDecl object instead of reconstructing one.

2021-05-12 Thread Hongtao Yu via Phabricator via cfe-commits
hoy created this revision. Herald added a subscriber: wenlei. hoy requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. C++ constructors/destructors need to go through a different constructor to construct a GlobalDecl object in order to retrieve

[PATCH] D98799: [UniqueLinkageName] Use consistent checks when mangling symbo linkage name and debug linkage name.

2021-05-13 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added a comment. In D98799#2757959 , @dblaikie wrote: >> I took another look. I think the divergence comes from >> getAs vs hasPrototype. The debug data generation uses >> hasPrototype while getAs is used as overloadable >> attribute processing as l

[PATCH] D102356: [UniqueLinkageName] Use exsiting GlobalDecl object instead of reconstructing one.

2021-05-13 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added a comment. In D102356#2758179 , @dblaikie wrote: > This was previously crashing, I guess? Testing should validate the behavior > beyond the crash, though - (presumably there's some more specific behavior > than "does not crash" that wasn't bei

[PATCH] D102356: [UniqueLinkageName] Use exsiting GlobalDecl object instead of reconstructing one.

2021-05-14 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added a comment. In D102356#2760973 , @dblaikie wrote: > In D102356#2758371 , @hoy wrote: > >> In D102356#2758179 , @dblaikie >> wrote: >> >>> This was previously cra

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

2021-01-22 Thread Hongtao Yu via Phabricator via cfe-commits
hoy created this revision. Herald added subscribers: wenlei, dang, steven_wu, hiraditya. Herald added a reviewer: jansvoboda11. hoy requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. As titled. Repository: rG LLVM Github Monorepo https://

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

2021-01-22 Thread Hongtao Yu via Phabricator via cfe-commits
hoy updated this revision to Diff 318714. hoy added a comment. Fixing test failure on Windows. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95271/new/ https://reviews.llvm.org/D95271 Files: clang/include/clang/Driver/Options.td clang/lib/Driv

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

2021-01-24 Thread Hongtao Yu via Phabricator via cfe-commits
hoy 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] D95271: [CSSPGO] Passing the clang driver switch -fpseudo-probe-for-profiling to the linker.

2021-01-24 Thread Hongtao Yu via Phabricator via cfe-commits
hoy updated this revision to Diff 318878. hoy added a comment. Addressing Wenleis' feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95271/new/ https://reviews.llvm.org/D95271 Files: clang/include/clang/Driver/Options.td clang/lib/Driver

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

2021-02-01 Thread Hongtao Yu via Phabricator via cfe-commits
hoy updated this revision to Diff 320680. hoy added a comment. Rebasing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95271/new/ https://reviews.llvm.org/D95271 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/ToolChains/CommonAr

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

2021-02-01 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:609-610 + // Pass an option to enable pseudo probe emission. + if (Args.hasFlag(options::OPT_fpseudo_probe_for_profiling, + options::OPT_fno_pseudo_probe_for_profiling)) +Cmd

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

2021-02-01 Thread Hongtao Yu via Phabricator via cfe-commits
hoy updated this revision to Diff 320686. hoy added a comment. Addressing Wei's comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95271/new/ https://reviews.llvm.org/D95271 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/Too

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

2021-02-01 Thread Hongtao Yu via Phabricator via cfe-commits
hoy marked an inline comment as done. hoy added inline comments. Comment at: clang/test/Driver/pseudo-probe-lto.c:6 +// RUN: %clang -### %t.o -target x86_64-unknown-linux -flto -fno-pseudo-probe-for-profiling 2>&1 | FileCheck %s --check-prefix=NOPROBE +// RUN: %clang -### %t.o -

[PATCH] D93264: [CSSPGO] Introducing distribution factor for pseudo probe.

2021-02-02 Thread Hongtao Yu via Phabricator via cfe-commits
hoy updated this revision to Diff 320822. hoy added a comment. Rebasing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93264/new/ https://reviews.llvm.org/D93264 Files: clang/test/CodeGen/pseudo-probe-emit.c llvm/include/llvm/IR/IntrinsicInst.

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

2021-02-02 Thread Hongtao Yu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. hoy marked an inline comment as done. Closed by commit rGd3e2e3740d07: [CSSPGO] Passing the clang driver switch -fpseudo-probe-for-profiling to the… (authored by hoy).

[PATCH] D93264: [CSSPGO] Introducing distribution factor for pseudo probe.

2021-02-02 Thread Hongtao Yu via Phabricator via cfe-commits
hoy updated this revision to Diff 320844. hoy added a comment. Rebasing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93264/new/ https://reviews.llvm.org/D93264 Files: clang/test/CodeGen/pseudo-probe-emit.c llvm/include/llvm/IR/IntrinsicInst.

[PATCH] D93264: [CSSPGO] Introducing distribution factor for pseudo probe.

2021-02-02 Thread Hongtao Yu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG3d89b3cbec23: [CSSPGO] Introducing distribution factor for pseudo probe. (authored by hoy). Changed prior to commit: https://reviews.llvm.org/D932

[PATCH] D110209: [CSSPGO] Set PseudoProbeInserter as a default pass.

2021-09-21 Thread Hongtao Yu via Phabricator via cfe-commits
hoy created this revision. Herald added subscribers: ormris, modimo, wenlei, dang, pengfei, steven_wu, hiraditya, arichardson, emaste. Herald added a reviewer: MaskRay. hoy requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits.

[PATCH] D110209: [CSSPGO] Set PseudoProbeInserter as a default pass.

2021-09-21 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added a comment. In D110209#3014334 , @MaskRay wrote: > lld/test/ELF/lto/pseudo-probe-lto.ll needs update Good catch, thanks. I also moved the pass into x86 backend only, as there are a lot test failures on other targets and we don't really need th

[PATCH] D110209: [CSSPGO] Set PseudoProbeInserter as a default pass.

2021-09-21 Thread Hongtao Yu via Phabricator via cfe-commits
hoy updated this revision to Diff 374126. hoy added a comment. Updating D110209 : [CSSPGO] Set PseudoProbeInserter as a default pass. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110209/new/ https://reviews.llvm.

[PATCH] D110209: [CSSPGO] Set PseudoProbeInserter as a default pass.

2021-09-22 Thread Hongtao Yu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGd9b511d8e8c4: [CSSPGO] Set PseudoProbeInserter as a default pass. (authored by hoy). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D110371: [CSSPGO] Do not pass -fpseudo-probe-for-profiling to the linker.

2021-09-23 Thread Hongtao Yu via Phabricator via cfe-commits
hoy created this revision. Herald added subscribers: ormris, modimo, wenlei, steven_wu, hiraditya. hoy requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The correponding linker switch has been removed by https://reviews.llvm.org/D110209, so

[PATCH] D110371: [CSSPGO] Do not pass -fpseudo-probe-for-profiling to the linker.

2021-09-23 Thread Hongtao Yu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe9d1a679a1c9: [CSSPGO] Do not pass -fpseudo-probe-for-profiling to the linker. (authored by hoy). Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D96354: Avoid conflicts between debug-info and pseudo-probe profiling

2021-02-09 Thread Hongtao Yu via Phabricator via cfe-commits
hoy accepted this revision. hoy added a comment. This revision is now accepted and ready to land. Thanks for fixing these issues! LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96354/new/ https://reviews.llvm.org/D96354 __

  1   2   3   >