GBE: rewrite the liveness analysis routine.
authorZhigang Gong <zhigang.gong@intel.com>
Fri, 20 Dec 2013 07:15:09 +0000 (15:15 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Tue, 31 Dec 2013 05:54:35 +0000 (13:54 +0800)
commitf0035557000f123a251007ea613786edb171d8f7
tree3a52dff1c8920c7b449eebeb580c492f8424ddfd
parent744dddb3fdf0a93c8efb355903f0b3b7d40755b8
GBE: rewrite the liveness analysis routine.

The previous implementation has two problems:

1. At the liveness analysis phase, the liveIn and liveOut computation
is incorrect. The liveIn is not a static information it should be computed
along with the liveOut during the backward data flow analysis.

2. At the register allocation phase, it only considers the liveOut
information. Actually, we also need to consider the liveIn information.

v2:
a. Remove calculating maxID for the liveIn register set and remove calculating
   minID for the liveOut register set.
b. Don't insert a bb to the liveness work list if it is already in the list.

Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: "Song, Ruiling" <ruiling.song@intel.com>
backend/src/backend/gen_context.hpp
backend/src/backend/gen_reg_allocation.cpp
backend/src/ir/liveness.cpp
backend/src/ir/liveness.hpp
backend/src/ir/profile.cpp
backend/src/ir/profile.hpp