[Beignet] [PATCH 3/7] disable buggy old code doing global constant

Homer Hsing homer.xing at intel.com
Wed May 1 18:00:28 PDT 2013


Version 3.

Signed-off-by: Homer Hsing <homer.xing at intel.com>
---
 backend/src/llvm/llvm_passes.cpp | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/backend/src/llvm/llvm_passes.cpp b/backend/src/llvm/llvm_passes.cpp
index b38ef58..1a7a658 100644
--- a/backend/src/llvm/llvm_passes.cpp
+++ b/backend/src/llvm/llvm_passes.cpp
@@ -228,26 +228,6 @@ namespace gbe
 #endif
     CompositeType* CompTy = cast<CompositeType>(parentPointer->getType());
 
-    if(isa<GlobalVariable>(parentPointer)) //HACK: !!!!
-    {
-#if 1//FORMER_VERSION
-      Function *constWrapper = 
-        Function::Create(FunctionType::get(parentPointer->getType(),true),
-            GlobalValue::ExternalLinkage,
-            Twine("__gen_ocl_const_wrapper"));
-
-      llvm::ArrayRef<Value*> params(parentPointer);
-      // params.push_back(parentPointer);
-
-      //create and insert wrapper call
-      CallInst * wrapperCall = 
-        CallInst::Create(constWrapper,params,"",GEPInst);
-      parentPointer = wrapperCall;
-#else
-      // NOT_IMPLEMENTED;
-#endif
-    }
-
     Value* currentAddrInst = 
       new PtrToIntInst(parentPointer, IntegerType::get(GEPInst->getContext(), ptrSize), "", GEPInst);
 
-- 
1.8.1.2



More information about the Beignet mailing list