[PATCH] D68213: [LTO] Support for embedding bitcode section during LTO

2019-12-11 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson accepted this revision. tejohnson added a comment. This revision is now accepted and ready to land. LGTM with a few small suggestions before you commit. Comment at: llvm/lib/LTO/LTOBackend.cpp:317 +static cl::opt EmbedBitcode("lto-embed-bitcode", cl::init(false), +

[PATCH] D67923: [TLI] Support for per-Function TLI that overrides available libfuncs

2019-12-16 Thread Teresa Johnson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG878ab6df033d: [TLI] Support for per-Function TLI that overrides available libfuncs (authored by tejohnson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D67923: [TLI] Support for per-Function TLI that overrides available libfuncs

2019-12-16 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 234090. tejohnson added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67923/new/ https://reviews.llvm.org/D67923 Files: clang/lib/CodeGen/BackendUtil.cpp

[PATCH] D68213: [LTO] Support for embedding bitcode section during LTO

2019-12-10 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added inline comments. Comment at: llvm/lib/LTO/LTOBackend.cpp:335 + .Case("bitcode", EmbedBitcodeKind::Embed_Bitcode) + .Case("marker", EmbedBitcodeKind::Embed_Marker) + .Default(~0U);

[PATCH] D69327: [Clang][ThinLTO] Add a cache for compile phase output.

2019-10-24 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. We rely on the minimized bitcode from that option in our builds, so it won't be going away. We could add it as a driver option, but it doesn't sound like that will solve the ccache issue. I'm not very familiar with that cache support, or if there is a way to express

[PATCH] D69406: [clang][ThinLTO] Promote cc1 -fthin_link_bitcode to driver -fthinlto_link_bitcode

2019-10-24 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. Thanks. Prefer the old name since it is already in use and since this is for the "thin link" phase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69406/new/ https://reviews.llvm.org/D69406

[PATCH] D69327: [Clang][ThinLTO] Add a cache for compile phase output.

2019-10-23 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. I haven't read through the patch in detail yet, but from the description it sounds like a cache is being added for the compile step outputs, e.g. the bitcode output object of the "clang -flto=thin -c" step? Typically the build system takes care of incremental build

[PATCH] D69327: [Clang][ThinLTO] Add a cache for compile phase output.

2019-10-23 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. I was just typing up a response similar to @steven_wu 's response... I don't think clang should be in the business of caching the outputs of a prior clang invocation, the build system should and usually does avoid re-executing if the inputs have not changed. Note

[PATCH] D69327: [Clang][ThinLTO] Add a cache for compile phase output.

2019-10-23 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D69327#1719295 , @tejohnson wrote: > I was just typing up a response similar to @steven_wu 's response... I don't > think clang should be in the business of caching the outputs of a prior clang > invocation, the build

[PATCH] D67385: Pass -mcmodel to LTO plugin

2019-09-23 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. Typically -mcmodel is passed to the clang compile invocation which sets a module flag in the IR, which is then used by LTO (see calls to Module::setCodeModel() and Module::getCodeModel()). Why is it necessary to pass through the mcmodel passed to the link invocation?

[PATCH] D68029: [ThinLTO] Enable index-only WPD from clang

2019-09-25 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson created this revision. tejohnson added a reviewer: pcc. Herald added subscribers: arphaman, dexonsmith, steven_wu, inglorion, mehdi_amini. Herald added a project: clang. To trigger the index-only Whole Program Devirt support added to LLVM, we need to be able to specify

[PATCH] D73242: [WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP

2020-02-23 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. FYI I have reproduced the failure, and am starting to debug. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73242/new/ https://reviews.llvm.org/D73242 ___ cfe-commits mailing

[PATCH] D73242: [WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP

2020-02-26 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. Sent fix for review in D75201 . If the new problem showed up later and not when this one first went in, then it seems likely it is different than this issue. I'll see if I can reproduce and take a look. Repository: rG LLVM Github

[PATCH] D73242: [WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP

2020-02-26 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D73242#1894146 , @tejohnson wrote: > Sent fix for review in D75201 . > > If the new problem showed up later and not when this one first went in, then > it seems likely it is different than

[PATCH] D75655: [Docs] Document -lto-whole-program-visibility

2020-03-04 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson created this revision. tejohnson added a reviewer: pcc. Herald added subscribers: dexonsmith, steven_wu, hiraditya, inglorion. Herald added a project: clang. Documents interaction of linker option added in D71913 with LTO visibility. Repository: rG

[PATCH] D71913: [LTO/WPD] Enable aggressive WPD under LTO option

2020-03-04 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked an inline comment as done. tejohnson added inline comments. Comment at: clang/test/CodeGenCXX/lto-visibility-inference.cpp:73 c1->f(); - // ITANIUM-NOT: type.test{{.*}}!"_ZTS2C2" + // ITANIUM: type.test{{.*}}!"_ZTS2C2" // MS: type.test{{.*}}!"?AUC2@@"

[PATCH] D61634: [clang/llvm] Allow efficient implementation of libc's memory functions in C/C++

2020-02-28 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. The last patch from my side just went in (D74162 : [Inliner] Inlining should honor nobuiltin attributes). So I think this is now complete. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D75655: [Docs] Document -lto-whole-program-visibility

2020-03-05 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 248582. tejohnson marked an inline comment as done. tejohnson added a comment. Fix gold plugin option Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75655/new/ https://reviews.llvm.org/D75655 Files:

[PATCH] D75655: [Docs] Document -lto-whole-program-visibility

2020-03-05 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked 3 inline comments as done. tejohnson added a subscriber: evgeny777. tejohnson added inline comments. Comment at: clang/docs/LTOVisibility.rst:40 +to hidden LTO visibility when the ``-lto-whole-program-visibility`` lld linker +option is applied

[PATCH] D73242: [WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP

2020-03-02 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. Reverted in 80bf137fa132ea33204e98bbefa924afe9258a4e Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73242/new/ https://reviews.llvm.org/D73242

[PATCH] D73242: [WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP

2020-02-26 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D73242#1888295 , @tejohnson wrote: > FYI I have reproduced the failure, and am starting to debug. I see what is going on and have a simple fix, just need to create a test case. Expect to send a patch to fix this today,

[PATCH] D71913: [LTO/WPD] Enable aggressive WPD under LTO option

2020-01-23 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. FYI I reverted this in rG90e630a95ecc due to a cfi test failure in a windows sanitizer bot. Not sure what is happening, I'll need to try to debug it somehow tomorrow. Repository: rG LLVM Github

[PATCH] D73418: [WPD] Emit vcall_visibility metadata for MicrosoftCXXABI

2020-01-25 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. I fixed the test matching as I found that the names generated for the anonymous namespace comdats depend on the module identifier in some way. I changed the matching to look at the struct type embedded in the initializer, which is also more intuitive. I also moved

[PATCH] D73418: [WPD] Emit vcall_visibility metadata for MicrosoftCXXABI

2020-01-25 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 240395. tejohnson added a comment. Improve test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73418/new/ https://reviews.llvm.org/D73418 Files: clang/lib/CodeGen/MicrosoftCXXABI.cpp

[PATCH] D71907: [WPD/VFE] Always emit vcall_visibility metadata for -fwhole-program-vtables

2020-01-23 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked 2 inline comments as done. tejohnson added inline comments. Comment at: llvm/lib/Transforms/IPO/GlobalSplit.cpp:116 +if (GV.hasMetadata(LLVMContext::MD_vcall_visibility)) + SplitGV->setVCallVisibilityMetadata(GV.getVCallVisibility()); }

[PATCH] D71907: [WPD/VFE] Always emit vcall_visibility metadata for -fwhole-program-vtables

2020-01-23 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 239888. tejohnson marked an inline comment as done. tejohnson added a comment. Test GlobalSplit handling of vcall_visibility metadata Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71907/new/

[PATCH] D71913: [LTO/WPD] Enable aggressive WPD under LTO option

2020-01-23 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 239890. tejohnson added a comment. Implement suggestion Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71913/new/ https://reviews.llvm.org/D71913 Files: clang/lib/CodeGen/BackendUtil.cpp

[PATCH] D71913: [LTO/WPD] Enable aggressive WPD under LTO option

2020-01-27 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D71913#1837872 , @tejohnson wrote: > FYI I reverted this in rG90e630a95ecc > due to > a cfi test failure in a windows sanitizer bot. Not sure what is

[PATCH] D73242: [WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP

2020-02-04 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked an inline comment as done. tejohnson added inline comments. Comment at: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp:1678 +// breaks any uses on assumes. +if (TypeIdMap.count(TypeId)) + continue; evgeny777 wrote: > tejohnson

[PATCH] D73242: [WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP

2020-02-05 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D73242#186 , @thakis wrote: > This makes lld crash when linking chromium's base_unittests and probably does > the same for most other binaries that use both thinlto and cfi: >

[PATCH] D73242: [WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP

2020-01-30 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D73242#1849484 , @tejohnson wrote: > Both of these approaches need the type tests to determine the correct address > point offset (the offset in the type test) to use in the compare sequence. I typed this too fast - the

[PATCH] D73242: [WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP

2020-02-03 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked 3 inline comments as done. tejohnson added inline comments. Comment at: llvm/include/llvm/IR/ModuleSummaryIndex.h:830 enum Kind { +Unknown, ///< Unknown (analysis not performed, don't lower) Unsat, ///< Unsatisfiable type (i.e. no global has

[PATCH] D73242: [WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP

2020-02-05 Thread Teresa Johnson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG748bb5a0f196: [WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP (authored by tejohnson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D71907: [WPD/VFE] Always emit vcall_visibility metadata for -fwhole-program-vtables

2020-01-23 Thread Teresa Johnson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG458676db6e41: [WPD/VFE] Always emit vcall_visibility metadata for -fwhole-program-vtables (authored by tejohnson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D71911: [ThinLTO] Summarize vcall_visibility metadata

2020-01-23 Thread Teresa Johnson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9c2eb220edd5: [ThinLTO] Summarize vcall_visibility metadata (authored by tejohnson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71911/new/

[PATCH] D73418: [WPD] Emit vcall_visibility metadata for MicrosoftCXXABI

2020-01-25 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson created this revision. tejohnson added a reviewer: evgeny777. Herald added a subscriber: Prazek. Herald added a project: clang. The MicrosoftCXXABI uses a separate mechanism for emitting vtable type metadata, and thus didn't pick up the change from D71907

[PATCH] D73418: [WPD] Emit vcall_visibility metadata for MicrosoftCXXABI

2020-01-27 Thread Teresa Johnson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGaf954e441a51: [WPD] Emit vcall_visibility metadata for MicrosoftCXXABI (authored by tejohnson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73418/new/

[PATCH] D73242: [WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP

2020-02-04 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 242493. tejohnson added a comment. Rebase and implement suggestion (move Unknown to end and bump index version) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73242/new/ https://reviews.llvm.org/D73242

[PATCH] D73242: [WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP

2020-02-05 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked an inline comment as done. tejohnson added inline comments. Comment at: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp:1678 +// breaks any uses on assumes. +if (TypeIdMap.count(TypeId)) + continue; evgeny777 wrote: > tejohnson

[PATCH] D73242: [WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP

2020-02-04 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked an inline comment as done. tejohnson added inline comments. Comment at: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp:1678 +// breaks any uses on assumes. +if (TypeIdMap.count(TypeId)) + continue; evgeny777 wrote: > tejohnson

[PATCH] D73242: [WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP

2020-01-30 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked an inline comment as done. tejohnson added a comment. In D73242#1847051 , @evgeny777 wrote: > > This is an enabler for upcoming enhancements to indirect call promotion, > > for example streamlined promotion guard sequences that compare

[PATCH] D71913: [LTO/WPD] Enable aggressive WPD under LTO option

2020-01-23 Thread Teresa Johnson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG59733525d37c: [LTO/WPD] Enable aggressive WPD under LTO option (authored by tejohnson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71913/new/

[PATCH] D74591: [Driver] Rename AddGoldPlugin to addLTOOptions. NFC

2020-02-14 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson accepted this revision. tejohnson added a comment. This revision is now accepted and ready to land. lgtm Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74591/new/ https://reviews.llvm.org/D74591

[PATCH] D73242: [WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP

2020-02-11 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked an inline comment as done. tejohnson added a comment. In D73242#1861125 , @tejohnson wrote: > In D73242#186 , @thakis wrote: > > > This makes lld crash when linking chromium's base_unittests

[PATCH] D72538: [ThinLTO] Add additional ThinLTO pipeline testing with new PM

2020-01-10 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson created this revision. tejohnson added a reviewer: wmi. Herald added subscribers: jfb, dexonsmith, steven_wu, hiraditya, inglorion, mehdi_amini. Herald added projects: clang, LLVM. I've added some more extensive ThinLTO pipeline testing with the new PM, motivated by the bug fixed in

[PATCH] D72538: [ThinLTO] Add additional ThinLTO pipeline testing with new PM

2020-01-10 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 237427. tejohnson added a comment. Remove some cruft Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72538/new/ https://reviews.llvm.org/D72538 Files: clang/test/CodeGen/thinlto-distributed-newpm.ll

[PATCH] D72523: [remark][diagnostics] Using clang diagnostic handler for IR input files

2020-01-10 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. Thanks for fixing this missing -Rpass support! Comment at: clang/lib/CodeGen/CodeGenAction.cpp:594 + // SourceLoc. + if (Context == nullptr) { +return FullSourceLoc(); Does this only happen with IR input? Does it always happen

[PATCH] D72547: [llvm] Make new pass manager's OptimizationLevel a class

2020-01-10 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. I just have a few high level comments from looking through it just now. The summary needs a fix since Os/Oz are in fact O2 so OptLevel > 1 was not doing the wrong thing. Comment at:

[PATCH] D72538: [ThinLTO] Add additional ThinLTO pipeline testing with new PM

2020-01-10 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked 2 inline comments as done. tejohnson added a comment. In D72538#1815074 , @wmi wrote: > The additional pipeline testing will catch any future pass change to the > pipeline. A related but separate question is do we have a way to check >

[PATCH] D72538: [ThinLTO] Add additional ThinLTO pipeline testing with new PM

2020-01-10 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 237462. tejohnson marked an inline comment as done. tejohnson added a comment. Implement suggestion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72538/new/ https://reviews.llvm.org/D72538 Files:

[PATCH] D72547: [llvm] Make new pass manager's OptimizationLevel a class

2020-01-15 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson accepted this revision. tejohnson added a comment. This revision is now accepted and ready to land. LGTM One thing to consider changing/removing in the summary is this comment: "For example, (enum) "Level > 1" captures not only O2 and O3

[PATCH] D71913: [LTO/WPD] Enable aggressive WPD under LTO option

2020-01-16 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked 2 inline comments as done. tejohnson added inline comments. Comment at: llvm/test/Transforms/WholeProgramDevirt/import-indir.ll:2 ; Test that we correctly import an indir resolution for type identifier "typeid1". -; RUN: opt -S -wholeprogramdevirt

[PATCH] D71911: [ThinLTO] Summarize vcall_visibility metadata

2020-01-16 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D71911#1823497 , @evgeny777 wrote: > I think this has to be rebased - I see multiple failures when trying to apply I'll rebase it today. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D72245: [PoC][RISCV][LTO] Pass target-abi via module flag metadata

2020-01-13 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added inline comments. Comment at: llvm/lib/LTO/LTOBackend.cpp:151 + TargetMachine::initTargetOptions(M, Conf.Options); + This is going to be problematic. The Conf is a reference to the Config object saved on the LTO class instance shared by all

[PATCH] D72245: [PoC][RISCV][LTO] Pass target-abi via module flag metadata

2020-01-13 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added inline comments. Comment at: llvm/lib/LTO/LTOBackend.cpp:151 + TargetMachine::initTargetOptions(M, Conf.Options); + lenary wrote: > tejohnson wrote: > > This is going to be problematic. The Conf is a reference to the Config > > object saved

[PATCH] D72624: [WIP] TargetMachine Hook for Module Metadata

2020-01-13 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. I'm not sure if ThinLTOCodeGenerator.cpp and LTOBackend.cpp were intentionally left out due to the LTO concerns mentioned in the description? Note if we are just passing in the Module and updating the TM based on that, it wouldn't hit the threading issue I mentioned

[PATCH] D72538: [ThinLTO] Add additional ThinLTO pipeline testing with new PM

2020-01-13 Thread Teresa Johnson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2af97be8027a: [ThinLTO] Add additional ThinLTO pipeline testing with new PM (authored by tejohnson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D72523: [remark][diagnostics] Using clang diagnostic handler for IR input files

2020-01-13 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added inline comments. Comment at: clang/lib/CodeGen/CodeGenAction.cpp:594 + // SourceLoc. + if (Context == nullptr) { +return FullSourceLoc(); xur wrote: > tejohnson wrote: > > Does this only happen with IR input? Does it always happen with IR

[PATCH] D72245: [PoC][RISCV][LTO] Pass target-abi via module flag metadata

2020-01-13 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added inline comments. Comment at: llvm/lib/LTO/LTOBackend.cpp:151 + TargetMachine::initTargetOptions(M, Conf.Options); + lenary wrote: > tejohnson wrote: > > lenary wrote: > > > tejohnson wrote: > > > > This is going to be problematic. The Conf is

[PATCH] D71913: [LTO/WPD] Enable aggressive WPD under LTO option

2020-01-14 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked 9 inline comments as done. tejohnson added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:559 + if (!CodeGenOpts.ThinLTOIndexFile.empty()) +MPM.add(createLowerTypeTestsPass(/*ExportSummary=*/nullptr, +

[PATCH] D71913: [LTO/WPD] Enable aggressive WPD under LTO option

2020-01-14 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 238048. tejohnson marked 2 inline comments as done. tejohnson added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71913/new/ https://reviews.llvm.org/D71913 Files:

[PATCH] D72624: [WIP] TargetMachine Hook for Module Metadata

2020-01-14 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D72624#1820598 , @dblaikie wrote: > (just a general comment that this code review should be only in service of > the design discussion happening on llvm-dev - please don't approve/commit > this without closing out the

[PATCH] D72624: [WIP] TargetMachine Hook for Module Metadata

2020-01-14 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D72624#1820281 , @lenary wrote: > In D72624#1817464 , @tejohnson wrote: > > > > > > Thank you for your feedback! It has been very helpful. > > > I'm not sure if

[PATCH] D72523: [remark][diagnostics] Using clang diagnostic handler for IR input files

2020-01-13 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson accepted this revision. tejohnson added a comment. This revision is now accepted and ready to land. LGTM. One more request for a comment below that I forgot to add earlier. Comment at: clang/lib/CodeGen/CodeGenAction.cpp:154 } +BackendConsumer(BackendAction

[PATCH] D72547: [llvm] Make new pass manager's OptimizationLevel a class

2020-01-14 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. Overall I like this approach. Comment at: llvm/lib/Passes/PassBuilder.cpp:246 -static bool isOptimizingForSize(PassBuilder::OptimizationLevel Level) { - switch (Level) { - case PassBuilder::O0: - case PassBuilder::O1: - case PassBuilder::O2: -

[PATCH] D72624: [WIP] TargetMachine Hook for Module Metadata

2020-01-14 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. From an LTO perspective, this seems fine for the reasons we discussed here. I looked through the patch and have a few comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:818 + if (TM) { +TM->initializeOptionsWithModuleMetadata(*TheModule);

[PATCH] D71913: [LTO/WPD] Enable aggressive WPD under LTO option

2020-01-22 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked an inline comment as done. tejohnson added inline comments. Comment at: clang/test/CodeGenCXX/lto-visibility-inference.cpp:73 c1->f(); - // ITANIUM-NOT: type.test{{.*}}!"_ZTS2C2" + // ITANIUM: type.test{{.*}}!"_ZTS2C2" // MS: type.test{{.*}}!"?AUC2@@"

[PATCH] D71913: [LTO/WPD] Enable aggressive WPD under LTO option

2020-01-22 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 239646. tejohnson added a comment. Address remaining comment by blocking type test insertion for public std visibility Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71913/new/

[PATCH] D73242: [WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP

2020-01-22 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson created this revision. tejohnson added reviewers: pcc, evgeny777. Herald added subscribers: arphaman, dexonsmith, steven_wu, hiraditya, Prazek, mehdi_amini. Herald added projects: clang, LLVM. Currently type test assume sequences inserted for devirtualization are removed during WPD.

[PATCH] D73242: [WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP

2020-01-22 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked an inline comment as done. tejohnson added inline comments. Comment at: llvm/test/Transforms/WholeProgramDevirt/uniform-retval.ll:28 %result = call i32 %fptr_casted(i8* %obj) - ; CHECK-NOT: call + ; CHECK-NOT: call i32 % ; CHECK: ret i32 123

[PATCH] D71907: [WPD/VFE] Always emit vcall_visibility metadata for -fwhole-program-vtables

2020-01-16 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 238561. tejohnson added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71907/new/ https://reviews.llvm.org/D71907 Files: clang/lib/CodeGen/CGVTables.cpp

[PATCH] D71913: [LTO/WPD] Enable aggressive WPD under LTO option

2020-01-16 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 238569. tejohnson added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71913/new/ https://reviews.llvm.org/D71913 Files: clang/lib/CodeGen/BackendUtil.cpp clang/lib/CodeGen/CGClass.cpp

[PATCH] D71911: [ThinLTO] Summarize vcall_visibility metadata

2020-01-16 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 238565. tejohnson added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71911/new/ https://reviews.llvm.org/D71911 Files: clang/test/CodeGenCXX/vcall-visibility-metadata.cpp

[PATCH] D71907: [WPD/VFE] Always emit vcall_visibility metadata for -fwhole-program-vtables

2020-01-21 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 239406. tejohnson added a comment. Remove stale change that didn't belong here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71907/new/ https://reviews.llvm.org/D71907 Files:

[PATCH] D71907: [WPD/VFE] Always emit vcall_visibility metadata for -fwhole-program-vtables

2020-01-21 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked an inline comment as done. tejohnson added inline comments. Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:676 + bool ShouldEmitWPDInfo = CGM.getCodeGenOpts().WholeProgramVTables && + CGM.HasHiddenLTOVisibility(RD); llvm::Value

[PATCH] D71911: [ThinLTO] Summarize vcall_visibility metadata

2020-01-21 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 239412. tejohnson added a comment. Address comment and rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71911/new/ https://reviews.llvm.org/D71911 Files:

[PATCH] D71913: [LTO/WPD] Enable aggressive WPD under LTO option

2020-01-20 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked 4 inline comments as done. tejohnson added inline comments. Comment at: llvm/test/Transforms/WholeProgramDevirt/import-indir.ll:2 ; Test that we correctly import an indir resolution for type identifier "typeid1". -; RUN: opt -S -wholeprogramdevirt

[PATCH] D71913: [LTO/WPD] Enable aggressive WPD under LTO option

2020-01-20 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 239214. tejohnson marked 2 inline comments as done. tejohnson added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71913/new/ https://reviews.llvm.org/D71913 Files:

[PATCH] D71913: [LTO/WPD] Enable aggressive WPD under LTO option

2020-01-21 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked 5 inline comments as done. tejohnson added inline comments. Comment at: clang/test/CodeGenCXX/lto-visibility-inference.cpp:73 c1->f(); - // ITANIUM-NOT: type.test{{.*}}!"_ZTS2C2" + // ITANIUM: type.test{{.*}}!"_ZTS2C2" // MS: type.test{{.*}}!"?AUC2@@"

[PATCH] D71913: [LTO/WPD] Enable aggressive WPD under LTO option

2020-01-21 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 239428. tejohnson marked 2 inline comments as done. tejohnson added a comment. Address comments and rebase. Also apply modified change to ItaniumCXXABI.cpp and a change to an associated test (cfi-mfcall.cpp) here as discussed in child revision D71907

[PATCH] D70765: LTOVisibility.rst: fix up syntax in example

2020-01-08 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D70765#1807609 , @dankamongmen wrote: > > Typically the author commits the patch, unless they don't have commit > > access and request the reviewer to commit for them, but I don't see a > > request for that here. > >

[PATCH] D70765: LTOVisibility.rst: fix up syntax in example

2020-01-08 Thread Teresa Johnson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG43f938eddc8a: LTOVisibility.rst: fix up syntax in example (authored by tejohnson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70765/new/

[PATCH] D71911: [ThinLTO] Summarize vcall_visibility metadata

2019-12-26 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson created this revision. tejohnson added reviewers: pcc, evgeny777, steven_wu. Herald added subscribers: arphaman, dexonsmith, hiraditya, inglorion, Prazek, mehdi_amini. Herald added projects: clang, LLVM. Second patch in series to support Safe Whole Program Devirtualization Enablement,

[PATCH] D71907: [WPD/VFE] Always emit vcall_visibility metadata for -fwhole-program-vtables

2019-12-26 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson created this revision. tejohnson added reviewers: pcc, ostannard, evgeny777, steven_wu. Herald added subscribers: dexonsmith, hiraditya, Prazek, mehdi_amini. Herald added projects: clang, LLVM. First patch to support Safe Whole Program Devirtualization Enablement, see RFC here:

[PATCH] D71907: [WPD/VFE] Always emit vcall_visibility metadata for -fwhole-program-vtables

2019-12-26 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked an inline comment as done. tejohnson added inline comments. Comment at: llvm/lib/IR/Metadata.cpp:1505 + // updating. + eraseMetadata(LLVMContext::MD_vcall_visibility); addMetadata(LLVMContext::MD_vcall_visibility, The erasing of old

[PATCH] D71913: [LTO/WPD] Enable aggressive WPD under LTO option

2019-12-26 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson created this revision. tejohnson added reviewers: pcc, evgeny777, steven_wu. Herald added subscribers: dang, dexonsmith, MaskRay, hiraditya, arichardson, inglorion, Prazek, emaste. Herald added a reviewer: espindola. Herald added projects: clang, LLVM. Third part in series to support

[PATCH] D71911: [ThinLTO] Summarize vcall_visibility metadata

2019-12-29 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 235509. tejohnson added a comment. Implement suggested name change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71911/new/ https://reviews.llvm.org/D71911 Files: clang/lib/CodeGen/CGVTables.cpp

[PATCH] D71911: [ThinLTO] Summarize vcall_visibility metadata

2019-12-29 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 235510. tejohnson added a comment. Attempt to fix patch to not include parent revision changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71911/new/ https://reviews.llvm.org/D71911 Files:

[PATCH] D71907: [WPD/VFE] Always emit vcall_visibility metadata for -fwhole-program-vtables

2019-12-27 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D71907#1797218 , @evgeny777 wrote: > Looks good at first sight. Do you have linker patch for me to try this out? The linker changes are in D71913 . This one should be a noop by itself

[PATCH] D70765: LTOVisibility.rst: fix up syntax in example

2020-01-06 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D70765#1802564 , @dankamongmen wrote: > I hate to bother anyone, but can this go ahead and get merged? :) thanks Typically the author commits the patch, unless they don't have commit access and request the reviewer to

[PATCH] D61634: [clang/llvm] Allow efficient implementation of libc's memory functions in C/C++

2020-01-07 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D61634#1515176 , @tejohnson wrote: > In D61634#1512020 , @gchatelet wrote: > > > AFAIU here is a coarse plan of what needs to happen > I've listed below what I believe is the status:

[PATCH] D75655: [Docs] Document -lto-whole-program-visibility

2020-03-11 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75655/new/ https://reviews.llvm.org/D75655 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2020-04-08 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. Needs testing of the inline handling, and of LTO linking IR with different attributes (which is going to hit your assert, see below). Comment at: clang/lib/CodeGen/CGCall.cpp:1987 + // Attach "vect-lib" attribute to function based on '-fveclib'

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

2020-04-09 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. Great, thanks! A few minor comments below. Looks like it needs a clang-format too. Comment at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:272 +else + VectLibrary = Impl.ClVectorLibrary; + Suggest moving the

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

2020-04-09 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson accepted this revision. tejohnson added a comment. This revision is now accepted and ready to land. lgtm. I think one check is missing in the test, see comment below. Comment at: llvm/test/Transforms/Inline/veclib-compat.ll:28 + %rslt = call i32 @callee_massv(i8

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

2020-04-09 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added inline comments. Comment at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:272 +else + VectLibrary = Impl.ClVectorLibrary; + wenlei wrote: > tejohnson wrote: > > Suggest moving the implementation of this constructor to the .cpp file, in

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

2020-04-10 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D77632#1974363 , @wenlei wrote: > 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-13 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D77632#1976308 , @mehdi_amini wrote: > In D77632#1976231 , @wenlei wrote: > > > And agree with @tejohnson, if the openness is a feature, it should be > > covered in tests, otherwise

[PATCH] D77989: Allow disabling of vectorization using internal options

2020-04-14 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 257562. tejohnson added a comment. Address comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77989/new/ https://reviews.llvm.org/D77989 Files: clang/test/CodeGen/thinlto-loop-vectorize-pm.c

[PATCH] D77989: Allow disabling of vectorization using internal options

2020-04-14 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked an inline comment as done. tejohnson added inline comments. Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7618-7621 +: InterleaveOnlyWhenForced(Opts.InterleaveOnlyWhenForced | + !EnableLoopInterleaving), +

<    1   2   3   4   5   6   7   >