On Wed, Sep 30, 2015 at 11:11 AM, Duncan P. N. Exon Smith
wrote:
>
>> On 2015-Sep-30, at 10:40, Teresa Johnson wrote:
>>
>> On Wed, Sep 30, 2015 at 10:19 AM, Duncan P. N. Exon Smith
>> wrote:
>>>
On 2015-Sep-23, at 10:28, Teresa Johnson wrote:
tejohnson updated this revision to D
On Wed, Sep 30, 2015 at 2:33 PM, Duncan P. N. Exon Smith
wrote:
> +echristo, +espindola, +pcc
>
>> On 2015-Sep-30, at 12:39, Teresa Johnson wrote:
>>
>> On Wed, Sep 30, 2015 at 11:11 AM, Duncan P. N. Exon Smith
>> wrote:
>>>
On 2015-Sep-30, at 10:40, Teresa Johnson wrote:
On Wed,
tejohnson updated this revision to Diff 36267.
tejohnson added a comment.
Address review comments.
Instead of -fthinlto use -flto=thin, and add in -flto=full as an alias to the
existing -flto. Add tests to check for proper overriding of -flto variants on
the command line, and convert grep tests
tejohnson added a subscriber: tejohnson.
tejohnson added a comment.
Added echristo, rafael, pcc officially as subscribers as Duncan's cc
of them via email didn't stick.
http://reviews.llvm.org/D11908
___
cfe-commits mailing list
cfe-commits@lists.ll
tejohnson added a comment.
Sorry for the duplicate - my previous response didn't go to Duncan or Mehdi for
some reason. Trying again...
In http://reviews.llvm.org/D11908#258540, @klimek wrote:
> Perhaps "sharded" would fit what it is?
You could have a sharded mode for full FDO (like gcc's par
On Fri, Oct 2, 2015 at 8:53 AM, Manuel Klimek wrote:
> klimek added a comment.
>
> In http://reviews.llvm.org/D11908#258570, @tejohnson wrote:
>
>> Sorry for the duplicate - my previous response didn't go to Duncan or Mehdi
>> for some reason. Trying again...
>>
>> In http://reviews.llvm.org/D119
tejohnson updated this revision to Diff 36453.
tejohnson added a comment.
- Rename code gen option to EmitFunctionSummary as per review for
http://reviews.llvm.org/D13107.
- Clang format the latest changes.
Let me know if it looks good now.
http://reviews.llvm.org/D11908
Files:
include/cl
tejohnson updated the summary for this revision.
tejohnson updated this revision to Diff 31937.
tejohnson added a comment.
Removed gold plugin option.
http://reviews.llvm.org/D11908
Files:
include/clang/Driver/Options.td
include/clang/Frontend/CodeGenOptions.def
lib/CodeGen/BackendUtil.cp
tejohnson abandoned this revision.
tejohnson added a comment.
Obsolete, didn't need to do this.
http://reviews.llvm.org/D9717
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
tejohnson closed this revision.
tejohnson added a comment.
Committed awhile back as r236289, closing manually.
http://reviews.llvm.org/D9407
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c
tejohnson added inline comments.
Comment at: include/clang/Driver/Options.td:685
@@ -684,1 +684,3 @@
def fno_lto : Flag<["-"], "fno-lto">, Group;
+def fthinlto : Flag<["-"], "fthinlto">, Flags<[CC1Option]>, Group;
+def fno_thinlto : Flag<["-"], "fno-thinlto">, Group;
Hi Yaron,
Thanks, moving it earlier in general seems ok to me. I originally put
this right before the GlobalDCE calls because it was somewhat related.
I wonder if the createEliminateAvailableExternallyPass call for the
LTO pipeline should similarly be moved up closer to inlining, perhaps
after any
Hi Yaron,
This is to handle the case of pre-built (real .o) files.
The available externally functions are kept in the -c -flto compile
(the pass isn't run) so that they are available for inlining in the
LTO pipeline. If the available externally function is in a pre-built
object file it wouldn't be
Ping.
Thanks,
Teresa
On Sat, Oct 3, 2015 at 6:51 PM, Teresa Johnson wrote:
> tejohnson updated this revision to Diff 36453.
> tejohnson added a comment.
>
> - Rename code gen option to EmitFunctionSummary as per review for
> http://reviews.llvm.org/D13107.
> - Clang format the latest changes.
>
Author: tejohnson
Date: Thu Oct 15 08:08:13 2015
New Revision: 250398
URL: http://llvm.org/viewvc/llvm-project?rev=250398&view=rev
Log:
Clang support for -flto=thin.
Summary:
Add clang support for -flto=thin option, which is used to set the
EmitFunctionSummary code gen option on compiles.
Add -f
This revision was automatically updated to reflect the committed changes.
Closed by commit rL250398: Clang support for -flto=thin. (authored by
tejohnson).
Changed prior to commit:
http://reviews.llvm.org/D11908?vs=36453&id=37478#toc
Repository:
rL LLVM
http://reviews.llvm.org/D11908
Files
Author: tejohnson
Date: Thu Oct 15 08:41:51 2015
New Revision: 250402
URL: http://llvm.org/viewvc/llvm-project?rev=250402&view=rev
Log:
Revert "Clang support for -flto=thin." (bot failures)
Rolling this back for now since there are a couple of bot failures on
the new tests I added, and I won't ha
Author: tejohnson
Date: Thu Oct 15 15:35:53 2015
New Revision: 250455
URL: http://llvm.org/viewvc/llvm-project?rev=250455&view=rev
Log:
Recommit "Clang support for -flto=thin."
This recommits r250398 with fixes to the tests for bot failures.
Add "-target x86_64-unknown-linux" to the clang invoca
Author: tejohnson
Date: Thu Oct 15 16:06:53 2015
New Revision: 250460
URL: http://llvm.org/viewvc/llvm-project?rev=250460&view=rev
Log:
Add llvm-bcanalyzer to list of clang test dependences
This addresses a bot failure from r250455, since new Misc/thinlto.c
test uses it.
Modified:
cfe/trunk/
Author: tejohnson
Date: Mon Nov 2 12:03:12 2015
New Revision: 251813
URL: http://llvm.org/viewvc/llvm-project?rev=251813&view=rev
Log:
Clang format a few prior patches (NFC)
I had clang formatted my earlier patches using the wrong style.
Reformatted with the LLVM style.
Modified:
cfe/trunk/
Forwarding manually, since it appears when I manually added reviewers
(Rafael and Duncan) and cfe-commits as the subscriber in Phab, it only sent
email to Rafael.
Thanks,
Teresa
-- Forwarded message --
From: Teresa Johnson
Date: Mon, Aug 10, 2015 at 8:58 AM
Subject: [PATCH] D1190
tejohnson abandoned this revision.
tejohnson added a comment.
Abandoning as per klimek, need to add cfe-commit as subscriber during upload.
http://reviews.llvm.org/D11906
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/
tejohnson created this revision.
tejohnson added reviewers: rafael, dexonsmith.
tejohnson added a subscriber: cfe-commits.
Add clang support for -fthinlto option, which is used to set the
EmitThinLTOIndex code gen option on compiles, and the thinlto
gold plugin option on links.
Dependent on LLVM/
Author: tejohnson
Date: Fri Aug 12 13:12:08 2016
New Revision: 278541
URL: http://llvm.org/viewvc/llvm-project?rev=278541&view=rev
Log:
CodeGen: Replace ThinLTO backend implementation with a client of LTO/Resolution.
Summary:
This changes clang to use the llvm::lto::thinBackend function instead o
This revision was automatically updated to reflect the committed changes.
Closed by commit rL278541: CodeGen: Replace ThinLTO backend implementation with
a client of LTO/Resolution. (authored by tejohnson).
Changed prior to commit:
https://reviews.llvm.org/D21545?vs=64043&id=67868#toc
Reposito
tejohnson accepted this revision.
tejohnson added a comment.
This revision is now accepted and ready to land.
LGTM, thanks
http://reviews.llvm.org/D17272
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/l
Hi Eric,
I'm getting a build error:
In file included from
/usr/local/google/home/tejohnson/llvm/llvm_16/tools/clang/lib/Tooling/Refactoring.cpp:21:
/usr/local/google/home/tejohnson/llvm/llvm_16/tools/clang/include/clang/Tooling/Refactoring.h:32:1:
error: class 'FormatStyle' was previously declare
Author: tejohnson
Date: Wed Mar 30 08:59:49 2016
New Revision: 264868
URL: http://llvm.org/viewvc/llvm-project?rev=264868&view=rev
Log:
Prepare tests for change to emit Module SourceFileName to LLVM assembly
Modify these tests to ignore the source file name when looking for the
expected string. I
Author: tejohnson
Date: Tue Apr 19 21:23:52 2016
New Revision: 266852
URL: http://llvm.org/viewvc/llvm-project?rev=266852&view=rev
Log:
Enable ODR uniquing of DITypes for ThinLTO backends
Summary:
This is a follow-on to apply Duncan's new DIType ODR uniquing from
r266549 and r266713 in more place
tejohnson accepted this revision.
tejohnson added a comment.
This revision is now accepted and ready to land.
LGTM but with one question: Any issue with IR tests in clang tests? I noticed
that there are very few (although there is already one existing .ll in
test/CodeGen).
http://reviews.llvm.
tejohnson added a comment.
Sorry for the delay, comments below.
Comment at: lib/CodeGen/BackendUtil.cpp:733
@@ +732,3 @@
+ StringMap ExportLists;
+ ComputeCrossModuleImport(*CombinedIndex, ModuleToDefinedGVSummaries,
+ ImportLists, ExportLists);
-
tejohnson accepted this revision.
tejohnson added a comment.
This revision is now accepted and ready to land.
LGTM
Comment at: lib/CodeGen/BackendUtil.cpp:757
@@ +756,3 @@
+ }
+
+ lto::Config Conf;
Ok, please add a comment.
http://reviews.llvm.org/D21545
tejohnson added inline comments.
Comment at: lib/CodeGen/BackendUtil.cpp:758
@@ +757,3 @@
+
+ lto::Config Conf;
+ if (Error E = thinBackend(
Can we pass along -save-temps here (i.e. invoke Conf.addSaveTemps)?
http://reviews.llvm.org/D21545
_
tejohnson added a comment.
Note that this will have the side effect of enabling linkonce/weak resolution
and internalization for the distributed backends.
I had just sent a separate patch (https://reviews.llvm.org/D22356) to do the
former, which includes a fix for a subtle linking issue in the
tejohnson added inline comments.
Comment at: lib/CodeGen/BackendUtil.cpp:740
@@ +739,3 @@
+ ComputeCrossModuleImportForModule(M->getModuleIdentifier(), *CombinedIndex,
+ImportList);
+
mehdi_amini wrote:
> This should go away at
tejohnson added a subscriber: tejohnson.
tejohnson added a comment.
Thanks for doing this!
I will fix these 3, which one of my changes would have provoked. It is a benign
case since we do have an assert at the use site checking the same condition
that the inits are guarded with, but there is no
On Wed, Mar 9, 2016 at 8:13 AM, David Blaikie wrote:
>
> On Mar 9, 2016 8:11 AM, "Teresa Johnson via llvm-commits" <
> llvm-comm...@lists.llvm.org> wrote:
> >
> > tejohnson added a subscriber: tejohnson.
> > tejohnson added a comment.
> >
> > Thanks for doing this!
> >
> > I will fix these 3, whi
On Wed, Mar 9, 2016 at 8:23 AM, David Blaikie wrote:
>
> On Mar 9, 2016 8:18 AM, "Teresa Johnson" wrote:
> >
> >
> >
> > On Wed, Mar 9, 2016 at 8:13 AM, David Blaikie
> wrote:
> >>
> >>
> >> On Mar 9, 2016 8:11 AM, "Teresa Johnson via llvm-commits" <
> llvm-comm...@lists.llvm.org> wrote:
> >> >
Author: tejohnson
Date: Fri Mar 11 12:52:42 2016
New Revision: 263276
URL: http://llvm.org/viewvc/llvm-project?rev=263276&view=rev
Log:
Update test case for llvm summary format changes in D17592.
Modified:
cfe/trunk/test/Misc/thinlto.c
Modified: cfe/trunk/test/Misc/thinlto.c
URL:
http://llv
Author: tejohnson
Date: Mon Mar 14 16:06:06 2016
New Revision: 263491
URL: http://llvm.org/viewvc/llvm-project?rev=263491&view=rev
Log:
[ThinLTO] Clang side of renaming of function index (NFC)
This is the companion to an LLVM patch that renamed the function index
data structures and files to use
Author: tejohnson
Date: Mon Mar 14 16:18:17 2016
New Revision: 263494
URL: http://llvm.org/viewvc/llvm-project?rev=263494&view=rev
Log:
Revert "[ThinLTO] Clang side of renaming of function index (NFC)"
This reverts commit r263491. Missed a file on the LLVM side.
Modified:
cfe/trunk/include/c
Author: tejohnson
Date: Mon Mar 14 19:04:44 2016
New Revision: 263514
URL: http://llvm.org/viewvc/llvm-project?rev=263514&view=rev
Log:
[ThinLTO] Clang side of renaming of function index (NFC)
This is the companion to an LLVM patch that renamed the function index
data structures and files to use
Author: tejohnson
Date: Fri Jan 8 11:04:29 2016
New Revision: 257179
URL: http://llvm.org/viewvc/llvm-project?rev=257179&view=rev
Log:
[ThinLTO] Leverage new in-place renaming support
Due to the new in-place renaming support added in r257174, we no
longer need to invoke ThinLTO global renaming f
tejohnson created this revision.
tejohnson added reviewers: joker.eph, dexonsmith.
tejohnson added subscribers: cfe-commits, davidxl.
tejohnson added a dependency: D15024: [ThinLTO] Support for specifying function
index from pass manager.
Herald added a subscriber: joker.eph.
Adds new option -fth
tejohnson added a comment.
Thanks for the review, comments below.
Teresa
Comment at: lib/CodeGen/CodeGenAction.cpp:190
@@ -169,3 +189,3 @@
[=](const DiagnosticInfo &DI) {
- linkerDiagnosticHandler(DI, LinkModule);
tejohnson marked an inline comment as done.
tejohnson added a comment.
Updated patch coming shortly.
Comment at: lib/CodeGen/BackendUtil.cpp:308
@@ +307,3 @@
+return;
+ }
+
joker.eph wrote:
> It does not seem to be nicely integrated within the context of th
tejohnson updated this revision to Diff 41542.
tejohnson added a comment.
- Address Mehdi's comments.
http://reviews.llvm.org/D15025
Files:
include/clang/CodeGen/CodeGenAction.h
include/clang/Driver/Options.td
include/clang/Driver/Types.h
include/clang/Frontend/CodeGenOptions.h
lib/Co
tejohnson marked 4 inline comments as done.
tejohnson added a comment.
New patch coming I think addresses all your comments.
Thanks, Teresa
Comment at: lib/CodeGen/BackendUtil.cpp:290
@@ +289,3 @@
+ // setup for LTO compiles invoked via the gold plugin and the llvm-lto tool.
+
tejohnson updated this revision to Diff 41787.
tejohnson added a comment.
- Address more comments.
http://reviews.llvm.org/D15025
Files:
include/clang/CodeGen/BackendUtil.h
include/clang/Driver/Options.td
include/clang/Driver/Types.h
include/clang/Frontend/CodeGenOptions.h
lib/CodeGen
tejohnson added a comment.
> Talked with Duncan, we're not convinced about -fthinlto-backend=... for the
> option name: the word backend does not seems right here. What about
> -fthinlto-index=...?
I wanted to express that this was invoking a different pipeline, and
distinguish from a normal
tejohnson added inline comments.
Comment at: lib/CodeGen/CodeGenAction.cpp:822
@@ +821,3 @@
+ TheModule = std::move(Combined);
+}
+
joker.eph wrote:
> tejohnson wrote:
> > joker.eph wrote:
> > > Could we refactor this in a helper in llvm?
> > I can create
tejohnson added inline comments.
Comment at: lib/CodeGen/CodeGenAction.cpp:822
@@ +821,3 @@
+ TheModule = std::move(Combined);
+}
+
joker.eph wrote:
> tejohnson wrote:
> > joker.eph wrote:
> > > tejohnson wrote:
> > > > joker.eph wrote:
> > > > > Could we
tejohnson updated this revision to Diff 41926.
tejohnson added a comment.
- Use new renameModuleForThinLTO helper function from llvm.
- Fix tests
I have not change the option name yet. Wanted to be sure we have a name that
reflects the fact that this is a special compile that changes the compi
tejohnson updated this revision to Diff 41935.
tejohnson added a comment.
- Move ownership of FunctionInfoIndex onto EmitAssemblyHelper
http://reviews.llvm.org/D15025
Files:
include/clang/CodeGen/BackendUtil.h
include/clang/Driver/Options.td
include/clang/Driver/Types.h
include/clang/Fr
tejohnson updated this revision to Diff 42069.
tejohnson added a comment.
- Rename -fthinlto-backend to -fthinlto-index as per review and IRC.
http://reviews.llvm.org/D15025
Files:
include/clang/CodeGen/BackendUtil.h
include/clang/Driver/Options.td
include/clang/Driver/Types.h
include/c
Author: tejohnson
Date: Mon Dec 7 13:21:34 2015
New Revision: 254927
URL: http://llvm.org/viewvc/llvm-project?rev=254927&view=rev
Log:
[ThinLTO] Option to invoke ThinLTO backend passes and importing
Summary:
Adds new option -fthinlto-index= to invoke the LTO pipeline
along with function importin
This revision was automatically updated to reflect the committed changes.
Closed by commit rL254927: [ThinLTO] Option to invoke ThinLTO backend passes
and importing (authored by tejohnson).
Changed prior to commit:
http://reviews.llvm.org/D15025?vs=42069&id=42084#toc
Repository:
rL LLVM
htt
Author: tejohnson
Date: Mon Dec 7 14:26:57 2015
New Revision: 254938
URL: http://llvm.org/viewvc/llvm-project?rev=254938&view=rev
Log:
Adjust test to fix bot error from r254927.
Remove the part of the error message that may vary across systems.
Modified:
cfe/trunk/test/CodeGen/thinlto_backe
Author: tejohnson
Date: Mon Dec 7 14:40:36 2015
New Revision: 254940
URL: http://llvm.org/viewvc/llvm-project?rev=254940&view=rev
Log:
Remove target specifier from new tests
Hopefully fix the remaining bot failure from r254927. Remove
target specification since it shouldn't be needed, and this c
@@ -103,30 +110,220 @@ static cl::opt
ICPDUMPAFTER("icp-dumpafter", cl::init(false), cl::Hidden,
cl::desc("Dump IR after transformation happens"));
+// This option is meant to be used by LLVM regression test and test the
+// transformation that compares vt
@@ -103,30 +110,220 @@ static cl::opt
ICPDUMPAFTER("icp-dumpafter", cl::init(false), cl::Hidden,
cl::desc("Dump IR after transformation happens"));
+// This option is meant to be used by LLVM regression test and test the
+// transformation that compares vt
@@ -103,30 +110,220 @@ static cl::opt
ICPDUMPAFTER("icp-dumpafter", cl::init(false), cl::Hidden,
cl::desc("Dump IR after transformation happens"));
+// This option is meant to be used by LLVM regression test and test the
+// transformation that compares vt
https://github.com/teresajohnson edited
https://github.com/llvm/llvm-project/pull/81442
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/teresajohnson commented:
I haven't looked at the tests yet, but some comments/questions from a first
pass through most of the code
https://github.com/llvm/llvm-project/pull/81442
___
cfe-commits mailing list
cfe-commits@lists.llvm.o
@@ -276,35 +585,151 @@ CallBase &llvm::pgo::promoteIndirectCall(CallBase &CB,
Function *DirectCallee,
// Promote indirect-call to conditional direct-call for one callsite.
bool IndirectCallPromoter::tryToPromoteWithFuncCmp(
-CallBase &CB, const std::vector &Candidates,
-
@@ -276,35 +585,151 @@ CallBase &llvm::pgo::promoteIndirectCall(CallBase &CB,
Function *DirectCallee,
// Promote indirect-call to conditional direct-call for one callsite.
bool IndirectCallPromoter::tryToPromoteWithFuncCmp(
-CallBase &CB, const std::vector &Candidates,
-
@@ -103,30 +110,222 @@ static cl::opt
ICPDUMPAFTER("icp-dumpafter", cl::init(false), cl::Hidden,
cl::desc("Dump IR after transformation happens"));
+// This option is meant to be used by LLVM regression test and test the
+// transformation that compares vt
@@ -341,6 +879,17 @@ static bool promoteIndirectCalls(Module &M,
ProfileSummaryInfo *PSI, bool InLTO,
return false;
}
bool Changed = false;
+ VirtualCallSiteTypeInfoMap VirtualCSInfo;
+
+ computeVirtualCallSiteTypeInfoMap(M, MAM, VirtualCSInfo);
+
+ // This map reco
@@ -140,14 +337,51 @@ class IndirectCallPromoter {
// indirect callee with functions. Returns true if there are IR
// transformations and false otherwise.
bool tryToPromoteWithFuncCmp(
- CallBase &CB, const std::vector &Candidates,
- uint64_t TotalCount, ArrayRe
@@ -103,30 +110,220 @@ static cl::opt
ICPDUMPAFTER("icp-dumpafter", cl::init(false), cl::Hidden,
cl::desc("Dump IR after transformation happens"));
+// This option is meant to be used by LLVM regression test and test the
+// transformation that compares vt
@@ -103,30 +110,220 @@ static cl::opt
ICPDUMPAFTER("icp-dumpafter", cl::init(false), cl::Hidden,
cl::desc("Dump IR after transformation happens"));
+// This option is meant to be used by LLVM regression test and test the
+// transformation that compares vt
@@ -321,14 +746,127 @@ bool
IndirectCallPromoter::processFunction(ProfileSummaryInfo *PSI) {
if (!NumCandidates ||
(PSI && PSI->hasProfileSummary() && !PSI->isHotCount(TotalCount)))
continue;
+
auto PromotionCandidates = getPromotionCandidatesForCallSite
@@ -140,14 +337,51 @@ class IndirectCallPromoter {
// indirect callee with functions. Returns true if there are IR
// transformations and false otherwise.
bool tryToPromoteWithFuncCmp(
- CallBase &CB, const std::vector &Candidates,
- uint64_t TotalCount, ArrayRe
https://github.com/teresajohnson approved this pull request.
compiler-rt changes lgtm
https://github.com/llvm/llvm-project/pull/91857
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -216,6 +228,35 @@ u64 GetShadowCount(uptr p, u32 size) {
return count;
}
+// Accumulates the access count from the shadow for the given pointer and size.
+// See memprof_mapping.h for an overview on histogram counters.
+u64 GetShadowCountHistogram(uptr p, u32 size) {
+ u
@@ -508,7 +519,26 @@ void createProfileFileNameVar(Module &M) {
}
}
+// Set MemprofHistogramFlag as a Global veriable in IR. This makes it
accessible
+// to
+// the runtime, changing shadow count behavior.
+void createMemprofHistogramFlagVar(Module &M) {
+ const StringRef
@@ -20,25 +20,25 @@ CHECK-NEXT: -
CHECK: Records:
CHECK-NEXT: -
-CHECK-NEXT:FunctionGUID: 15505678318020221912
+CHECK-NEXT:FunctionGUID: 3873612792189045660
CHECK-NEXT:AllocSites:
CHECK-NEXT:-
CHECK-NEXT: Callstack:
CHECK-NEXT: -
-CHECK-NEXT:
@@ -96,19 +102,63 @@ llvm::SmallVector readSegmentEntries(const
char *Ptr) {
}
llvm::SmallVector>
-readMemInfoBlocks(const char *Ptr) {
+readMemInfoBlocksV3(const char *Ptr) {
using namespace support;
const uint64_t NumItemsToRead =
- endian::readNext(Ptr);
+
@@ -508,7 +519,26 @@ void createProfileFileNameVar(Module &M) {
}
}
+// Set MemprofHistogramFlag as a Global veriable in IR. This makes it
accessible
+// to
teresajohnson wrote:
nit: fix line wrapping
https://github.com/llvm/llvm-project/pull/94264
__
@@ -124,6 +124,13 @@ struct PortableMemInfoBlock {
OS << "" << #Name << ": " << Name << "\n";
#include "llvm/ProfileData/MIBEntryDef.inc"
#undef MIBEntryDef
+if (AccessHistogramSize > 0) {
+ OS << "" << "AccessHistogramValues" << ":";
+ for (uint
@@ -216,6 +228,35 @@ u64 GetShadowCount(uptr p, u32 size) {
return count;
}
+// Accumulates the access count from the shadow for the given pointer and size.
+// See memprof_mapping.h for an overview on histogram counters.
+u64 GetShadowCountHistogram(uptr p, u32 size) {
+ u
@@ -0,0 +1,101 @@
+REQUIRES: x86_64-linux
+
+This is a copy of memprof-basict.test with slight changes to check that we can
still read v3 of memprofraw.
teresajohnson wrote:
typo: basict
https://github.com/llvm/llvm-project/pull/94264
__
@@ -610,13 +670,33 @@ RawMemProfReader::peekBuildIds(MemoryBuffer *DataBuffer) {
return BuildIds.takeVector();
}
+// FIXME: Add a schema for serializing similiar to IndexedMemprofReader. This
+// will help being able to deserialize different versions raw memprof versions
+//
@@ -610,13 +670,33 @@ RawMemProfReader::peekBuildIds(MemoryBuffer *DataBuffer) {
return BuildIds.takeVector();
}
+// FIXME: Add a schema for serializing similiar to IndexedMemprofReader. This
+// will help being able to deserialize different versions raw memprof versions
+//
@@ -205,8 +205,14 @@ class RawMemProfReader final : public MemProfReader {
object::SectionedAddress getModuleOffset(uint64_t VirtualAddress);
+ llvm::SmallVector>
+ readMemInfoBlocks(const char *Ptr);
+
// The profiled binary.
object::OwningBinary Binary;
+ // Vers
@@ -38,4 +38,5 @@ MEMPROF_FLAG(bool,
allocator_frees_and_returns_null_on_realloc_zero, true,
MEMPROF_FLAG(bool, print_text, false,
"If set, prints the heap profile in text format. Else use the raw binary
serialization format.")
MEMPROF_FLAG(bool, print_terse, false,
-
@@ -0,0 +1,101 @@
+REQUIRES: x86_64-linux
+
+This is a copy of memprof-basict.test with slight changes to check that we can
still read v3 of memprofraw.
+
+To update the inputs used below run Inputs/update_memprof_inputs.sh
/path/to/updated/clang
teresajohnson w
@@ -216,6 +228,35 @@ u64 GetShadowCount(uptr p, u32 size) {
return count;
}
+// Accumulates the access count from the shadow for the given pointer and size.
+// See memprof_mapping.h for an overview on histogram counters.
+u64 GetShadowCountHistogram(uptr p, u32 size) {
+ u
@@ -96,19 +102,63 @@ llvm::SmallVector readSegmentEntries(const
char *Ptr) {
}
llvm::SmallVector>
-readMemInfoBlocks(const char *Ptr) {
+readMemInfoBlocksV3(const char *Ptr) {
using namespace support;
const uint64_t NumItemsToRead =
- endian::readNext(Ptr);
+
@@ -20,25 +20,25 @@ CHECK-NEXT: -
CHECK: Records:
CHECK-NEXT: -
-CHECK-NEXT:FunctionGUID: 15505678318020221912
+CHECK-NEXT:FunctionGUID: 3873612792189045660
CHECK-NEXT:AllocSites:
CHECK-NEXT:-
CHECK-NEXT: Callstack:
CHECK-NEXT: -
-CHECK-NEXT:
@@ -103,27 +112,226 @@ static cl::opt
ICPDUMPAFTER("icp-dumpafter", cl::init(false), cl::Hidden,
cl::desc("Dump IR after transformation happens"));
+// Indirect call promotion pass will fall back to function-based comparison if
+// vtable-count / function-
@@ -1425,16 +1430,27 @@ MDNode *getPGOFuncNameMetadata(const Function &F) {
return F.getMetadata(getPGOFuncNameMetadataName());
}
-void createPGOFuncNameMetadata(Function &F, StringRef PGOFuncName) {
- // Only for internal linkage functions.
- if (PGOFuncName == F.getName(
@@ -322,14 +796,133 @@ bool
IndirectCallPromoter::processFunction(ProfileSummaryInfo *PSI) {
if (!NumCandidates ||
(PSI && PSI->hasProfileSummary() && !PSI->isHotCount(TotalCount)))
continue;
+
auto PromotionCandidates = getPromotionCandidatesForCallSite
@@ -277,35 +626,160 @@ CallBase &llvm::pgo::promoteIndirectCall(CallBase &CB,
Function *DirectCallee,
// Promote indirect-call to conditional direct-call for one callsite.
bool IndirectCallPromoter::tryToPromoteWithFuncCmp(
-CallBase &CB, const std::vector &Candidates,
-
@@ -103,27 +112,226 @@ static cl::opt
ICPDUMPAFTER("icp-dumpafter", cl::init(false), cl::Hidden,
cl::desc("Dump IR after transformation happens"));
+// Indirect call promotion pass will fall back to function-based comparison if
+// vtable-count / function-
https://github.com/teresajohnson approved this pull request.
lgtm with some mostly comment related fixes/suggestions
https://github.com/llvm/llvm-project/pull/81442
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/
@@ -277,35 +626,160 @@ CallBase &llvm::pgo::promoteIndirectCall(CallBase &CB,
Function *DirectCallee,
// Promote indirect-call to conditional direct-call for one callsite.
bool IndirectCallPromoter::tryToPromoteWithFuncCmp(
-CallBase &CB, const std::vector &Candidates,
-
@@ -103,27 +112,226 @@ static cl::opt
ICPDUMPAFTER("icp-dumpafter", cl::init(false), cl::Hidden,
cl::desc("Dump IR after transformation happens"));
+// Indirect call promotion pass will fall back to function-based comparison if
+// vtable-count / function-
@@ -1425,16 +1430,27 @@ MDNode *getPGOFuncNameMetadata(const Function &F) {
return F.getMetadata(getPGOFuncNameMetadataName());
}
-void createPGOFuncNameMetadata(Function &F, StringRef PGOFuncName) {
- // Only for internal linkage functions.
- if (PGOFuncName == F.getName(
@@ -322,14 +796,133 @@ bool
IndirectCallPromoter::processFunction(ProfileSummaryInfo *PSI) {
if (!NumCandidates ||
(PSI && PSI->hasProfileSummary() && !PSI->isHotCount(TotalCount)))
continue;
+
auto PromotionCandidates = getPromotionCandidatesForCallSite
201 - 300 of 349 matches
Mail list logo