[PATCH] D76077: [ARM] Add __bf16 as new Bfloat16 C Type
Aaron Smith via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 6 21:01:28 PDT 2020
asmith added a comment.
really happy for native bfloat support!
================
Comment at: clang/include/clang/AST/ASTContext.h:965
CanQualType HalfTy; // [OpenCL 6.1.1.1], ARM NEON
+ CanQualType BFloat16Ty; // ARM NEON
CanQualType Float16Ty; // C11 extension ISO/IEC TS 18661-3
----------------
Maybe the comment is unnecessary. I can imagine other targets besides ARM NEON using BFloat
================
Comment at: clang/include/clang/AST/Type.h:1982
bool isFloat16Type() const; // C11 extension ISO/IEC TS 18661
+ bool isBFloat16Type() const; // ARM BFloat
bool isFloat128Type() const;
----------------
don't think this comment adds anything
================
Comment at: clang/lib/AST/ASTContext.cpp:5907
case BuiltinType::Float128: return Float128Rank;
+ case BuiltinType::BFloat16: return BFloat16Rank;
}
----------------
extra spaces
================
Comment at: clang/lib/AST/ItaniumMangle.cpp:3186
case BuiltinType::Half: EltName = "float16_t";break;
+ case BuiltinType::BFloat16: EltName = "bfloat16x1_t";break;
default:
----------------
Add a space before break and on the line above.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76077/new/
https://reviews.llvm.org/D76077
More information about the cfe-commits
mailing list