[PATCH] D149800: [WIP][PGO] Add ability to mark cold functions as optsize/minsize/optnone

2023-05-11 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added a comment. In D149800#4330831 , @davidxl wrote: > This patch uses a cleaner method than the previous effort. There is some > differences: > > 1. yamauchi's patch works for both iFDO and autoFDO, while this patch limits > to iFDO > 2.

[PATCH] D84782: [PGO] Include the mem ops into the function hash.

2020-08-03 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added a comment. In D84782#2191243 , @MaskRay wrote: > @yamauchi Do we need cd890944ad344b1b8cac58332ab11c9eec6b61e9 > and > 3d6f53018f845e893ad34f64ff2851a2e5c3ba1d >

[PATCH] D84782: [PGO] Include the mem ops into the function hash.

2020-07-30 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added a comment. Yup, -pgo-instr-old-cfg-hashing=true to revert back to the old hashing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84782/new/ https://reviews.llvm.org/D84782 ___ cfe-commits

[PATCH] D84782: [PGO] Include the mem ops into the function hash.

2020-07-29 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added a comment. Latest update diff: < + std::vector Data; < + for (unsigned I = 0; I < 8; ++I) < +Data.push_back((uint8_t)(Num >> (I * 8))); --- > + uint8_t Data[8]; > + support::endian::write64le(Data, Num); Comment at:

[PATCH] D84782: [PGO] Include the mem ops into the function hash.

2020-07-29 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi updated this revision to Diff 281764. yamauchi added a comment. Use endian::write64le. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84782/new/ https://reviews.llvm.org/D84782 Files: clang/test/CodeGen/Inputs/thinlto_expect1.proftext

[PATCH] D84782: [PGO] Include the mem ops into the function hash.

2020-07-29 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added a comment. Here's the diff in the latest update: < +union { < + uint64_t N; < + uint8_t C[8]; < +} Data; < +Data.N = (uint64_t)SIVisitor.getNumOfSelectInsts(); < +JCH.update(Data.C); < +Data.N =

[PATCH] D84782: [PGO] Include the mem ops into the function hash.

2020-07-29 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:661 +} Data; +Data.N = (uint64_t)SIVisitor.getNumOfSelectInsts(); +JCH.update(Data.C); MaskRay wrote: > MaskRay wrote: > > `#include

[PATCH] D84782: [PGO] Include the mem ops into the function hash.

2020-07-29 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi updated this revision to Diff 281760. yamauchi added a comment. Fix the endianness issue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84782/new/ https://reviews.llvm.org/D84782 Files:

[PATCH] D84782: [PGO] Include the mem ops into the function hash.

2020-07-29 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added a comment. Builtbot failure: http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/51984 I think it's an endian issue in the hash computation. Will revert. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84782/new/

[PATCH] D84782: [PGO] Include the mem ops into the function hash.

2020-07-29 Thread Hiroshi Yamauchi 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 rG120e66b3418b: [PGO] Include the mem ops into the function hash. (authored by yamauchi). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D84782: [PGO] Include the mem ops into the function hash.

2020-07-29 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi updated this revision to Diff 281716. yamauchi added a comment. Address comments. PTAL. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84782/new/ https://reviews.llvm.org/D84782 Files: clang/test/CodeGen/Inputs/thinlto_expect1.proftext

[PATCH] D84782: [PGO] Include the mem ops into the function hash.

2020-07-29 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added inline comments. Comment at: llvm/test/Transforms/PGOProfile/Inputs/multiple_hash_profile.proftext:20 18 12 davidxl wrote: > nit: change 12 to a different value say 6.(otherwise if the option is an nop, > the test will still succeed). Done.

[PATCH] D84782: [PGO] Include the mem ops into the function hash.

2020-07-29 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added inline comments. Comment at: llvm/test/Transforms/PGOProfile/Inputs/multiple_hash_profile.proftext:1 # IR level Instrumentation Flag :ir davidxl wrote: > We can convert this test case to cover the new option introduced: > > basically create

[PATCH] D84782: [PGO] Include the mem ops into the function hash.

2020-07-29 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi updated this revision to Diff 281708. yamauchi added a comment. Address comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84782/new/ https://reviews.llvm.org/D84782 Files: clang/test/CodeGen/Inputs/thinlto_expect1.proftext

[PATCH] D84782: [PGO] Include the mem ops into the function hash.

2020-07-29 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi updated this revision to Diff 281673. yamauchi added a comment. Rebase past D84865 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84782/new/ https://reviews.llvm.org/D84782 Files:

[PATCH] D84782: [PGO] Include the mem ops into the function hash.

2020-07-29 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added a comment. In D84782#2180626 , @davidxl wrote: > changes like in llvm/test/Transforms/PGOProfile/PR41279.ll etc can be > independently committed. Uploaded D84865 for this. Repository: rG LLVM Github

[PATCH] D84782: [PGO] Include the mem ops into the function hash.

2020-07-29 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:266 +PGOOldCFGHashing("pgo-instr-old-cfg-hashing", cl::init(false), cl::Hidden, + cl::desc("Use the old CFG function hashing.")); +

[PATCH] D84782: [PGO] Include the mem ops into the function hash.

2020-07-29 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi updated this revision to Diff 281626. yamauchi added a comment. Address comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84782/new/ https://reviews.llvm.org/D84782 Files: clang/test/CodeGen/Inputs/thinlto_expect1.proftext

[PATCH] D84782: [PGO] Include the mem ops into the function hash.

2020-07-28 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added a comment. In D84782#2180578 , @davidxl wrote: > Can you split out the test changes and commit it separately? How exactly? Do you mean commit the non-test part without flipping the flag and then flip it with the test changes?

[PATCH] D84782: [PGO] Include the mem ops into the function hash.

2020-07-28 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi updated this revision to Diff 281426. yamauchi added a comment. Rebase (converting one more test) and fixing a typo and whitespace. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84782/new/ https://reviews.llvm.org/D84782 Files:

[PATCH] D84782: [PGO] Include the mem ops into the function hash.

2020-07-28 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added a comment. In D84782#2180432 , @davidxl wrote: > On version bump --- looks like FrontPGO has been bumping version for hashing > changes while IR PGO had not, so it is ok to leave the version unchanged > (current situation is also

[PATCH] D84782: [PGO] Include the mem ops into the function hash.

2020-07-28 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi updated this revision to Diff 281417. yamauchi added a comment. Add a flag to back out to the old hashing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84782/new/ https://reviews.llvm.org/D84782 Files:

[PATCH] D84782: [PGO] Include the mem ops into the function hash.

2020-07-28 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added a comment. > Many tests can also be enhanced to filter out the hash details if they are > not part the main test. Done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84782/new/ https://reviews.llvm.org/D84782

[PATCH] D84782: [PGO] Include the mem ops into the function hash.

2020-07-28 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi updated this revision to Diff 281407. yamauchi added a comment. Shift the higher 32 bits by 28 bits and add. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84782/new/ https://reviews.llvm.org/D84782 Files:

[PATCH] D84782: [PGO] Include the mem ops into the function hash.

2020-07-28 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:660 // information. - FunctionHash = (uint64_t)SIVisitor.getNumOfSelectInsts() << 56 | - (uint64_t)ValueSites[IPVK_IndirectCallTarget].size() << 48 | -

[PATCH] D84782: [PGO] Include the mem ops into the function hash.

2020-07-28 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:623 // Compute Hash value for the CFG: the lower 32 bits are CRC32 of the index -// value of each BB in the CFG. The higher 32 bits record the number of edges. +// value of

[PATCH] D84782: [PGO] Include the mem ops into the function hash.

2020-07-28 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:642 // Hash format for context sensitive profile. Reserve 4 bits for other // information. davidxl wrote: > The comment looks stale. I think the 4 bits

[PATCH] D84782: [PGO] Include the mem ops into the function hash.

2020-07-28 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi updated this revision to Diff 281364. yamauchi added a comment. Herald added subscribers: cfe-commits, dexonsmith, steven_wu. Herald added a project: clang. Use JamCRC. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84782/new/

[PATCH] D82586: [HIP] Improve check patterns to avoid test failures in case string "opt", etc. happens to be in the command path.

2020-06-25 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9da93f590414: [HIP] Improve check patterns to avoid test failures in case string opt, etc. (authored by yamauchi). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D82586: [HIP] Improve check patterns to avoid test failures in case string "opt", etc. happens to be in the command path.

2020-06-25 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi created this revision. yamauchi added reviewers: arsenm, yaxunl. Herald added subscribers: cfe-commits, wdng. Herald added a project: clang. Similarly to D82046 . Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D82586 Files:

[PATCH] D82046: [HIP] Improve check patterns to avoid test failures in case string "opt",etc. happens to be in the InstallDir path in the -### output.

2020-06-18 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGce82b8e8af6d: [HIP] Improve check patterns to avoid test failures in case string opt, etc. (authored by yamauchi). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D81861: [HIP] Do not use llvm-link/opt/llc for -fgpu-rdc

2020-06-17 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added inline comments. Comment at: clang/test/Driver/hip-toolchain-no-rdc.hip:164 +// LKONLY-NOT: llvm-link +// LKONLY-NOT: opt +// LKONLY-NOT: llc yaxunl wrote: > arsenm wrote: > > yamauchi wrote: > > > Hi, this test seems to fail for me because I

[PATCH] D82046: [HIP] Improve check patterns to avoid test failures in case string "opt",etc. happens to be in the InstallDir path in the -### output.

2020-06-17 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added a comment. Context: https://reviews.llvm.org/D81861#inline-753520 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82046/new/ https://reviews.llvm.org/D82046 ___ cfe-commits mailing list

[PATCH] D82046: [HIP] Improve check patterns to avoid test failures in case string "opt",etc. happens to be in the InstallDir path in the -### output.

2020-06-17 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi created this revision. yamauchi added a reviewer: yaxunl. Herald added a project: clang. Herald added a subscriber: cfe-commits. yamauchi added a comment. Context: https://reviews.llvm.org/D81861#inline-753520 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D82046

[PATCH] D81861: [HIP] Do not use llvm-link/opt/llc for -fgpu-rdc

2020-06-16 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added inline comments. Comment at: clang/test/Driver/hip-toolchain-no-rdc.hip:164 +// LKONLY-NOT: llvm-link +// LKONLY-NOT: opt +// LKONLY-NOT: llc Hi, this test seems to fail for me because I happen to have the string "opt" in the "InstallDir" file

[PATCH] D69591: Devirtualize a call on alloca without waiting for post inline cleanup and next DevirtSCCRepeatedPass iteration.

2020-02-27 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added a comment. Here's a fix: https://reviews.llvm.org/D75307 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69591/new/ https://reviews.llvm.org/D69591 ___ cfe-commits mailing list

[PATCH] D69591: Devirtualize a call on alloca without waiting for post inline cleanup and next DevirtSCCRepeatedPass iteration.

2020-02-27 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added a comment. This was reverted due to some internal compilation crashes as https://github.com/llvm/llvm-project/commit/4569b3a86f8a4b1b8ad28fe2321f936f9d7ffd43 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69591/new/

[PATCH] D69591: Devirtualize a call on alloca without waiting for post inline cleanup and next DevirtSCCRepeatedPass iteration.

2020-02-26 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi closed this revision. yamauchi added a comment. Committed as https://reviews.llvm.org/rG59fb9cde7a4a Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69591/new/ https://reviews.llvm.org/D69591

[PATCH] D69591: Devirtualize a call on alloca without waiting for post inline cleanup and next DevirtSCCRepeatedPass iteration.

2020-02-11 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi updated this revision to Diff 243911. yamauchi added a comment. Rebase past D71308 . PTAL. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69591/new/ https://reviews.llvm.org/D69591 Files:

[PATCH] D69591: Devirtualize a call on alloca without waiting for post inline cleanup and next DevirtSCCRepeatedPass iteration.

2020-02-03 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi updated this revision to Diff 242103. yamauchi added a comment. Fix typo. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69591/new/ https://reviews.llvm.org/D69591 Files: clang/test/CodeGenCXX/member-function-pointer-calls.cpp

[PATCH] D69591: Devirtualize a call on alloca without waiting for post inline cleanup and next DevirtSCCRepeatedPass iteration.

2020-01-31 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi updated this revision to Diff 241852. yamauchi added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Update clang/test/CodeGenCXX/member-function-pointer-calls.cpp which this change combined with D71308 enables

[PATCH] D66711: [clang] Warning for non-final classes with final destructors

2019-08-27 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi accepted this revision. yamauchi added a comment. LGTM. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66711/new/ https://reviews.llvm.org/D66711 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D66621: [clang] Devirtualization for classes with destructors marked as 'final'

2019-08-23 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added a comment. Nice. In D66621#1642142 , @rsmith wrote: > This seems subtle, but I believe it is correct. > > I wonder whether we should provide a warning for a non-final class has a > final destructor, since moving the `final` from the

[PATCH] D65975: [NewPM][PassInstrumentation] IR printing support from clang driver

2019-08-09 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added a comment. In D65975#1621892 , @twoh wrote: > @fedor.sergeev @yamauchi I saw your discussions over llvm-dev mailing list > regarding IR printing with the new pass manager, and though this might be the > reason why IR printing is not

[PATCH] D63161: Devirtualize destructor of final class.

2019-07-09 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added a comment. Recommitted as https://reviews.llvm.org/rL365509 Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63161/new/ https://reviews.llvm.org/D63161 ___ cfe-commits mailing list

[PATCH] D63161: Devirtualize destructor of final class.

2019-07-08 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added a comment. This was reverted due to some internal test failure. But it turned out a false alarm. I'll work on recommitting it. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63161/new/ https://reviews.llvm.org/D63161

[PATCH] D63161: Devirtualize destructor of final class.

2019-06-21 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364100: Devirtualize destructor of final class. (authored by yamauchi, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST

[PATCH] D63161: Devirtualize destructor of final class.

2019-06-21 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi updated this revision to Diff 206053. yamauchi marked 2 inline comments as done. yamauchi added a comment. Comments addressed. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63161/new/ https://reviews.llvm.org/D63161 Files: lib/CodeGen/CGExprCXX.cpp

[PATCH] D63161: Devirtualize destructor of final class.

2019-06-18 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi updated this revision to Diff 205381. yamauchi added a comment. Updated. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63161/new/ https://reviews.llvm.org/D63161 Files: lib/CodeGen/CGExprCXX.cpp test/CodeGenCXX/devirtualize-dtor-final.cpp Index:

[PATCH] D63161: Devirtualize destructor of final class.

2019-06-17 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi marked 2 inline comments as done. yamauchi added inline comments. Comment at: lib/CodeGen/CGExprCXX.cpp:1887 +Dtor = DevirtualizedDtor; +Ptr = CGF.EmitPointerWithAlignment(Inner); + } else { rsmith wrote: > In this case

[PATCH] D63161: Devirtualize destructor of final class.

2019-06-14 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi marked an inline comment as done. yamauchi added inline comments. Comment at: lib/CodeGen/CGExprCXX.cpp:1871 + CGF.CGM.getLangOpts().AppleKext))) + Dtor = DevirtualizedDtor; +else { rsmith

[PATCH] D63161: Devirtualize destructor of final class.

2019-06-14 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi updated this revision to Diff 204852. yamauchi marked an inline comment as done. yamauchi added a comment. Addressed comment. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63161/new/ https://reviews.llvm.org/D63161 Files: lib/CodeGen/CGExprCXX.cpp

[PATCH] D63161: Devirtualize destructor of final class.

2019-06-12 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi marked 2 inline comments as done. yamauchi added inline comments. Comment at: lib/CodeGen/CGExprCXX.cpp:1867-1868 - if (Dtor->isVirtual()) { + if (Dtor->isVirtual() && + !(Dtor->hasAttr() || RD->hasAttr())) {

[PATCH] D63161: Devirtualize destructor of final class.

2019-06-12 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi updated this revision to Diff 204365. yamauchi added a comment. Using getDevirtualizedMethod. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63161/new/ https://reviews.llvm.org/D63161 Files: lib/CodeGen/CGExprCXX.cpp

[PATCH] D63161: Devirtualize destructor of final class.

2019-06-11 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi created this revision. yamauchi added a reviewer: davidxl. Herald added a subscriber: Prazek. Herald added a project: clang. Take advantage of the final keyword to devirtualize destructor calls. Fix https://bugs.llvm.org/show_bug.cgi?id=21368 Repository: rC Clang