| Index: src/hydrogen.cc
|
| diff --git a/src/hydrogen.cc b/src/hydrogen.cc
|
| index 19edbd0c2efecd25d9ef55dc94d06f94d384ea99..825fc9abf535174e6e1d179f214797316443a0a6 100644
|
| --- a/src/hydrogen.cc
|
| +++ b/src/hydrogen.cc
|
| @@ -517,7 +517,6 @@ class ReachabilityAnalyzer BASE_EMBEDDED {
|
|
|
| void HGraph::Verify(bool do_full_verify) const {
|
| // Allow dereferencing for debug mode verification.
|
| - Heap::RelocationLock(isolate()->heap());
|
| HandleDereferenceGuard allow_handle_deref(isolate(),
|
| HandleDereferenceGuard::ALLOW);
|
| for (int i = 0; i < blocks_.length(); i++) {
|
| @@ -619,6 +618,7 @@ HConstant* HGraph::GetConstant##Name() { \
|
| if (!constant_##name##_.is_set()) { \
|
| HConstant* constant = new(zone()) HConstant( \
|
| isolate()->factory()->name##_value(), \
|
| + reinterpret_cast<Address>(isolate()->heap()->name##_value()), \
|
| Representation::Tagged(), \
|
| htype, \
|
| false, \
|
| @@ -880,6 +880,7 @@ HGraph* HGraphBuilder::CreateGraph() {
|
| HPhase phase("H_Block building", isolate());
|
| set_current_block(graph()->entry_block());
|
| if (!BuildGraph()) return NULL;
|
| + graph()->FinalizeUniqueIds();
|
| return graph_;
|
| }
|
|
|
| @@ -1696,6 +1697,19 @@ HBasicBlock* HGraph::CreateBasicBlock() {
|
| }
|
|
|
|
|
| +void HGraph::FinalizeUniqueIds() {
|
| + AssertNoAllocation no_gc;
|
| + ASSERT(!isolate()->optimizing_compiler_thread()->IsOptimizerThread());
|
| + for (int i = 0; i < blocks()->length(); ++i) {
|
| + for (HInstruction* instr = blocks()->at(i)->first();
|
| + instr != NULL;
|
| + instr = instr->next()) {
|
| + instr->FinalizeUniqueId();
|
| + }
|
| + }
|
| +}
|
| +
|
| +
|
| void HGraph::Canonicalize() {
|
| if (!FLAG_use_canonicalizing) return;
|
| HPhase phase("H_Canonicalize", this);
|
| @@ -4327,8 +4341,6 @@ bool HOptimizedGraphBuilder::BuildGraph() {
|
| void HGraph::GlobalValueNumbering() {
|
| // Perform common subexpression elimination and loop-invariant code motion.
|
| if (FLAG_use_gvn) {
|
| - // We use objects' raw addresses for identification, so they must not move.
|
| - Heap::RelocationLock relocation_lock(isolate()->heap());
|
| HPhase phase("H_Global value numbering", this);
|
| HGlobalValueNumberer gvn(this, info());
|
| bool removed_side_effects = gvn.Analyze();
|
|
|