#
013c7d1f |
| 26-Jan-2023 |
eopXD <yueh.ting.chen@gmail.com> |
[2/3][Clang][RISCV] Add `__riscv_` for non-overloaded intrinsics
This commit adds prefix for the non-overloaded RVV intrinsics.
This is the 2nd commit of a patch-set to add __riscv_ for all RVV int
[2/3][Clang][RISCV] Add `__riscv_` for non-overloaded intrinsics
This commit adds prefix for the non-overloaded RVV intrinsics.
This is the 2nd commit of a patch-set to add __riscv_ for all RVV intrinsics.
This follows the naming guideline under riscv-c-api-doc to add the `__riscv_` suffix for all RVV intrinsics.
Pull Request: riscv-non-isa/riscv-c-api-doc#31 riscv-non-isa/rvv-intrinsic-doc#189
Depends on D142085.
Reviewed By: kito-cheng
Differential Revision: https://reviews.llvm.org/D142644
show more ...
|
#
a6f66d57 |
| 31-Jan-2023 |
eopXD <yueh.ting.chen@gmail.com> |
Revert "[2/3][Clang][RISCV] Add `__riscv_` for non-overloaded intrinsics"
This reverts commit 2153544865a9733b06579823814c981f735e4201. Buildbot failure https://lab.llvm.org/buildbot#builders/139/bu
Revert "[2/3][Clang][RISCV] Add `__riscv_` for non-overloaded intrinsics"
This reverts commit 2153544865a9733b06579823814c981f735e4201. Buildbot failure https://lab.llvm.org/buildbot#builders/139/builds/35218 shows left-out test cases that were not updated.
show more ...
|
#
21535448 |
| 26-Jan-2023 |
eopXD <yueh.ting.chen@gmail.com> |
[2/3][Clang][RISCV] Add `__riscv_` for non-overloaded intrinsics
This commit adds prefix for the non-overloaded RVV intrinsics.
This is the 2nd commit of a patch-set to add __riscv_ for all RVV int
[2/3][Clang][RISCV] Add `__riscv_` for non-overloaded intrinsics
This commit adds prefix for the non-overloaded RVV intrinsics.
This is the 2nd commit of a patch-set to add __riscv_ for all RVV intrinsics.
This follows the naming guideline under riscv-c-api-doc to add the `__riscv_` suffix for all RVV intrinsics.
Pull Request: riscv-non-isa/riscv-c-api-doc#31 riscv-non-isa/rvv-intrinsic-doc#189
Depends on D142085.
Reviewed By: kito-cheng
Differential Revision: https://reviews.llvm.org/D142644
show more ...
|
Revision tags: llvmorg-17-init |
|
#
d94a315e |
| 18-Jan-2023 |
eopXD <yueh.ting.chen@gmail.com> |
[Clang][RISCV] Simplify RVV intrinsic policy suffix
This patch works towards the simplification proposal [0] of Nick Knight. After this patch, we have reduced the hierarchy of intrinsics from two se
[Clang][RISCV] Simplify RVV intrinsic policy suffix
This patch works towards the simplification proposal [0] of Nick Knight. After this patch, we have reduced the hierarchy of intrinsics from two sets (non-policy and policy) into a single set, with a general assumption that policy behavior is agnostic unless specified.
[0] https://gist.github.com/nick-knight/6cb0b74b351a25323dfb1821d3a269b9
Pull Request: riscv-non-isa/rvv-intrinsic-doc#186.
Depends on D141796.
Reviewed By: craig.topper, kito-cheng
Differential Revision: https://reviews.llvm.org/D142016
show more ...
|
#
8700beee |
| 24-Jan-2023 |
Douglas Yung <douglas.yung@sony.com> |
Revert "[15/15][Clang][RISCV][NFC] Set data member under Policy as constants"
This reverts commit 2b807336ad385e64a7d182d5fb67bdfe449707a3.
This change is causing Windows builds to hang and out of
Revert "[15/15][Clang][RISCV][NFC] Set data member under Policy as constants"
This reverts commit 2b807336ad385e64a7d182d5fb67bdfe449707a3.
This change is causing Windows builds to hang and out of memory errors with clang-15: - https://lab.llvm.org/buildbot/#/builders/17/builds/33129 - https://lab.llvm.org/buildbot/#/builders/174/builds/17069 - https://lab.llvm.org/buildbot/#/builders/83/builds/28484 - https://lab.llvm.org/buildbot/#/builders/172/builds/22803 - https://lab.llvm.org/buildbot/#/builders/216/builds/16210
show more ...
|
#
2b807336 |
| 15-Jan-2023 |
eopXD <yueh.ting.chen@gmail.com> |
[15/15][Clang][RISCV][NFC] Set data member under Policy as constants
The object is now correct by construction.
This is the 15th commit of a patch-set that aims to change the default policy for RVV
[15/15][Clang][RISCV][NFC] Set data member under Policy as constants
The object is now correct by construction.
This is the 15th commit of a patch-set that aims to change the default policy for RVV intrinsics from TAMU to TAMA.
Please refer to the cover letter in the 1st commit (D141573) for an overview.
Depends on D141793.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D141796
show more ...
|
#
84c8bbe9 |
| 15-Jan-2023 |
eopXD <yueh.ting.chen@gmail.com> |
[14/15][Clang][RISCV] Change default policy from TAMU to TAMA
After this commit, the non-policy variants of `vid` and `viota` are no longer available for an oveloaded version since the default polic
[14/15][Clang][RISCV] Change default policy from TAMU to TAMA
After this commit, the non-policy variants of `vid` and `viota` are no longer available for an oveloaded version since the default policy is now TAMA and the masked-off operand is removed.
Be noted that ALL RVV intrinsics now operate under the general assumption that a policy behavior is "agnostic" unless specified. Therefore this patch also changes the semantic of policy intrinsics with the suffix of `_ta` and `tu`. These intrinsics don't have their mask policy specified and was assumed to be undisturbed. It is now changed to agnostic.
This is the 14th commit of a patch-set that aims to change the default policy for RVV intrinsics from TAMU to TAMA.
Please refer to the cover letter in the 1st commit (D141573) for an overview.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D141793
show more ...
|
#
377d2604 |
| 14-Jan-2023 |
eopXD <yueh.ting.chen@gmail.com> |
[11/15][Clang][RISCV][NFC] Remove Policy::PolicyType::Omit
The attribute can be removed now as preceding patches have removed its users.
This is the 11th commit of a patch-set that aims to change t
[11/15][Clang][RISCV][NFC] Remove Policy::PolicyType::Omit
The attribute can be removed now as preceding patches have removed its users.
This is the 11th commit of a patch-set that aims to change the default policy for RVV intrinsics from TAMU to TAMA.
Please refer to the cover letter in the 1st commit (D141573) for an overview.
Reviewed By: craig.topper, kito-cheng
Differential Revision: https://reviews.llvm.org/D141768
show more ...
|
#
ecbf5db8 |
| 24-Jan-2023 |
eopXD <yueh.ting.chen@gmail.com> |
[6/15][Clang][RISCV][NFC] Instructions with a mask destination register is always tail agnostic
The logic under `computeBuiltinTypes` is an amendment to setting Policy as `Omit`. The tail policy sho
[6/15][Clang][RISCV][NFC] Instructions with a mask destination register is always tail agnostic
The logic under `computeBuiltinTypes` is an amendment to setting Policy as `Omit`. The tail policy should be set to agnostic for those intrinsics that has `HasTailPolicy = false`, which are the intrinsics with a mask destination register.
This is the 6th commit of a patch-set that aims to change the default policy for RVV intrinsics from TAMU to TAMA.
Please refer to the cover letter in the 1st commit (D141573) for an overview.
Reviewed By: craig.topper, kito-cheng
Differential Revision: https://reviews.llvm.org/D141756
show more ...
|
#
6f0d0be5 |
| 14-Jan-2023 |
eopXD <yueh.ting.chen@gmail.com> |
[5/15][Clang][RISCV][NFC] Remove extra attribute Policy::IntrinsicWithoutMU by reusing HasTailPolicy and HasMaskPolicy
Righteously there shouldn't be any special cases here because `HasTailPolicy` a
[5/15][Clang][RISCV][NFC] Remove extra attribute Policy::IntrinsicWithoutMU by reusing HasTailPolicy and HasMaskPolicy
Righteously there shouldn't be any special cases here because `HasTailPolicy` and `HasMaskPolicy` is able to express necessary cases. This commit is a part of the step-by-step effort to remove `Policy::Scheme::Omit`, which completely does not make sense in RVV 1.0 because an RVV instruction always executes with `vta` and `vma` set to a certain value.
This is the 5th commit of a patch-set that aims to change the default policy for RVV intrinsics from TAMU to TAMA.
Please refer to the cover letter in the 1st commit (D141573) for an overview.
Reviewed By: craig.topper, kito-cheng
Differential Revision: https://reviews.llvm.org/D141754
show more ...
|
Revision tags: llvmorg-15.0.7 |
|
#
f8ec44b2 |
| 07-Jan-2023 |
eopXD <yueh.ting.chen@gmail.com> |
[4/15][Clang][RISCV][NFC] Remove unnecessary logic under RVVIntrinsic::computeBuiltinTypes
`PolicyAttrs::IsUnspecified` is modified in `RVV::Intrinsic::computeBuiltInTypes` and used under `RVVIntrin
[4/15][Clang][RISCV][NFC] Remove unnecessary logic under RVVIntrinsic::computeBuiltinTypes
`PolicyAttrs::IsUnspecified` is modified in `RVV::Intrinsic::computeBuiltInTypes` and used under `RVVIntrinsic::updateNamesAndPolicy`. Suprisingly the modification in `RVV::Intrinsic::computeBuiltInTypes` is completely unnecessary. This commit removes the redundant logic.
This is the 4th commit of a patch-set that aims to change the default policy for RVV intrinsics from TAMU to TAMA.
Please refer to the cover letter in the 1st commit (D141573) for an overview.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D141577
show more ...
|
#
06380284 |
| 07-Jan-2023 |
eopXD <yueh.ting.chen@gmail.com> |
[3/15][Clang][RISCV][NFC] Clarify edge cases of RVVIntrinsic::getSupportedMaskedPolicies for clarity
This is the 3rd commit of a patch-set that aims to change the default policy for RVV intrinsics f
[3/15][Clang][RISCV][NFC] Clarify edge cases of RVVIntrinsic::getSupportedMaskedPolicies for clarity
This is the 3rd commit of a patch-set that aims to change the default policy for RVV intrinsics from TAMU to TAMA.
Please refer to the cover letter in the 1st commit (D141573) for an overview.
Reviewed By: kito-cheng
Differential Revision: https://reviews.llvm.org/D141575
show more ...
|
#
74252fb1 |
| 07-Jan-2023 |
eopXD <yueh.ting.chen@gmail.com> |
[2/15][Clang][RISCV][NFC] Rename Policy::IsPolicyNone to IsUnspecifed
The original naming is inaccurate. An RVV intrinsic always comes with a corresponding policy behavior. When the policy is unspec
[2/15][Clang][RISCV][NFC] Rename Policy::IsPolicyNone to IsUnspecifed
The original naming is inaccurate. An RVV intrinsic always comes with a corresponding policy behavior. When the policy is unspecified for an intrinsic, its policy behavior should be it's default assumption.
This is the 2nd commit of a patch-set that aims to change the default policy for RVV intrinsics from TAMU to TAMA.
Please refer to the cover letter in the 1st commit (D141573) for an overview.
Reviewed By: kito-cheng
Differential Revision: https://reviews.llvm.org/D141574
show more ...
|
#
62449823 |
| 05-Jan-2023 |
eopXD <yueh.ting.chen@gmail.com> |
[1/15][Clang][RISCV][NFC] Extract common utility to RISCVVIntrinsicUtils
This is the 1st commit of a patch-set that aims to change the default policy for RVV intrinsics from TAMU to TAMA.
The patch
[1/15][Clang][RISCV][NFC] Extract common utility to RISCVVIntrinsicUtils
This is the 1st commit of a patch-set that aims to change the default policy for RVV intrinsics from TAMU to TAMA.
The patch-set work towards the simplification proposal [0] of Nick Knight. After this patch-set, all intrinsics operates under a general assumption that the policy behavior is agnostic.
You may find that most of the patches are NFC patches. They subtly remove implicit assumptions that entangles the codebase, making the singular patch that contains functional change clear and obvious.
In [2/15], The attribute `Policy::IsPolicyNone` may give the mis-perception that an RVV intrinsic may operate without any policy. However this is not the case because the policy CSR-s (`vta` and `vma`) always affect an RVV instruction's behavior, except that some instructions have policy always set as agnostic (e.g. instructions with a mask destination register is always tail agnostic).
Next, to perform the change from TAMU to TAMA, we need to first remove `Policy::PolicyType::Omit`. [4/15] ~ [12/15] removes it with NFC patches step by step. Without the patches, directly applying [14/15] to the existing codebase will not work because there will be complicated logics that are scattered in places that is hard to maintain.
[1/15], [3/15] are not related to the main goal of this patch-set, they were clean-up along the way as I was going through the codebase. [13/15] is a clean-up that was an oversight in D141198.
Finally, [14/15] performs the functional change this patch-set aims for. The default policy is changed from TAMU to TAMA. This affects the masked version of the intrinsics without a policy suffix. The masked-off operand is removed. Due to the removal, masked version of `vid` and `viota` intrinsics are no longer available for overloading.
[15/15] is a final commit to set data members of `Policy` as constants. Through the refactoring the class `Policy` is now correct-by-construction.
The next patch-set will be to remove redundant intrinsics with a policy suffix `_ta` and `_tama` intrinsics are redundant and will be removed. Other policy suffix will be renamed to adapt to the general assumption that policy is generally agnostic.
[0] https://gist.github.com/nick-knight/6cb0b74b351a25323dfb1821d3a269b9
Pull Request: riscv-non-isa/rvv-intrinsic-doc#186
Reviewed By: craig.topper, kito-cheng
Differential Revision: https://reviews.llvm.org/D141573
show more ...
|
#
6b282294 |
| 04-Jan-2023 |
eopXD <yueh.ting.chen@gmail.com> |
[7/7][Clang][RISCV][NFC] Remove attribute `IsPrototypeDefaultTU`
This is the 7th commit of a patch-set that aims to remove the IsPrototypeDefaultTU special case for the rvv-intrinsics.
This is the
[7/7][Clang][RISCV][NFC] Remove attribute `IsPrototypeDefaultTU`
This is the 7th commit of a patch-set that aims to remove the IsPrototypeDefaultTU special case for the rvv-intrinsics.
This is the final commit of the patch-set. Now that no intrinsics is using the attribute, we are safe to remove it.
Please refer to the cover letter in the 1st commit (D140895) for an overview.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D140954
show more ...
|
#
2532aa57 |
| 27-Dec-2022 |
eopXD <yueh.ting.chen@gmail.com> |
[Clang][RISCV] Update operand order for vmerge and vcompress
From: vint32m1_t vmerge_vvm_i32m1 (vbool32_t mask, vint32m1_t op1, vint32m1_t op2, size_t vl); vint32m1_t vcompress_vm_i32m1 (vbool32
[Clang][RISCV] Update operand order for vmerge and vcompress
From: vint32m1_t vmerge_vvm_i32m1 (vbool32_t mask, vint32m1_t op1, vint32m1_t op2, size_t vl); vint32m1_t vcompress_vm_i32m1 (vbool32_t mask, vint32m1_t src, size_t vl);
To: vint32m1_t vmerge_vvm_i32m1 (vint32m1_t op1, vint32m1_t op2, vbool32_t selector, size_t vl); vint32m1_t vcompress_vm_i32m1 (vint32m1_t src, vbool32_t selector, size_t vl);
Address issues: riscv-non-isa/rvv-intrinsic-doc#140 riscv-non-isa/rvv-intrinsic-doc#167
Pull request: riscv-non-isa/rvv-intrinsic-doc#185
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D140686
show more ...
|
#
9cf4419e |
| 02-Jan-2023 |
Kazu Hirata <kazu@google.com> |
[clang] Use std::optional instead of llvm::Optional (NFC)
This is part of an effort to migrate from llvm::Optional to std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalu
[clang] Use std::optional instead of llvm::Optional (NFC)
This is part of an effort to migrate from llvm::Optional to std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
show more ...
|
#
1deb6bce |
| 22-Dec-2022 |
eopXD <yueh.ting.chen@gmail.com> |
[NFC][Clang][RISCV] Rename data member 'DefaultPolicy' to 'PolicyAttrs'
The naming here is strange since the value may still be updated.
Reviewed By: kito-cheng, khchen
Differential Revision: http
[NFC][Clang][RISCV] Rename data member 'DefaultPolicy' to 'PolicyAttrs'
The naming here is strange since the value may still be updated.
Reviewed By: kito-cheng, khchen
Differential Revision: https://reviews.llvm.org/D140389
show more ...
|
#
904a79f9 |
| 25-Dec-2022 |
eopXD <yueh.ting.chen@gmail.com> |
[NFC][Clang][RISCV] Reduce for-loop with SmallVector utility
As topic, this commit reduces the for-loops with utilities of SmallVector.
Reviewed By: craig.topper
Differential Revision: https://rev
[NFC][Clang][RISCV] Reduce for-loop with SmallVector utility
As topic, this commit reduces the for-loops with utilities of SmallVector.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D140661
show more ...
|
#
0d4c6506 |
| 20-Dec-2022 |
Piyou Chen <piyou.chen@sifive.com> |
[RISCV] Refactor RVV Policy by structure
RVV intrinsic function has several policy variants.
Include TU, TA, TAMU, TAMA, TUMU, TUMA, MU, MA, TUM, TAM
Currently, the clang side enumerates these pol
[RISCV] Refactor RVV Policy by structure
RVV intrinsic function has several policy variants.
Include TU, TA, TAMU, TAMA, TUMU, TUMA, MU, MA, TUM, TAM
Currently, the clang side enumerates these policies, but it's hard to add a new policy.
This patch use structure to replace the origin policy enumeration, and enhance some policy transform logic.
This is a clean-up job that will not affect the RVV intrinsic functionality and make sure riscv_vector_builtin_cg.inc is the same as the original one.
Reviewed By: kito-cheng
Differential Revision: https://reviews.llvm.org/D139995
show more ...
|
#
fc6ca0d0 |
| 17-Dec-2022 |
Fangrui Song <i@maskray.me> |
[clang] llvm::Optional::value => operator*/operator->
std::optional::value() has undesired exception checking semantics and is unavailable in some older Xcode. The call sites block std::optional mig
[clang] llvm::Optional::value => operator*/operator->
std::optional::value() has undesired exception checking semantics and is unavailable in some older Xcode. The call sites block std::optional migration.
show more ...
|
#
f4b90773 |
| 17-Dec-2022 |
Fangrui Song <i@maskray.me> |
llvm::Optional::value => operator*/operator->
std::optional::value() has undesired exception checking semantics and is unavailable in some older Xcode. The call sites block std::optional migration.
|
#
5891420e |
| 03-Dec-2022 |
Kazu Hirata <kazu@google.com> |
[clang] Use std::nullopt instead of None (NFC)
This patch mechanically replaces None with std::nullopt where the compiler would warn if None were deprecated. The intent is to reduce the amount of m
[clang] Use std::nullopt instead of None (NFC)
This patch mechanically replaces None with std::nullopt where the compiler would warn if None were deprecated. The intent is to reduce the amount of manual work required in migrating from Optional to std::optional.
This is part of an effort to migrate from llvm::Optional to std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
show more ...
|
Revision tags: llvmorg-15.0.6 |
|
#
3fe89be8 |
| 21-Nov-2022 |
Kito Cheng <kito.cheng@sifive.com> |
[clang][RISCV][NFC] Prevent data race in RVVType::computeType
Introduce a RVVTypeCache to hold the cache instead of using a local static variable to maintain a cache.
Also made construct of RVVType
[clang][RISCV][NFC] Prevent data race in RVVType::computeType
Introduce a RVVTypeCache to hold the cache instead of using a local static variable to maintain a cache.
Also made construct of RVVType to private, make sure that could be only created by a cache manager.
Reviewed By: sammccall
Differential Revision: https://reviews.llvm.org/D138429
show more ...
|
Revision tags: llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2 |
|
#
010f3298 |
| 04-Aug-2022 |
Zakk Chen <zakkc@google.com> |
[RISCV][Clang] Support policy function for all vector segment load.
We will switch all UndefValue to PoisonValue in follow up patches.
Reviewed By: kito-cheng
Differential Revision: https://review
[RISCV][Clang] Support policy function for all vector segment load.
We will switch all UndefValue to PoisonValue in follow up patches.
Reviewed By: kito-cheng
Differential Revision: https://reviews.llvm.org/D126750
show more ...
|