[Beignet] [PATCH 1/5] GBE: refine Phi copy interfering check.
Zhigang Gong
zhigang.gong at linux.intel.com
Wed Sep 16 17:38:11 PDT 2015
Ping for review.
Thanks.
On Tue, Sep 01, 2015 at 12:04:59PM +0800, Zhigang Gong wrote:
> If the PHI source register's definition instruction uses the
> phi register, it is not a interfere. For an example:
>
> MOV %phi, %phicopy
> ...
> ADD %phiSrcDef, %phi, tmp
> ...
> MOV %phicopy, %phiSrcDef
> ...
>
> The %phi and the %phiSrcDef is not interering each other.
> Simply advancing the start of the check to next instruction is
> enough to get better result. For some special case, this patch
> could get significant performance boost.
>
> Signed-off-by: Zhigang Gong <zhigang.gong at intel.com>
> ---
> backend/src/llvm/llvm_gen_backend.cpp | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/backend/src/llvm/llvm_gen_backend.cpp b/backend/src/llvm/llvm_gen_backend.cpp
> index 4905415..38c63ce 100644
> --- a/backend/src/llvm/llvm_gen_backend.cpp
> +++ b/backend/src/llvm/llvm_gen_backend.cpp
> @@ -2220,6 +2220,8 @@ namespace gbe
>
> ir::BasicBlock::const_iterator iter = ir::BasicBlock::const_iterator(phiCopySrcDefInsn);
> ir::BasicBlock::const_iterator iterE = bb->end();
> +
> + iter++;
> // check no use of phi in this basicblock between [phiCopySrc def, bb end]
> bool phiPhiCopySrcInterfere = false;
> while (iter != iterE) {
> --
> 1.9.1
>
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list