Revision: 19351
Author: [email protected]
Date: Thu Feb 13 10:47:00 2014 UTC
Log: Allow map check hoisting in GVN for stable maps.
[email protected]
Review URL: https://codereview.chromium.org/163263002
http://code.google.com/p/v8/source/detail?r=19351
Modified:
/branches/bleeding_edge/src/hydrogen-instructions.h
/branches/bleeding_edge/test/cctest/test-deoptimization.cc
=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.h Wed Feb 12 18:48:12
2014 UTC
+++ /branches/bleeding_edge/src/hydrogen-instructions.h Thu Feb 13 10:47:00
2014 UTC
@@ -1557,7 +1557,7 @@
ASSERT(!map.is_null());
is_stable_ = map->is_stable();
- if (FLAG_check_elimination && is_stable_) {
+ if (is_stable_) {
map->AddDependentCompilationInfo(
DependentCode::kPrototypeCheckGroup, info);
}
@@ -2700,10 +2700,12 @@
void Add(Handle<Map> map, CompilationInfo* info, Zone* zone) {
map_set_.Add(Unique<Map>(map), zone);
is_stable_ = is_stable_ && map->is_stable();
-
- if (FLAG_check_elimination && is_stable_) {
+ if (is_stable_) {
map->AddDependentCompilationInfo(
DependentCode::kPrototypeCheckGroup, info);
+ } else {
+ SetDependsOnFlag(kMaps);
+ SetDependsOnFlag(kElementsKind);
}
if (!has_migration_target_ && map->is_migration_target()) {
@@ -2722,8 +2724,6 @@
set_representation(Representation::Tagged());
SetFlag(kUseGVN);
SetFlag(kTrackSideEffectDominators);
- SetDependsOnFlag(kMaps);
- SetDependsOnFlag(kElementsKind);
}
bool omit_;
@@ -6506,7 +6506,7 @@
has_transition_ = true;
is_stable_ = map->is_stable();
- if (FLAG_check_elimination && is_stable_) {
+ if (is_stable_) {
map->AddDependentCompilationInfo(
DependentCode::kPrototypeCheckGroup, info);
}
=======================================
--- /branches/bleeding_edge/test/cctest/test-deoptimization.cc Wed Feb 12
18:48:12 2014 UTC
+++ /branches/bleeding_edge/test/cctest/test-deoptimization.cc Thu Feb 13
10:47:00 2014 UTC
@@ -538,7 +538,6 @@
TEST(DeoptimizeLoadICStoreIC) {
i::FLAG_concurrent_recompilation = false;
- i::FLAG_check_elimination = false;
LocalContext env;
v8::HandleScope scope(env->GetIsolate());
@@ -614,13 +613,11 @@
CHECK(!GetJSFunction(env->Global(), "g2")->IsOptimized());
CHECK_EQ(4, env->Global()->Get(v8_str("count"))->Int32Value());
CHECK_EQ(13, env->Global()->Get(v8_str("result"))->Int32Value());
- CHECK_EQ(0, Deoptimizer::GetDeoptimizedCodeCount(CcTest::i_isolate()));
}
TEST(DeoptimizeLoadICStoreICNested) {
i::FLAG_concurrent_recompilation = false;
- i::FLAG_check_elimination = false;
LocalContext env;
v8::HandleScope scope(env->GetIsolate());
@@ -697,5 +694,4 @@
CHECK(!GetJSFunction(env->Global(), "g2")->IsOptimized());
CHECK_EQ(1, env->Global()->Get(v8_str("count"))->Int32Value());
CHECK_EQ(13, env->Global()->Get(v8_str("result"))->Int32Value());
- CHECK_EQ(0, Deoptimizer::GetDeoptimizedCodeCount(CcTest::i_isolate()));
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.