[Beignet] [PATCH 1/2] GBE: remove useless code.

Zhigang Gong zhigang.gong at linux.intel.com
Sun Dec 14 17:16:48 PST 2014


Ping for review.

On Tue, Dec 02, 2014 at 05:42:28PM +0800, Zhigang Gong wrote:
> Signed-off-by: Zhigang Gong <zhigang.gong at intel.com>
> ---
>  backend/src/llvm/llvm_passes.cpp | 27 ++++-----------------------
>  1 file changed, 4 insertions(+), 23 deletions(-)
> 
> diff --git a/backend/src/llvm/llvm_passes.cpp b/backend/src/llvm/llvm_passes.cpp
> index ff9ab76..cb68fe6 100644
> --- a/backend/src/llvm/llvm_passes.cpp
> +++ b/backend/src/llvm/llvm_passes.cpp
> @@ -225,19 +225,10 @@ namespace gbe
>  
>     public:
>      static char ID;
> -#define FORMER_VERSION 0
> -#if FORMER_VERSION
> -   GenRemoveGEPPasss(map<const Value *, const Value *>& 
> -                                       parentCompositePointer)
> -     : BasicBlockPass(ID),
> -     parentPointers(parentCompositePointer) {}
> -    map<const Value *, const Value *>& parentPointers;
> -#else
> -   GenRemoveGEPPasss(const ir::Unit &unit) :
> -     BasicBlockPass(ID),
> -     unit(unit) {}
> -  const ir::Unit &unit;
> -#endif
> +    GenRemoveGEPPasss(const ir::Unit &unit) :
> +      BasicBlockPass(ID),
> +      unit(unit) {}
> +    const ir::Unit &unit;
>      void getAnalysisUsage(AnalysisUsage &AU) const {
>        AU.setPreservesCFG();
>      }
> @@ -267,9 +258,6 @@ namespace gbe
>    {
>      const uint32_t ptrSize = unit.getPointerSize();
>      Value* parentPointer = GEPInst->getOperand(0);
> -#if FORMER_VERSION
> -    Value* topParent = parentPointer;
> -#endif
>      CompositeType* CompTy = cast<CompositeType>(parentPointer->getType());
>  
>      Value* currentAddrInst = 
> @@ -385,13 +373,6 @@ namespace gbe
>      GEPInst->dropAllReferences();
>      GEPInst->eraseFromParent();
>  
> -#if FORMER_VERSION
> -    //insert new pointer into parent list
> -    while(parentPointers.find(topParent)!=parentPointers.end())
> -      topParent = parentPointers.find(topParent)->second;
> -    parentPointers[intToPtrInst] = topParent;
> -#endif
> -
>      return true;
>    }
>  
> -- 
> 1.8.3.2
> 
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list