update the "-cl-kernel-arg-info" option for SPIR

Sahasrabuddhe, Sameer sameer.sahasrabuddhe at amd.com
Tue Nov 25 02:43:21 PST 2014


 > Index: lib/CodeGen/CodeGenFunction.cpp
 > ===================================================================
 > --- lib/CodeGen/CodeGenFunction.cpp    (revision 222631)
 > +++ lib/CodeGen/CodeGenFunction.cpp    (working copy)
 > @@ -483,7 +483,8 @@
 >    kernelMDArgs.push_back(llvm::MDNode::get(Context, argTypeNames));
 >    kernelMDArgs.push_back(llvm::MDNode::get(Context, argBaseTypeNames));
 >    kernelMDArgs.push_back(llvm::MDNode::get(Context, argTypeQuals));
 > -  kernelMDArgs.push_back(llvm::MDNode::get(Context, argNames));
 > +  if(CGM.getCodeGenOpts().EmitOpenCLArgMetadata)

Needs a space after "if".

 > +    kernelMDArgs.push_back(llvm::MDNode::get(Context, argNames));

Beginning of line should align with "CGM".

 >  }
 >
 >  void CodeGenFunction::EmitOpenCLKernelMetadata(const FunctionDecl *FD,
 > @@ -497,9 +498,8 @@
 >    SmallVector <llvm::Value*, 5> kernelMDArgs;
 >    kernelMDArgs.push_back(Fn);
 >
 > -  if (CGM.getCodeGenOpts().EmitOpenCLArgMetadata)
 > -    GenOpenCLArgMetadata(FD, Fn, CGM, Context, kernelMDArgs,
 > -                         Builder, getContext());
 > +  GenOpenCLArgMetadata(FD, Fn, CGM, Context, kernelMDArgs,
 > +      Builder, getContext());

Beginning of line should align with "FD".

 >
 >    if (const VecTypeHintAttr *A = FD->getAttr<VecTypeHintAttr>()) {
 >      QualType hintQTy = A->getTypeHint();
 >

Looks good to me, other than those formatting fixes.

Sameer.




More information about the cfe-commits mailing list