[PATCH] Implement aarch64 neon instruction class SIMD copy - Clang
Kevin Qin
kevinqindev at gmail.com
Thu Oct 10 18:50:17 PDT 2013
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 <Hao.Liu at arm.com>
> 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: cfe-commits-bounces at cs.uiuc.edu [mailto:
> cfe-commits-bounces at cs.uiuc.edu] On Behalf Of Kevin Qin
> Sent: Tuesday, October 08, 2013 6:34 AM
> To: kevinqindev at gmail.com; t.p.northover at gmail.com
> Cc: llvm-commits at cs.uiuc.edu; cfe-commits at cs.uiuc.edu
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131011/1273016e/attachment.html>
More information about the llvm-commits
mailing list