On Mon, Sep 21, 2015 at 11:11:48AM +0800, Ruiling Song wrote: > It makes sense to use short-live vector register under register pressure. > But please also remove the comment > "// If an element has very long interval, we don't want to put it into a > // vector as it will add more pressure to the register allocation"
Right, the comments are out-of-date now and need to be removed. Thanks, Zhigang Gong. > > Thanks! > Ruiling > 2015-09-17 8:39 GMT+08:00 Zhigang Gong <zhigang.g...@linux.intel.com>: > > > Ping for review. > > Thanks. > > > > On Sun, Sep 06, 2015 at 05:21:29PM +0800, Zhigang Gong wrote: > > > If the reservedSpillRegs is not zero, it indicates we are in a > > > very high register pressure. Use register vector will likely > > > increase that pressure and will cause significant performance > > > problem which is much worse than use a short-live temporary > > > vector register with several additional MOVs. > > > > > > So let's simply avoid use vector registers and just use a > > > temporary short-live-interval vector. > > > > > > Signed-off-by: Zhigang Gong <zhigang.g...@intel.com> > > > --- > > > backend/src/backend/gen_reg_allocation.cpp | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/backend/src/backend/gen_reg_allocation.cpp > > b/backend/src/backend/gen_reg_allocation.cpp > > > index 39f1934..36ad914 100644 > > > --- a/backend/src/backend/gen_reg_allocation.cpp > > > +++ b/backend/src/backend/gen_reg_allocation.cpp > > > @@ -318,7 +318,7 @@ namespace gbe > > > if (it == vectorMap.end() && > > > ctx.sel->isScalarReg(reg) == false && > > > ctx.isSpecialReg(reg) == false && > > > - (intervals[reg].maxID - intervals[reg].minID) < 2048) > > > + ctx.reservedSpillRegs == 0 ) > > > { > > > const VectorLocation location = std::make_pair(vector, regID); > > > this->vectorMap.insert(std::make_pair(reg, location)); > > > -- > > > 1.9.1 > > > > > > _______________________________________________ > > > Beignet mailing list > > > Beignet@lists.freedesktop.org > > > http://lists.freedesktop.org/mailman/listinfo/beignet > > _______________________________________________ > > Beignet mailing list > > Beignet@lists.freedesktop.org > > http://lists.freedesktop.org/mailman/listinfo/beignet > > > _______________________________________________ > Beignet mailing list > Beignet@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/beignet _______________________________________________ Beignet mailing list Beignet@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/beignet