[Beignet] [PATCH 1/5] GBE: refine Phi copy interfering check.
Zhigang Gong
zhigang.gong at intel.com
Mon Aug 31 21:04:59 PDT 2015
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
More information about the Beignet
mailing list