9 Commits

Author SHA1 Message Date
wanglei
2ee7183e38
[LoongArch] Add TTI support for cpop with LSX
Reviewed By: SixWeining

Pull Request: https://github.com/llvm/llvm-project/pull/106961
2024-09-06 15:48:14 +08:00
Zhaoxin Yang
89d1eb6734
[LoongArch] Remove experimental auto-vec feature. (#100070)
Currently, automatic vectorization will be enabled with `-mlsx/-mlasx`
enabled.
2024-07-23 15:19:00 +08:00
hev
1e86e92428
[LoongArch] Enable interleaved vectorization (#92629)
This PR enables interleaved vectorization for LoongArch, with a default
interleaving factor of `2`.
2024-05-21 15:31:02 +08:00
wanglei
1e7763557b
[LoongArch] Add support for getNumberOfRegisters() (#88372)
The `TTI` hooks are used during vectorization for calculating register
pressure. The default implementation defined wrong value for register
number (all register class are 8 registers).

This patch also defines LoongArch's own register classes.
2024-04-12 16:15:02 +08:00
wanglei
1e9924c1f2
[LoongArch] Fixing the incorrect return value of LoongArchTTIImpl::getRegisterBitWidth (#79441)
When we do not enable vector features, we should return the default
value (`TargetTransformInfoImplBase::getRegisterBitWidth`) instead of
zero.

This should fix the LoongArch [buildbot
breakage](https://lab.llvm.org/staging/#/builders/5/builds/486) from
#78943.
2024-01-26 10:24:07 +08:00
wanglei
fcff4582f0
[LoongArch] Permit auto-vectorization using LSX/LASX with auto-vec feature (#78943)
With enough codegen complete, we can now correctly report the size of
vector registers for LSX/LASX, allowing auto vectorization (The
`auto-vec` feature needs to be enabled simultaneously).

As described, the `auto-vec` feature is an experimental one. To ensure
that automatic vectorization is not enabled by default, because the
information provided by the current `TTI` cannot yield additional
benefits for automatic vectorization.
2024-01-23 09:06:35 +08:00
Zhao Qi
1918cf58a2 Reland D147524 "[LoongArch] Provide basic TargetTransformInfo implementation"
This patch only provides basic LoongArchTTIImpl, and more hooks
will be added to provide TTI machinery for LoongArch soon.

Reviewed By: SixWeining, xen0n

Differential Revision: https://reviews.llvm.org/D147524
2023-05-08 08:43:11 +08:00
Weining Lu
f70e4eb094 Revert "[LoongArch] Provide basic TargetTransformInfo implementation"
This reverts commit 040a41a852933d3d1b855aebc8b054baa60f61e2.

Author name is wrong.
2023-05-08 08:37:44 +08:00
Weining Lu
040a41a852 [LoongArch] Provide basic TargetTransformInfo implementation
This patch only provides basic LoongArchTTIImpl, and more hooks
will be added to provide TTI machinery for LoongArch soon.

Reviewed By: SixWeining, xen0n

Differential Revision: https://reviews.llvm.org/D147524
2023-05-06 11:38:33 +08:00