3260 {
3261 for (auto block : graph->reverse_postorder()) {
3262 block_num_[block->block_id()] = 1;
3263 CollectDetachedMaterializations(block->env());
3264
3265 if (auto* block_with_idefs = block->AsBlockEntryWithInitialDefs()) {
3266 for (Definition* def : *block_with_idefs->initial_definitions()) {
3267 RenumberDefinition(def);
3268 CollectDetachedMaterializations(def->env());
3269 }
3270 }
3271 if (auto* join = block->AsJoinEntry()) {
3272 for (PhiIterator it(join); !it.Done(); it.Advance()) {
3273 RenumberDefinition(it.Current());
3274 }
3275 }
3276 for (ForwardInstructionIterator it(block); !it.Done(); it.Advance()) {
3277 Instruction* instr = it.Current();
3278 if (Definition* def = instr->AsDefinition()) {
3279 RenumberDefinition(def);
3280 }
3281 CollectDetachedMaterializations(instr->env());
3282 }
3283 }
3284 for (auto* def : (*detached_defs_)) {
3285 RenumberDefinition(def);
3286 }
3287 graph->set_current_ssa_temp_index(current_ssa_index_);
3288
3289
3290
3291 intptr_t current_block_index = 0;
3292 for (intptr_t i = 0, n = block_num_.
length(); i < n; ++i) {
3293 if (block_num_[i] >= 0) {
3294 block_num_[i] = current_block_index++;
3295 }
3296 }
3297 for (auto block : graph->reverse_postorder()) {
3298 block->set_block_id(block_num_[block->block_id()]);
3299 }
3300 graph->set_max_block_id(current_block_index - 1);
3301 }