LGTM Thanks! Ruiling
> -----Original Message----- > From: Beignet [mailto:[email protected]] On Behalf Of > Yang, Rong R > Sent: Wednesday, December 23, 2015 4:27 PM > To: [email protected] > Subject: Re: [Beignet] [PATCH] GBE: fix a assert when structure argument's > first field don't used. > > Ping for review. > > > -----Original Message----- > > From: Yang, Rong R > > Sent: Friday, November 27, 2015 12:20 > > To: [email protected] > > Cc: Yang, Rong R > > Subject: [PATCH] GBE: fix a assert when structure argument's first field > don't > > used. > > > > If use stucture argument's other field but don't use first field, the > argument's > > curbe payload will not be allocated, cause assert. > > Set the maxID to 1 for this case, because each filed deallocate separately. > > > > Signed-off-by: Yang Rong <[email protected]> > > --- > > backend/src/backend/gen_reg_allocation.cpp | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/backend/src/backend/gen_reg_allocation.cpp > > b/backend/src/backend/gen_reg_allocation.cpp > > index cd819d1..633d741 100644 > > --- a/backend/src/backend/gen_reg_allocation.cpp > > +++ b/backend/src/backend/gen_reg_allocation.cpp > > @@ -1050,6 +1050,7 @@ namespace gbe > > > > INLINE bool GenRegAllocator::Opaque::allocate(Selection &selection) { > > using namespace ir; > > + const Function::PushMap &pushMap = ctx.fn.getPushMap(); > > > > if (ctx.reservedSpillRegs != 0) { > > reservedReg = ctx.allocate(ctx.reservedSpillRegs * GEN_REG_SIZE, > > GEN_REG_SIZE, false); @@ -1174,6 +1175,15 @@ namespace gbe > > delete boolsMap; > > } > > > > + for (auto &it : this->intervals) { > > + if (it.maxID == -INT_MAX) continue; > > + if(pushMap.find(it.reg) != pushMap.end()) { > > + uint32_t argID = ctx.fn.getPushLocation(it.reg)->argID; > > + ir::Register argReg = ctx.fn.getArg(argID).reg; > > + intervals[argReg].maxID = std::max(intervals[argReg].maxID, 1); > > + } > > + } > > + > > if (ctx.inProfilingMode) { > > /* If we are in profiling mode, we always need xyz dim info and > > timestamp curbes. > > xyz dim info related curbe registers just live for the first > > INSN, but > > timestamp > > -- > > 2.1.4 > > _______________________________________________ > Beignet mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/beignet _______________________________________________ Beignet mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/beignet
