LGTM, thanks.
> -----Original Message----- > From: Beignet [mailto:[email protected]] On Behalf Of > Zhigang Gong > Sent: Monday, December 15, 2014 11:58 > To: [email protected] > Cc: Gong, Zhigang > Subject: [Beignet] [PATCH] GBE: don't always treat a multiple destination > instruction as root. > > Don't know why we set this type of instruction as root. It doesn't make sense. > For example, if we have a read_imagei() to read some data to a int4 value > and then never use these 4 value, we definitely don't need to generate this > instruction. > > Signed-off-by: Zhigang Gong <[email protected]> > --- > backend/src/backend/gen_insn_selection.cpp | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/backend/src/backend/gen_insn_selection.cpp > b/backend/src/backend/gen_insn_selection.cpp > index 7ea2498..adff091 100644 > --- a/backend/src/backend/gen_insn_selection.cpp > +++ b/backend/src/backend/gen_insn_selection.cpp > @@ -1464,14 +1464,13 @@ namespace gbe > } selectionLibraryInitializer; > > bool Selection::Opaque::isRoot(const ir::Instruction &insn) const { > - if (insn.getDstNum() > 1 || > - insn.hasSideEffect() || > + if (insn.hasSideEffect() || > insn.isMemberOf<ir::BranchInstruction>() || > insn.isMemberOf<ir::LabelInstruction>()) > return true; > > // No side effect, not a branch and no destination? Impossible > - GBE_ASSERT(insn.getDstNum() == 1); > + GBE_ASSERT(insn.getDstNum() >= 1); > > // Root if alive outside the block. > // XXX we should use Value and not registers in liveness info > -- > 1.8.3.2 > > _______________________________________________ > Beignet mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/beignet _______________________________________________ Beignet mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/beignet
