i965/vec4: zero allocated memory where needed
authorJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Tue, 14 Jun 2016 14:59:04 +0000 (17:59 +0300)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 31 Oct 2016 10:53:38 +0000 (11:53 +0100)
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/drivers/dri/i965/brw_vec4_dead_code_eliminate.cpp

index 916a3fb26d1ccaebac9c9971831fb0ba0145f347..65f9f3889883904c51900d3f4945b02666bf517e 100644 (file)
@@ -44,8 +44,8 @@ vec4_visitor::dead_code_eliminate()
    calculate_live_intervals();
 
    int num_vars = live_intervals->num_vars;
-   BITSET_WORD *live = ralloc_array(NULL, BITSET_WORD, BITSET_WORDS(num_vars));
-   BITSET_WORD *flag_live = ralloc_array(NULL, BITSET_WORD, 1);
+   BITSET_WORD *live = rzalloc_array(NULL, BITSET_WORD, BITSET_WORDS(num_vars));
+   BITSET_WORD *flag_live = rzalloc_array(NULL, BITSET_WORD, 1);
 
    foreach_block_reverse_safe(block, cfg) {
       memcpy(live, live_intervals->block_data[block->num].liveout,