391 uint PhaseCFG::build_cfg() { |
391 uint PhaseCFG::build_cfg() { |
392 Arena *a = Thread::current()->resource_area(); |
392 Arena *a = Thread::current()->resource_area(); |
393 VectorSet visited(a); |
393 VectorSet visited(a); |
394 |
394 |
395 // Allocate stack with enough space to avoid frequent realloc |
395 // Allocate stack with enough space to avoid frequent realloc |
396 Node_Stack nstack(a, C->unique() >> 1); |
396 Node_Stack nstack(a, C->live_nodes() >> 1); |
397 nstack.push(_root, 0); |
397 nstack.push(_root, 0); |
398 uint sum = 0; // Counter for blocks |
398 uint sum = 0; // Counter for blocks |
399 |
399 |
400 while (nstack.is_nonempty()) { |
400 while (nstack.is_nonempty()) { |
401 // node and in's index from stack's top |
401 // node and in's index from stack's top |