[PATCH] D68521: [PATCH 36/38] [noalias] Clang CodeGen for restrict-qualified pointers
Erich Keane via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 9 14:32:03 PDT 2019
erichkeane added inline comments.
================
Comment at: clang/lib/AST/Type.cpp:115
+ }
+ } else if (const auto *ArrayTy = dyn_cast<ArrayType>(CannonTy)) {
+ return ArrayTy->getElementType().isRestrictOrContainsRestrictMembers();
----------------
Rather than this recursion, could you just unpack it from the CannonTy? So replace 107 with:
Type *CannonTy = getCanonicalType()->getBaseElementTypeUnsafe();
That way this is all unpacked and saves you a recursion.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68521/new/
https://reviews.llvm.org/D68521
More information about the llvm-commits
mailing list