[PATCH] [Clang - ARM/AArch64] Add ACLE special register intrinsics (10.1)

Renato Golin renato.golin at linaro.org
Thu May 28 06:44:45 PDT 2015


================
Comment at: lib/CodeGen/CGBuiltin.cpp:3272
@@ +3271,3 @@
+                                         const CallExpr *E,
+                                         bool IsAArch64, bool Is64Bit,
+                                         bool IsRead, bool IsPointerBuiltin) {
----------------
IsAArch64 in a generic function doesn't make sense. Is64Bit may make some sense, but I'd prefer if you pass what you really need.

In this case, I believe it's more about the types. So just receive what (input/output) types you need, and let the caller decide which types to pass.

================
Comment at: lib/CodeGen/CGBuiltin.cpp:4327
@@ +4326,3 @@
+
+    bool Is64Bit = BuiltinID != AArch64::BI__builtin_arm_rsr &&
+                   BuiltinID != AArch64::BI__builtin_arm_wsr;
----------------
For example, you could use this boolean to create a type:

    llvm::Type *Ty = (Is64Bit ? Int64Ty : Int32Ty);

and pass Ty, instead of the boolean.

================
Comment at: lib/Sema/SemaChecking.cpp:2616
@@ +2615,3 @@
+                                    unsigned ExpectedFieldNum, bool AllowName,
+                                    bool IsAArch64) {
+  // We can't check the value of a dependent argument.
----------------
same argument here.

http://reviews.llvm.org/D9697

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list