Added a helper function for SimplifyLibCalls to allow functions annotated with APCS, AAPCS or AAPCS_VFP to be treated like normal C functions if they only have integer and/or pointer arguments and return values, and is not on iOS.
Details
Diff Detail
Event Timeline
Hi Sam,
Thanks for doing this. The testing in particular is really nice. I have a couple of superficial comments.
Cheers,
James
lib/Transforms/Utils/SimplifyLibCalls.cpp | ||
---|---|---|
59 | Typo: "compatible" | |
59 | 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() | |
64 | I think this would look neater as a switch. | |
68 | Please add a comment as to why. | |
78 | param -> Param | |
79 | This could simply be: if (!P->isPointerTy() && !P->isIntegerTy()) return false; |
LGTM with one change.
lib/Transforms/Utils/SimplifyLibCalls.cpp | ||
---|---|---|
86 | Just change this to default: return false; so we don't end up with "enumeration value not covered in switch" warnings. |
Typo: "compatible"