[PATCH] D24453: Simplify Libcalls for ARM PCS

Sam Parker via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 12 08:34:55 PDT 2016


samparker added a comment.

revision to follow.


================
Comment at: lib/Transforms/Utils/SimplifyLibCalls.cpp:59
@@ -58,1 +58,3 @@
 
+static bool isCallingConvCompatiable(CallInst *CI) {
+  llvm::CallingConv::ID CC = CI->getCallingConv();
----------------
jmolloy wrote:
> jmolloy wrote:
> > Typo: "compatible"
> It'd be nice for the function to encode that it's talking about compatibility with the C calling convention. I understand that that would put a lot of C's in a row though...
> 
>     isCallingConvCCompatible()
cheers, I forgot to change this before uploading.

================
Comment at: lib/Transforms/Utils/SimplifyLibCalls.cpp:64
@@ +63,3 @@
+
+  if (CC == llvm::CallingConv::ARM_APCS ||
+      CC == llvm::CallingConv::ARM_AAPCS ||
----------------
jmolloy wrote:
> I think this would look neater as a switch.
sure

================
Comment at: lib/Transforms/Utils/SimplifyLibCalls.cpp:79
@@ +78,3 @@
+    for (auto param : FuncTy->params()) {
+      if (param->isPointerTy() || param->isIntegerTy())
+        continue;
----------------
jmolloy wrote:
> This could simply be:
> 
>     if (!P->isPointerTy() && !P->isIntegerTy())
>       return false;
much nicer.


https://reviews.llvm.org/D24453





More information about the llvm-commits mailing list