[Beignet] [PATCH] Change the oreder of the code

Zhigang Gong zhigang.gong at linux.intel.com
Thu Feb 20 23:29:32 PST 2014


Nice catch.
three minor comments as below:
1. Please add some detail information in the commit log and
2. fix the typo in the subject.

the third comments is embbedded in the patch.

On Fri, Feb 21, 2014 at 03:59:59PM +0800, Xiuli Pan wrote:
> From: xiuli pan <xiuli.pan at intel.com>
> 
> ---
>  backend/src/llvm/llvm_gen_backend.cpp |   21 +++++++++++----------
>  1 file changed, 11 insertions(+), 10 deletions(-)
> 
> diff --git a/backend/src/llvm/llvm_gen_backend.cpp b/backend/src/llvm/llvm_gen_backend.cpp
> index 2d4fb0a..e20f810 100644
> --- a/backend/src/llvm/llvm_gen_backend.cpp
> +++ b/backend/src/llvm/llvm_gen_backend.cpp
> @@ -1394,16 +1394,7 @@ namespace gbe
>  
>        ir::AddressSpace addrSpace = addressSpaceLLVMToGen(v.getType()->getAddressSpace());
>        if(addrSpace == ir::MEM_LOCAL) {
> -        ir::Function &f = ctx.getFunction();
> -        f.setUseSLM(true);
> -        const Constant *c = v.getInitializer();
> -        Type *ty = c->getType();
> -        uint32_t oldSlm = f.getSLMSize();
> -        uint32_t align = 8 * getAlignmentByte(unit, ty);
> -        uint32_t padding = getPadding(oldSlm*8, align);
> -
> -        f.setSLMSize(oldSlm + padding/8 + getTypeByteSize(unit, ty));
> -        const Value * val = cast<Value>(&v);
> +	const Value * val = cast<Value>(&v);
You introduced a tab in the above line. Please correct it with spaces. The above line should not
be modified in this patch. 



More information about the Beignet mailing list