On Mon, Sep 21, 2015 at 02:51:26AM +, Song, Ruiling wrote:
> > +
> > + void Liveness::replaceRegs(const map &replaceMap)
> > + {
> > +
> > +for (auto &pair : liveness) {
> > + BlockInfo &info = *pair.second;
> > + BasicBlock *bb = const_cast(&info.bb);
> > + for (auto &pair
> +
> + void Liveness::replaceRegs(const map &replaceMap)
> + {
> +
> +for (auto &pair : liveness) {
> + BlockInfo &info = *pair.second;
> + BasicBlock *bb = const_cast(&info.bb);
> + for (auto &pair : replaceMap) {
> +Register from = pair.first;
> +Register to =
We don't need to recompute the entire liveness information for
all cases. This is a preparation patch for further phi copy
optimization.
Signed-off-by: Zhigang Gong
---
backend/src/ir/liveness.cpp | 33 +
backend/src/ir/liveness.hpp | 7 +++
2 files changed,