> +
> + void Liveness::replaceRegs(const map<Register, Register> &replaceMap)
> + {
> +
> + for (auto &pair : liveness) {
> + BlockInfo &info = *pair.second;
> + BasicBlock *bb = const_cast<BasicBlock *>(&info.bb);
> + for (auto &pair : replaceMap) {
> + Register from = pair.first;
> + Register to = pair.second;
> + if (info.liveOut.contains(from)) {
> + info.liveOut.erase(from);
> + info.liveOut.insert(to);
Why do we need to insert into definedPhiRegs ? other parts LGTM.
Thanks!
Ruiling
> + bb->definedPhiRegs.insert(to);
> + }
> + if (info.upwardUsed.contains(from)) {
> + info.upwardUsed.erase(from);
> + info.upwardUsed.insert(to);
> + }
> + }
> + }
> + }
> +
_______________________________________________
Beignet mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/beignet