[PATCH] D149573: [Clang][C++23] Implement core language changes from P1467R9 extended floating-point types and standard names

2023-11-14 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs updated this revision to Diff 558099. codemzs added a comment. Hi @tahonermann, I've just pushed a new diff with tests for `va_arg` and `...`, ensuring promotion rules are intact. Also, I've made sure `getFloatingTypeOrder` returns `FRCR_Unordered` only when we're dealing with both

[PATCH] D149573: [Clang][C++23] Implement core language changes from P1467R9 extended floating-point types and standard names

2023-11-13 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs updated this revision to Diff 558083. codemzs set the repository for this revision to rG LLVM Github Monorepo. codemzs added a comment. Synced to the main and resolved merge conflicts, updated tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D149573: [Clang][C++23] Implement core language changes from P1467R9 extended floating-point types and standard names

2023-08-01 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs added a comment. @tahonermann I would like to understand your concern better on unordered floating point types as the callers of `getFloatingTypeOrder` handle this result as per the C++23 proposal, for example there is a test case that exercises this scenario: _Float16 f16_val_1 =

[PATCH] D149573: [Clang][C++23] Implement core language changes from P1467R9 extended floating-point types and standard names

2023-08-01 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs updated this revision to Diff 546100. codemzs marked an inline comment as done. codemzs added a comment. Updated with feedback from @tahonermann CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149573/new/ https://reviews.llvm.org/D149573 Files:

[PATCH] D149573: [Clang][C++23] Implement core language changes from P1467R9 extended floating-point types and standard names

2023-06-13 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs added a comment. @tahonermann Gentle ping, please let me know if you have any questions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149573/new/ https://reviews.llvm.org/D149573 ___

[PATCH] D149573: [Clang][C++23] Implement core language changes from P1467R9 extended floating-point types and standard names

2023-06-07 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs added inline comments. Comment at: clang/lib/Sema/SemaCast.cpp:1367 + Self.Context.doCXX23ExtendedFpTypesRulesApply(DestType, SrcType)) { +// Support for cast between fp16 and bf16 doesn't exist yet. +if (!((DestType->isBFloat16Type() ||

[PATCH] D149573: [Clang][C++23] Implement core language changes from P1467R9 extended floating-point types and standard names

2023-06-07 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs updated this revision to Diff 529171. codemzs marked 4 inline comments as done. codemzs set the repository for this revision to rG LLVM Github Monorepo. codemzs added a comment. Hi @tahonermann, Thank you for your insights on the patch. I concur with your perspective about the potential

[PATCH] D149573: [Clang][C++23] Implement core language changes from P1467R9 extended floating-point types and standard names

2023-06-05 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs added a comment. In D149573#4395968 , @erichkeane wrote: > This all LGTM, but I want @tahonermann to do a pass as well, he knows more > about FP than I do, so I don't want to accept without his run-through. Thank you, @erichkeane for the

[PATCH] D149573: [Clang][C++23] Implement core language changes from P1467R9 extended floating-point types and standard names

2023-06-02 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs added a subscriber: aaron.ballman. codemzs added a comment. In D149573#4391013 , @erichkeane wrote: > In D149573#4390895 , @codemzs wrote: > >> In D149573#4390863

[PATCH] D149573: [Clang][C++23] Implement core language changes from P1467R9 extended floating-point types and standard names

2023-06-02 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs added a comment. In D149573#4390863 , @stuij wrote: > This is going to be a very unhelpful comment. After looking through the > changes, I don't have any comments to make, but I also don't feel comfortable > to accept this revision as I don't

[PATCH] D150291: [Clang] Rename internal type identifier(s) for __bf16 to BF16Ty

2023-05-30 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs abandoned this revision. codemzs added a comment. Closing this as it has been resolved by D150913 . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150291/new/ https://reviews.llvm.org/D150291 ___

[PATCH] D149573: [Clang][C++23] Implement core language changes from P1467R9 extended floating-point types and standard names

2023-05-30 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs updated this revision to Diff 526524. codemzs added a comment. Remove unused header file. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149573/new/ https://reviews.llvm.org/D149573 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST/Type.h

[PATCH] D149573: [Clang][C++23] Implement core language changes from P1467R9 extended floating-point types and standard names

2023-05-30 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs updated this revision to Diff 526519. codemzs retitled this revision from "[Clang][C++23] Implement core language changes from P1467R9 extended floating-point types and standard names and adapt __bf16 to be arithmetic type" to "[Clang][C++23] Implement core language changes from P1467R9

[PATCH] D151610: [Docs] Fix Sphinx documentation formatting issues in LanguageExtensions.rst

2023-05-27 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs updated this revision to Diff 526246. codemzs retitled this revision from "[Docs] Fix formatting issues in LanguageExtensions.rst" to "[Docs] Fix Sphinx documentation formatting issues in LanguageExtensions.rst". codemzs edited the summary of this revision. codemzs added a reviewer:

[PATCH] D151610: [Docs] Fix formatting issues in LanguageExtensions.rst

2023-05-27 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs created this revision. codemzs added a reviewer: pengfei. Herald added a project: All. codemzs requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Missing indentation. Repository: rG LLVM Github Monorepo

[PATCH] D150913: [Clang][BFloat16] Upgrade __bf16 to arithmetic type, change mangling, and extend excess precision support.

2023-05-26 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs added a comment. Hi @rjmccall, @pengfei, and @zahiraam, Thank you for your valuable review and acceptance of my patch. As I lack commit access, could I kindly request one of you to perform the commit on my behalf? Please use the following command: `git commit --amend --author="M.

[PATCH] D150913: [Clang][BFloat16] Upgrade __bf16 to arithmetic type, change mangling, and extend excess precision support.

2023-05-26 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs updated this revision to Diff 526072. codemzs marked an inline comment as done. codemzs set the repository for this revision to rG LLVM Github Monorepo. codemzs added a comment. Addresses @rjmccall suggestions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D150913: [Clang][BFloat16] Upgrade __bf16 to arithmetic type, change mangling, and extend excess precision support.

2023-05-25 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs updated this revision to Diff 525920. codemzs marked 3 inline comments as done. codemzs added a comment. Addresses feedback on extended floating type documentation from @rjmccall and @pengfei CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150913/new/

[PATCH] D150913: [Clang][BFloat16] Upgrade __bf16 to arithmetic type, change mangling, and extend excess precision support.

2023-05-25 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs added inline comments. Comment at: clang/docs/LanguageExtensions.rst:852 ``double`` when passed to ``printf``, so the programmer must explicitly cast it to ``double`` before using it with an ``%f`` or similar specifier. pengfei wrote: > rjmccall

[PATCH] D150913: [Clang][BFloat16] Upgrade __bf16 to arithmetic type, change mangling, and extend excess precision support.

2023-05-24 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs updated this revision to Diff 525298. codemzs marked 5 inline comments as done. codemzs retitled this revision from "[Clang][Bfloat16] Upgrade __bf16 to arithmetic type, change mangling, and extend excess precision support." to "[Clang][BFloat16] Upgrade __bf16 to arithmetic type, change

[PATCH] D150913: [Clang][Bfloat16] Upgrade __bf16 to arithmetic type, change mangling, and extend excess precision support.

2023-05-22 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs added inline comments. Comment at: clang/lib/Basic/Targets/X86.cpp:362-363 HasX87 = true; +} else if (Feature == "+fullbf16") { + HasFullBFloat16 = true; } pengfei wrote: > Maybe not need it. Clarified on the other thread but if you

[PATCH] D150913: [Clang][Bfloat16] Upgrade __bf16 to arithmetic type, change mangling, and extend excess precision support.

2023-05-22 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs updated this revision to Diff 524467. codemzs marked 12 inline comments as done. codemzs added a comment. @pengfei, @zahiraam, I appreciate your feedback. @pengfei, the `HasFullBFloat16` flag is primarily for identifying hardware with native `bfloat16` support to facilitate automatic

[PATCH] D150913: [Clang][Bfloat16] Upgrade __bf16 to arithmetic type, change mangling, and extend excess precision support.

2023-05-19 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs marked an inline comment as done. codemzs added a comment. I believe I had updated the `__bf16` documentation in `/llvm-project/clang/docs/LanguageExtensions.rst`, but it appears to have been omitted in this patch. I assure you, I'll rectify this in the next iteration.

[PATCH] D149573: [Clang][C++23] Implement core language changes from P1467R9 extended floating-point types and standard names and adapt __bf16 to be arithmetic type

2023-05-18 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs added a comment. I have created a separate change to upgrade existing `__bf16` to arithmetic type at D150913 Comment at: clang/lib/AST/Type.cpp: + return (BT->getKind() >= BuiltinType::Bool && + BT->getKind() <=

[PATCH] D150913: [Clang][Bfloat16] Upgrade __bf16 to arithmetic type, change mangling, and extend excess precision support.

2023-05-18 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs added a comment. Misc style improvement. Comment at: clang/lib/AST/Type.cpp:2199 if (const auto *BT = dyn_cast(CanonicalType)) -return BT->getKind() >= BuiltinType::Bool && - BT->getKind() <= BuiltinType::Ibm128 && - BT->getKind() !=

[PATCH] D150913: [Clang][Bfloat16] Upgrade __bf16 to arithmetic type, change mangling, and extend excess precision support.

2023-05-18 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs created this revision. codemzs added reviewers: tahonermann, rjmccall, zahiraam, stuij, pengfei, erichkeane. Herald added subscribers: mattd, gchakrabarti, asavonic, kerbowa, kristof.beyls, jvesely. Herald added a project: All. codemzs requested review of this revision. Herald added

[PATCH] D150291: [Clang] Rename internal type identifier(s) for __bf16 to BF16Ty

2023-05-12 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs added a comment. In D150291#4338118 , @tahonermann wrote: >> I do wonder if we need two bfloat implementations, but for that I'll leave a >> comment on D149573 . > > Given the discussions occurring in D149573

[PATCH] D149573: [Clang][C++23] Implement core language changes from P1467R9 extended floating-point types and standard names and introduce Bfloat16 arithmetic type.

2023-05-12 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs marked an inline comment as done. codemzs added a comment. In D149573#4337480 , @stuij wrote: > I made a comment on the RFC > > to understand

[PATCH] D150291: [Clang] Rename internal type identifier(s) for __bf16 to BF16Ty

2023-05-11 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs added a comment. In D150291#4335352 , @tahonermann wrote: > Thanks for all the updates @codemzs! I'm going to go ahead and accept. But > please wait a few days for recently subscribed folks to have a chance to > comment before landing this.

[PATCH] D150291: [Clang] Rename internal type identifier(s) for __bf16 to BF16Ty

2023-05-11 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs updated this revision to Diff 521363. codemzs marked an inline comment as done. codemzs added a comment. Addressing feedback from @barannikov88 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150291/new/ https://reviews.llvm.org/D150291 Files: clang/include/clang-c/Index.h

[PATCH] D150291: [Clang] Rename internal type identifier(s) for __bf16 to BF16Ty

2023-05-11 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs marked an inline comment as done. codemzs added a comment. In D150291#4335360 , @barannikov88 wrote: > The summary as it is will be hard to read in git log. Please split it into > multiple lines 72~80 chars each. >

[PATCH] D150291: [Clang] Rename internal type identifier(s) for __bf16 to BF16Ty

2023-05-11 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs updated this revision to Diff 521353. codemzs marked 2 inline comments as done. codemzs set the repository for this revision to rG LLVM Github Monorepo. codemzs added a comment. Update comments as per feedback from @tahonermann Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D150291: [Clang] Rename internal type identifier(s) for __bf16 to BF16Ty

2023-05-10 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs added a comment. Thank you for pointing that out and for reviewing my code. I appreciate your guidance. I was following the LLVM contribution guidelines to use git clang-format, but I understand the importance of maintaining existing code styles that may be altered by git-clang format.

[PATCH] D150291: [Clang] Rename internal type identifier(s) for __bf16 to BF16Ty

2023-05-10 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs updated this revision to Diff 521163. codemzs marked 4 inline comments as done. codemzs retitled this revision from "[Clang] Rename internal type identifier(s) for `__bf16` to `BF16Ty`" to "[Clang] Rename internal type identifier(s) for __bf16 to BF16Ty". codemzs added a comment. PR

[PATCH] D150291: [Clang] Rename internal type identifier(s) for `__bf16` to `BF16Ty`

2023-05-10 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs created this revision. codemzs added reviewers: tahonermann, erichkeane, stuij. Herald added subscribers: mattd, gchakrabarti, asavonic, ctetreau, kerbowa, arphaman, kristof.beyls, jvesely. Herald added a project: All. codemzs requested review of this revision. Herald added subscribers:

[PATCH] D149573: [Clang][C++23] Implement core language changes from P1467R9 extended floating-point types and standard names and introduce Bfloat16 arithmetic type.

2023-05-10 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs marked an inline comment as done. codemzs added a comment. In D149573#4332549 , @tahonermann wrote: > I reviewed about a third of this, but then stopped due to the `__bf16` vs > `std::bfloat16_t` naming issues. I think the existing names that

[PATCH] D149573: [Clang][C++23] Implement core language changes from P1467R9 extended floating-point types and standard names and introduce Bfloat16 arithmetic type.

2023-05-09 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs added a comment. Hi @rjmccall and @erichkeane, I would like to inquire about the necessity of implementing excess precision support for `std::bfloat16_t` in this patch. In reference to the discussion on https://reviews.llvm.org/D136919, it was mentioned that introducing

[PATCH] D149573: [Clang][C++23] Implement core language changes from P1467R9 extended floating-point types and standard names and introduce Bfloat16 arithmetic type.

2023-05-09 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs marked an inline comment as done. codemzs added a comment. Hi @rjmccall and @erichkeane, I would like to inquire about the necessity of implementing excess precision support for `std::bfloat16_t` in this patch. In reference to the discussion on https://reviews.llvm.org/D136919, it was

[PATCH] D149573: [Clang][C++23] Implement core language changes from P1467R9 extended floating-point types and standard names and introduce Bfloat16 arithmetic type.

2023-05-09 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs marked 2 inline comments as done. codemzs added inline comments. Comment at: clang/include/clang/Basic/LangOptions.def:468 +LANGOPT(ExperimentalNewItaniumMangling, 1, 0, "experimental new Itanium mangling") + erichkeane wrote: > codemzs wrote: > >

[PATCH] D149573: [Clang][C++23] Implement core language changes from P1467R9 extended floating-point types and standard names and introduce Bfloat16 arithmetic type.

2023-05-03 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs added a comment. Thank you @erichkeane for your insightful review. I have addressed the feedback from your previous review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149573/new/ https://reviews.llvm.org/D149573

[PATCH] D149573: [Clang][C++23] Implement core language changes from P1467R9 extended floating-point types and standard names and introduce Bfloat16 arithmetic type.

2023-05-03 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs marked 10 inline comments as done. codemzs added a comment. Addressing @erichkeane 's review comments and pushing out the updated patch. Comment at: clang/include/clang/Basic/LangOptions.def:468 +LANGOPT(ExperimentalNewItaniumMangling, 1, 0, "experimental new Itanium

[PATCH] D149573: [Clang][C++23] Implement core language changes from P1467R9 extended floating-point types and standard names and introduce Bfloat16 arithmetic type.

2023-05-01 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs added a comment. In D149573#4310601 , @philnik wrote: > In D149573#4310009 , @codemzs wrote: > >> My change to libcxxabi/test/test_demangle.pass.cpp (last file in the change) >> is only one line i.e

[PATCH] D149573: [Clang][C++23] Implement core language changes from P1467R9 extended floating-point types and standard names and introduce Bfloat16 arithmetic type.

2023-05-01 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs added a comment. My change to libcxxabi/test/test_demangle.pass.cpp (last file in the change) is one is only one line i.e {"_ZNK5clang4Type16isArithmeticTypeERNS_10ASTContextE", "clang::Type::isArithmeticType(clang::ASTContext&) const"}, but running clang-format on it changes bunch of

[PATCH] D149573: [Clang][C++23] Implement core language changes from P1467R9 extended floating-point types and standard names and introduce Bfloat16 arithmetic type.

2023-05-01 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs updated this revision to Diff 518468. codemzs added a comment. Herald added subscribers: mstorsjo, mgrang, fedor.sergeev. Fix Clang format failures. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149573/new/ https://reviews.llvm.org/D149573 Files:

[PATCH] D149573: [Clang][C++23] Implement core language changes from P1467R9 extended floating-point types and standard names and introduce Bfloat16 arithmetic type.

2023-05-01 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs added inline comments. Comment at: libcxxabi/test/test_demangle.pass.cpp:10921 {"_ZNK5clang4Type10isRealTypeEv", "clang::Type::isRealType() const"}, -{"_ZNK5clang4Type16isArithmeticTypeEv", "clang::Type::isArithmeticType() const"}, +

[PATCH] D149573: [Clang][C++23] Implement core language changes from P1467R9 extended floating-point types and standard names and introduce Bfloat16 arithmetic type.

2023-05-01 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs added a comment. In D149573#4309378 , @tschuett wrote: > I don't believe that there is NativeBFloat16Type. AArch64 learned bf16 with > ARMv8.6-A, but very limited operations and only in SIMD. X86 supports bf16 > since Cooperlake, but very