[Beignet] [PATCH] remove the LinkOnceAnyLinkage since the libocl is introduced.

Zhigang Gong zhigang.gong at linux.intel.com
Mon Sep 15 23:02:02 PDT 2014


Right, we don't need this workaround any more. And we also could
enable the VerifierPass safely now.

Will push latter. Thanks.

On Tue, Sep 16, 2014 at 09:40:09AM +0800, xionghu.luo at intel.com wrote:
> From: Luo Xionghu <xionghu.luo at intel.com>
> 
> no need to set the LinkOnceAnyLinkage for global variables and functions
> to avoid redefinition.
> 
> Signed-off-by: Luo Xionghu <xionghu.luo at intel.com>
> ---
>  backend/src/backend/gen_program.cpp |    9 ---------
>  1 file changed, 9 deletions(-)
> 
> diff --git a/backend/src/backend/gen_program.cpp b/backend/src/backend/gen_program.cpp
> index 44c9c10..bd0c070 100644
> --- a/backend/src/backend/gen_program.cpp
> +++ b/backend/src/backend/gen_program.cpp
> @@ -367,15 +367,6 @@ namespace gbe {
>      }else{
>        //set the global variables and functions to link once to fix redefine.
>        llvm::Module* src = (llvm::Module*)((GenProgram*)src_program)->module;
> -      for (llvm::Module::global_iterator I = src->global_begin(), E = src->global_end(); I != E; ++I) {
> -        I->setLinkage(llvm::GlobalValue::LinkOnceAnyLinkage);
> -      }
> -
> -      for (llvm::Module::iterator I = src->begin(), E = src->end(); I != E; ++I) {
> -        llvm::Function *F = llvm::dyn_cast<llvm::Function>(I);
> -        if (F && isKernelFunction(*F)) continue;
> -        I->setLinkage(llvm::GlobalValue::LinkOnceAnyLinkage);
> -      }
>        llvm::Module* dst = (llvm::Module*)((GenProgram*)dst_program)->module;
>        llvm::Linker::LinkModules( dst,
>                                   src,
> -- 
> 1.7.9.5
> 
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list