#
481db13f |
| 13-Oct-2021 |
Ben Shi <powerman1st@163.com> |
[RISCV] Optimize immediate materialisation with SLLI.UW
Use LUI+SLLI.UW to compose the upper bits instead of LUI+SLLI.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D11
[RISCV] Optimize immediate materialisation with SLLI.UW
Use LUI+SLLI.UW to compose the upper bits instead of LUI+SLLI.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D111705
show more ...
|
#
787eeb85 |
| 11-Oct-2021 |
Ben Shi <powerman1st@163.com> |
[RISCV] Optimize immediate materialisation with BCLRI
Do the following optimization for immediate materialisation:
1. For values in range 0xffffffff 7fffffff ~ 0xffffffff 00000000, first generat
[RISCV] Optimize immediate materialisation with BCLRI
Do the following optimization for immediate materialisation:
1. For values in range 0xffffffff 7fffffff ~ 0xffffffff 00000000, first generate the lower 32-bit with Val|0x80000000 (which is expected be an int32), then emit (BCLRI r, 31).
2. For values in range 0x80000000 ~ 0xffffffff, first generate the lower 32-bit with Val&~0x80000000 (which is expected to be an int32), then emit (BSETI r, 31).
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D111532
show more ...
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3 |
|
#
f2933610 |
| 13-Sep-2021 |
Jim Lin <jim@andestech.com> |
[RISCV] Rename prefix `FeatureExt*` to `FeatureStdExt*` for all sub-extension
Rename prefix `FeatureExt*` to `FeatureStdExt*` for all sub-extension for consistency
Reviewed By: HsiangKai, asb
Diff
[RISCV] Rename prefix `FeatureExt*` to `FeatureStdExt*` for all sub-extension
Rename prefix `FeatureExt*` to `FeatureStdExt*` for all sub-extension for consistency
Reviewed By: HsiangKai, asb
Differential Revision: https://reviews.llvm.org/D108187
show more ...
|
#
1104e325 |
| 03-Sep-2021 |
Alexander Pivovarov <apivovarov@gmail.com> |
Fix typo in RISCVMatInt.cpp comments
|
Revision tags: llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init |
|
#
81efb825 |
| 20-Jul-2021 |
Craig Topper <craig.topper@sifive.com> |
[RISCV] Teach RISCVMatInt about cases where it can use LUI+SLLI to replace LUI+ADDI+SLLI for large constants.
If we need to shift left anyway we might be able to take advantage of LUI implicitly shi
[RISCV] Teach RISCVMatInt about cases where it can use LUI+SLLI to replace LUI+ADDI+SLLI for large constants.
If we need to shift left anyway we might be able to take advantage of LUI implicitly shifting its immediate left by 12 to cover part of the shift. This allows us to use more bits of the LUI immediate to avoid an ADDI.
isDesirableToCommuteWithShift now considers compressed instruction opportunities when deciding if commuting should be allowed.
I believe this is the same or similar to one of the optimizations from D79492.
Reviewed By: luismarques, arcbbb
Differential Revision: https://reviews.llvm.org/D105417
show more ...
|
#
4dbb7880 |
| 16-Jul-2021 |
Craig Topper <craig.topper@sifive.com> |
[RISCV] Teach constant materialization that it can use zext.w at the end with Zba to reduce number of instructions.
If the upper 32 bits are zero and bit 31 is set, we might be able to use zext.w to
[RISCV] Teach constant materialization that it can use zext.w at the end with Zba to reduce number of instructions.
If the upper 32 bits are zero and bit 31 is set, we might be able to use zext.w to fill in the zeros after using an lui and/or addi.
Most of this patch is plumbing the subtarget features into the constant materialization.
Reviewed By: luismarques
Differential Revision: https://reviews.llvm.org/D105509
show more ...
|
Revision tags: llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5 |
|
#
d7ffa82a |
| 02-Apr-2021 |
Craig Topper <craig.topper@sifive.com> |
[RISCV] Improve 64-bit integer constant materialization for more cases.
For positive constants we try shifting left to remove leading zeros and fill the bottom bits with 1s. We then materialize that
[RISCV] Improve 64-bit integer constant materialization for more cases.
For positive constants we try shifting left to remove leading zeros and fill the bottom bits with 1s. We then materialize that constant shift it right.
This patch adds a new strategy to try filling the bottom bits with zeros instead. This catches some additional cases.
show more ...
|
#
d61b40ed |
| 01-Apr-2021 |
Craig Topper <craig.topper@sifive.com> |
[RISCV] Improve 64-bit integer materialization for some cases.
This adds a new integer materialization strategy mainly targeted at 64-bit constants like 0xffffffff where there are 32 or more trailin
[RISCV] Improve 64-bit integer materialization for some cases.
This adds a new integer materialization strategy mainly targeted at 64-bit constants like 0xffffffff where there are 32 or more trailing ones with leading zeros. We can materialize these by using an addi -1 and srli to restore the leading zeros. This matches what gcc does.
I haven't limited to just these cases though. The implementation here takes the constant, shifts out all the leading zeros and shifts ones into the LSBs, creates the new sequence, adds an srli, and checks if this is shorter than our original strategy.
I've separated the recursive portion into a standalone function so I could append the new strategy outside of the recursion. Since external users are no longer using the recursive function, I've cleaned up the external interface to return the sequence instead of taking a vector by reference.
Reviewed By: asb
Differential Revision: https://reviews.llvm.org/D98821
show more ...
|
Revision tags: llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2 |
|
#
387d3c24 |
| 14-Jan-2021 |
Craig Topper <craig.topper@sifive.com> |
[RISCV] Merge Utils library into MCTargetDesc
MCTargetDesc includes headers from Utils and Utils includes headers from MCTargetDesc. So from a library layering perspective it makes sense for them to
[RISCV] Merge Utils library into MCTargetDesc
MCTargetDesc includes headers from Utils and Utils includes headers from MCTargetDesc. So from a library layering perspective it makes sense for them to be in the same library. I guess the other option might be to move the tablegen includes from RISCVMCTargetDesc.h to RISCVBaseInfo.h so that RISCVBaseInfo.h didn't need to include RISCVMCTargetDesc.h. Everything else that depends on Utils also depends on MCTargetDesc so having one library seemed simpler.
Differential Revision: https://reviews.llvm.org/D93168
show more ...
|