[PATCH] CodeGen: rename __builtin_arm_sevl to __sevl

Saleem Abdulrasool compnerd at compnerd.org
Tue Apr 29 22:10:27 PDT 2014


Hi joey, rengolin, t.p.northover,

ACLE adds the __sevl() extension.  Rename the hint from a custom name to the
ACLE specified name.

http://reviews.llvm.org/D3557

Files:
  include/clang/Basic/BuiltinsARM.def
  lib/CodeGen/CGBuiltin.cpp
  test/CodeGen/builtins-arm.c

Index: include/clang/Basic/BuiltinsARM.def
===================================================================
--- include/clang/Basic/BuiltinsARM.def
+++ include/clang/Basic/BuiltinsARM.def
@@ -59,7 +59,7 @@
 BUILTIN(__builtin_arm_crc32cd, "UiUiLLUi", "nc")
 
 // HINT
-BUILTIN(__builtin_arm_sevl, "v", "")
+BUILTIN(__sevl, "v", "")
 
 // Data barrier
 BUILTIN(__builtin_arm_dmb, "vUi", "nc")
Index: lib/CodeGen/CGBuiltin.cpp
===================================================================
--- lib/CodeGen/CGBuiltin.cpp
+++ lib/CodeGen/CGBuiltin.cpp
@@ -4331,6 +4331,11 @@
     return Builder.CreateCall(F, llvm::ConstantInt::get(Int32Ty, 1));
   }
 
+  if (BuiltinID == ARM::BI__sevl) {
+    Function *F = CGM.getIntrinsic(Intrinsic::arm_hint);
+    return Builder.CreateCall(F, llvm::ConstantInt::get(Int32Ty, 5));
+  }
+
   if (BuiltinID == ARM::BI__clear_cache) {
     assert(E->getNumArgs() == 2 && "__clear_cache takes 2 arguments");
     const FunctionDecl *FD = E->getDirectCallee();
@@ -4427,11 +4432,6 @@
     return Builder.CreateCall(F);
   }
 
-  if (BuiltinID == ARM::BI__builtin_arm_sevl) {
-    Function *F = CGM.getIntrinsic(Intrinsic::arm_hint);
-    return Builder.CreateCall(F, llvm::ConstantInt::get(Int32Ty, 5));
-  }
-
   // CRC32
   Intrinsic::ID CRCIntrinsicID = Intrinsic::not_intrinsic;
   switch (BuiltinID) {
Index: test/CodeGen/builtins-arm.c
===================================================================
--- test/CodeGen/builtins-arm.c
+++ test/CodeGen/builtins-arm.c
@@ -20,7 +20,7 @@
 }
 
 void sevl() {
-  __builtin_arm_sevl();
+  __sevl();
 }
 // CHECK: call {{.*}} @llvm.arm.hint(i32 5)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3557.8954.patch
Type: text/x-patch
Size: 1636 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140430/0a26f561/attachment.bin>


More information about the cfe-commits mailing list