8214376: Don't use memset to initialize array of Bundle in output.cpp

Reviewed-by: thartmann, shade
This commit is contained in:
Dmitry Chuyko 2018-12-07 17:52:37 +03:00
parent a78aef8d3d
commit e308392c73

View File

@ -1704,7 +1704,9 @@ Scheduling::Scheduling(Arena *arena, Compile &compile)
_current_latency = NEW_ARENA_ARRAY(arena, unsigned short, node_max);
// Clear the arrays
memset(_node_bundling_base, 0, node_max * sizeof(Bundle));
for (uint i = 0; i < node_max; i++) {
::new (&_node_bundling_base[i]) Bundle();
}
memset(_node_latency, 0, node_max * sizeof(unsigned short));
memset(_uses, 0, node_max * sizeof(short));
memset(_current_latency, 0, node_max * sizeof(unsigned short));