GBE: handle dead loop BBs in liveness analysis.
authorZhigang Gong <zhigang.gong@intel.com>
Fri, 24 Oct 2014 01:55:34 +0000 (09:55 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Fri, 24 Oct 2014 04:41:32 +0000 (12:41 +0800)
commite74164f951ba9003f92d14d685f184617da056eb
treec5e1ff7e0f170e89a87ca4a23175c97d363b69be
parent2ed322b18b100a7b74d0f1c661e15a90f734f4cd
GBE: handle dead loop BBs in liveness analysis.

Considering the following CFG, our previous liveness analysis will only
back traverse from the exit point BB, thus the BB 6 and 7 will not be handled.

    4---
    |   |
    |   |
    5 --|---> 10 ---> ret
    |   |
    |   |
    6<--
    |
    |<--
    7   |
    |   |
     ---

Although the CFG looks not a normal application as once it goes to
block 6, it will enter a dead loop and will never return, we still need
to compile it successfully.

This patch is to fix the bug at:
https://bugs.freedesktop.org/show_bug.cgi?id=85362

Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
backend/src/ir/liveness.cpp
backend/src/ir/liveness.hpp