Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(443)

Unified Diff: src/full-codegen/ppc/full-codegen-ppc.cc

Issue 2338413002: PPC/s390: [turbofan] Collect invocation counts and compute relative call frequencies. (Closed)
Patch Set: fixed presubmit warnings Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/builtins/s390/builtins-s390.cc ('k') | src/full-codegen/s390/full-codegen-s390.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/ppc/full-codegen-ppc.cc
diff --git a/src/full-codegen/ppc/full-codegen-ppc.cc b/src/full-codegen/ppc/full-codegen-ppc.cc
index f0f12e903cb4de839d2e60c2388e33cf7f637272..58aa629461281990c7e3b2b4ab2984a0b6d821a2 100644
--- a/src/full-codegen/ppc/full-codegen-ppc.cc
+++ b/src/full-codegen/ppc/full-codegen-ppc.cc
@@ -133,6 +133,22 @@ void FullCodeGenerator::Generate() {
info->set_prologue_offset(prologue_offset);
__ Prologue(info->GeneratePreagedPrologue(), ip, prologue_offset);
+ // Increment invocation count for the function.
+ {
+ Comment cmnt(masm_, "[ Increment invocation count");
+ __ LoadP(r7, FieldMemOperand(r4, JSFunction::kLiteralsOffset));
+ __ LoadP(r7, FieldMemOperand(r7, LiteralsArray::kFeedbackVectorOffset));
+ __ LoadP(r8, FieldMemOperand(r7, TypeFeedbackVector::kInvocationCountIndex *
+ kPointerSize +
+ TypeFeedbackVector::kHeaderSize));
+ __ AddSmiLiteral(r8, r8, Smi::FromInt(1), r0);
+ __ StoreP(r8,
+ FieldMemOperand(
+ r7, TypeFeedbackVector::kInvocationCountIndex * kPointerSize +
+ TypeFeedbackVector::kHeaderSize),
+ r0);
+ }
+
{
Comment cmnt(masm_, "[ Allocate locals");
int locals_count = info->scope()->num_stack_slots();
« no previous file with comments | « src/builtins/s390/builtins-s390.cc ('k') | src/full-codegen/s390/full-codegen-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698