[Beignet] [PATCH] delete GEPInst when it is no longer used

Guo Yejun yejun.guo at intel.com
Thu Jul 24 15:00:27 PDT 2014


Signed-off-by: Guo Yejun <yejun.guo at intel.com>
---
 backend/src/llvm/llvm_passes.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/backend/src/llvm/llvm_passes.cpp b/backend/src/llvm/llvm_passes.cpp
index 3078470..b8ab844 100644
--- a/backend/src/llvm/llvm_passes.cpp
+++ b/backend/src/llvm/llvm_passes.cpp
@@ -378,7 +378,7 @@ namespace gbe
     //replace uses of the GEP instruction with the newly calculated pointer
     GEPInst->replaceAllUsesWith(intToPtrInst);
     GEPInst->dropAllReferences();
-    GEPInst->removeFromParent();
+    GEPInst->eraseFromParent();
 
 #if FORMER_VERSION
     //insert new pointer into parent list
-- 
1.8.3.2



More information about the Beignet mailing list