Hi Hao, GenOpString() is only used to generate function body, but here I want to modified the function's argument name, like switching vcopy_lane(a, b, c) to vcopy_lane(a1, b1, c1).
2013/10/10 Hao Liu <[email protected]> > Hi Kevin, > > There are two points of hard code in shared functions: > > + //To avoid argument being multiple defined, add extra number for > renaming. > + if (name == "vcopy_lane") > + s.push_back('1'); > > + bool extranumber = false; > + if(name == "vcopy_lane") > + extranumber = true; > > s += TypeString(proto[i], typestr) + " __"; > s.push_back(arg); > + if(extranumber) > + s.push_back('1'); > s += " = ("; > s.push_back(arg); > + if(extranumber) > + s.push_back('1'); > > > I think maybe this is not necessary. Because you can achieve renaming in > function GenOpString(name, op, proto, typestr). > As this function has passed the "name", you can handle renaming under the > switch case of OpCopy like: > > case OpCopy: { > if (name == "vcopy_lane") { > renaming .... > } > } > > -----Original Message----- > From: [email protected] [mailto: > [email protected]] On Behalf Of Kevin Qin > Sent: Tuesday, October 08, 2013 6:34 AM > To: [email protected]; [email protected] > Cc: [email protected]; [email protected] > Subject: [PATCH] Implement aarch64 neon instruction class SIMD copy - Clang > > Implemented related ACLE intrinsic : vget_lane, vset_lane, vcopy_lane, > vcreate, vdup_n, vdup_lane, vmov_n > > Please review, thanks. > > http://llvm-reviews.chandlerc.com/D1855 > > Files: > include/clang/Basic/arm_neon.td > lib/CodeGen/CGBuiltin.cpp > test/CodeGen/aarch64-neon-copy.c > utils/TableGen/NeonEmitter.cpp > > > -- Best Regards, Kevin Qin
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
