Right. After the liveness interval calculation, the instruction id will not be changed. As we need to maintain each selection vector's instruction's ID. If we change the instruction ID each time when we insert a MOV instruction, then all the selection vector's instruction ID need to be updated which is very ineffieicnt. So I choose to not change those instruction ID even when we inserted some new MOVs. This way, all the liveness interval data is still valid no mather when or where we inserted some MOVs.
And I don't see any big side effect. Do you see any other side effect of this solution? > -----Original Message----- > From: Song, Ruiling > Sent: Monday, February 24, 2014 12:15 PM > To: Yang, Rong R; Gong, Zhigang; [email protected] > Cc: Gong, Zhigang > Subject: RE: [Beignet] [PATCH 1/2] GBE: prepare to optimize generic selection > vector allocation. > > [Ruiling]: I also got a surprise at first, but seems that all the insn->ID > does not > consider the new inserted MOVs. So the register intervals still aligned among > the registers. I am not sure if there are some side effect, but at least I do > not > see any. > > diff --git a/backend/src/backend/gen_reg_allocation.cpp > b/backend/src/backend/gen_reg_allocation.cpp > index 8243f19..4e276c3 100644 > --- a/backend/src/backend/gen_reg_allocation.cpp > +++ b/backend/src/backend/gen_reg_allocation.cpp > @@ -292,6 +292,10 @@ namespace gbe > tmp = selection.replaceDst(vector->insn, regID); > const VectorLocation location = std::make_pair(vector, regID); > this->vectorMap.insert(std::make_pair(tmp, location)); > + intervals.push_back(tmp); > + intervals[tmp].minID = vector->insn->ID; > + intervals[tmp].maxID = vector->insn->ID; > >>>>>>>>The tmp is dst of mov before vector->insn, so minID should be insn - > >>>>>>>>1? > And if there are some instructions are inserted, so vector->insn->ID is also > change, isn't it? > > > > _______________________________________________ Beignet mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/beignet
