[PATCH] D38479: Make -mgeneral-regs-only more like GCC's
George Burgess IV via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 18 10:34:58 PDT 2017
george.burgess.iv added a comment.
> However, the tests cover floating point, but they don't cover vector calls (arm_neon.h).
`#include <arm_neon.h>` gives me ~12,000 errors, presumably because there are so many functions that take vectors/floats defined in it. The hope was that calling `bar` and `foo` in aarch64-mgeneral_regs_only.c would cover similar cases when the banned type was a vector. Is there another another case you had in mind?
================
Comment at: lib/Sema/SemaExprCXX.cpp:7477
+static bool typeHasFloatingOrVectorComponent(
+ QualType Ty, llvm::SmallDenseMap<const RecordType *, bool, 8> &TypeCache) {
+ if (Ty.isNull())
----------------
rengolin wrote:
> The `TypeCache` object seems local.
>
> It doesn't look like it needs to survive outside of this function, as per its usage and the comment:
>
> // We may see recursive types in broken code.
>
> and it just adds another argument passing.
Good point. I just ended up making this conservative in the face of broken code; should work just as well, and we don't have to deal with sketchy corner cases. :)
https://reviews.llvm.org/D38479
More information about the cfe-commits
mailing list