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



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to