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

Unified Diff: src/hydrogen-gvn.cc

Issue 17573003: Add phase zone to CompilationInfo and use it in GVN pass. (Closed) Base URL: git@github.com:v8/v8.git@master
Patch Set: Created 7 years, 6 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/hydrogen-gvn.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-gvn.cc
diff --git a/src/hydrogen-gvn.cc b/src/hydrogen-gvn.cc
index aa2dff765563977211ad473dd73b830a6ff5390b..9d5e866de443ce226d331fa5ecb1054542c01828 100644
--- a/src/hydrogen-gvn.cc
+++ b/src/hydrogen-gvn.cc
@@ -365,14 +365,16 @@ HGlobalValueNumberer::HGlobalValueNumberer(HGraph* graph, CompilationInfo* info)
: graph_(graph),
info_(info),
removed_side_effects_(false),
- block_side_effects_(graph->blocks()->length(), graph->zone()),
- loop_side_effects_(graph->blocks()->length(), graph->zone()),
- visited_on_paths_(graph->zone(), graph->blocks()->length()) {
+ phase_zone_(info->phase_zone()),
+ phase_zone_scope_(phase_zone_, DELETE_ON_EXIT),
+ block_side_effects_(graph->blocks()->length(), phase_zone_),
+ loop_side_effects_(graph->blocks()->length(), phase_zone_),
+ visited_on_paths_(phase_zone_, graph->blocks()->length()) {
ASSERT(!AllowHandleAllocation::IsAllowed());
block_side_effects_.AddBlock(GVNFlagSet(), graph_->blocks()->length(),
- graph_->zone());
+ phase_zone_);
loop_side_effects_.AddBlock(GVNFlagSet(), graph_->blocks()->length(),
- graph_->zone());
+ phase_zone_);
}
bool HGlobalValueNumberer::Analyze() {
@@ -756,9 +758,9 @@ class GvnBasicBlockState: public ZoneObject {
// GvnBasicBlockState instances.
void HGlobalValueNumberer::AnalyzeGraph() {
HBasicBlock* entry_block = graph_->entry_block();
- HValueMap* entry_map = new(zone()) HValueMap(zone());
+ HValueMap* entry_map = new(phase_zone()) HValueMap(phase_zone());
GvnBasicBlockState* current =
- GvnBasicBlockState::CreateEntry(zone(), entry_block, entry_map);
+ GvnBasicBlockState::CreateEntry(phase_zone(), entry_block, entry_map);
while (current != NULL) {
HBasicBlock* block = current->block();
@@ -800,7 +802,7 @@ void HGlobalValueNumberer::AnalyzeGraph() {
if (instr->HasSideEffects()) removed_side_effects_ = true;
instr->DeleteAndReplaceWith(other);
} else {
- map->Add(instr, zone());
+ map->Add(instr, phase_zone());
}
}
if (instr->IsLinked() &&
@@ -826,7 +828,8 @@ void HGlobalValueNumberer::AnalyzeGraph() {
HBasicBlock* dominator_block;
GvnBasicBlockState* next =
- current->next_in_dominator_tree_traversal(zone(), &dominator_block);
+ current->next_in_dominator_tree_traversal(phase_zone(),
+ &dominator_block);
if (next != NULL) {
HBasicBlock* dominated = next->block();
« no previous file with comments | « src/hydrogen-gvn.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698