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

Unified Diff: src/ast-numbering.cc

Issue 1001533002: Vector-ICs: Implement slot sharing for global loads. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@vector-christmas
Patch Set: REBASE. Created 5 years, 9 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/ast.cc ('k') | test/cctest/test-feedback-vector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast-numbering.cc
diff --git a/src/ast-numbering.cc b/src/ast-numbering.cc
index 152363e8fd0e58de555742d90b479234b6bd0f53..eaaaf29596f6f17d5fc4e39164b4c2d33b1a44a7 100644
--- a/src/ast-numbering.cc
+++ b/src/ast-numbering.cc
@@ -17,6 +17,7 @@ class AstNumberingVisitor FINAL : public AstVisitor {
explicit AstNumberingVisitor(Isolate* isolate, Zone* zone)
: AstVisitor(),
next_id_(BailoutId::FirstUsable().ToInt()),
+ ic_slot_cache_(FLAG_vector_ics ? 4 : 0),
dont_optimize_reason_(kNoReason) {
InitializeAstVisitor(isolate, zone);
}
@@ -59,14 +60,15 @@ class AstNumberingVisitor FINAL : public AstVisitor {
template <typename Node>
void ReserveFeedbackSlots(Node* node) {
FeedbackVectorRequirements reqs =
- node->ComputeFeedbackRequirements(isolate());
+ node->ComputeFeedbackRequirements(isolate(), &ic_slot_cache_);
if (reqs.slots() > 0) {
node->SetFirstFeedbackSlot(FeedbackVectorSlot(properties_.slots()));
properties_.increase_slots(reqs.slots());
}
if (reqs.ic_slots() > 0) {
int ic_slots = properties_.ic_slots();
- node->SetFirstFeedbackICSlot(FeedbackVectorICSlot(ic_slots));
+ node->SetFirstFeedbackICSlot(FeedbackVectorICSlot(ic_slots),
+ &ic_slot_cache_);
properties_.increase_ic_slots(reqs.ic_slots());
if (FLAG_vector_ics) {
for (int i = 0; i < reqs.ic_slots(); i++) {
@@ -80,6 +82,9 @@ class AstNumberingVisitor FINAL : public AstVisitor {
int next_id_;
AstProperties properties_;
+ // The slot cache allows us to reuse certain vector IC slots. It's only used
+ // if FLAG_vector_ics is true.
+ ICSlotCache ic_slot_cache_;
BailoutReason dont_optimize_reason_;
DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
« no previous file with comments | « src/ast.cc ('k') | test/cctest/test-feedback-vector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698