11 Commits

Author SHA1 Message Date
Jay Foad
7b3bbd83c0 Revert "[CodeGen] Really renumber slot indexes before register allocation (#67038)"
This reverts commit 2501ae58e3bb9a70d279a56d7b3a0ed70a8a852c.

Reverted due to various buildbot failures.
2023-10-09 12:31:32 +01:00
Jay Foad
2501ae58e3
[CodeGen] Really renumber slot indexes before register allocation (#67038)
PR #66334 tried to renumber slot indexes before register allocation, but
the numbering was still affected by list entries for instructions which
had been erased. Fix this to make the register allocator's live range
length heuristics even less dependent on the history of how instructions
have been added to and removed from SlotIndexes's maps.
2023-10-09 11:44:41 +01:00
Ben Shi
30b52a3574 [CSKY] Optimize conditional branch and value select with BTSTI
Reviewed By: zixuan-wu

Differential Revision: https://reviews.llvm.org/D154768
2023-08-08 14:13:48 +08:00
Ben Shi
a133fb289a [CSKY][NFC] Fix broken tests in eac78fdf68f58e113b2cf18a14baccb8f5ebcf50 2023-08-04 22:01:44 +08:00
Ben Shi
eac78fdf68 [CSKY][test][NFC] Add tests of conditional branch and value select
These tests will be optimzied with BTSTI16/BTSTI32
in the future.

Reviewed By: zixuan-wu

Differential Revision: https://reviews.llvm.org/D154767
2023-08-04 16:10:57 +08:00
Ben Shi
3e6b80b1bd [CSKY] Optimize conditional select with CLRT/CLRF
Reviewed By: zixuan-wu

Differential Revision: https://reviews.llvm.org/D154409
2023-07-04 15:22:18 +08:00
Ben Shi
ef53ec969b [CSKY][test][NFC] Add more tests of conditional select
Reviewed By: zixuan-wu

Differential Revision: https://reviews.llvm.org/D154408
2023-07-04 15:22:18 +08:00
Zi Xuan Wu (Zeson)
70b8b738c5 [CSKY] Fix the btsti16 instruction missing in generic processor
Normally, generic processor does not have any SubtargetFeature. And it
can just generate most basic instructions which have no Predicates to
guard.

But it needs to enbale predicate for the btsti16 instruction as one of the most basic instructions.
Or the generic processor can't finish codegen process. So Add FeatureBTST16 SubtargetFeature to generic ProcessorModel.
2022-07-27 17:39:15 +08:00
Zi Xuan Wu (Zeson)
08db089124 [CSKY] Fix the testcase error due to the verifyInstructionPredicates
- Test cases for arch only has 16-bit instruction such as ck801/ck802 need
compile with -mattr=+btst16
- Fix the GPR copy instruction with MOV16 for 16-bit only arch.
2022-07-21 15:53:50 +08:00
Zi Xuan Wu
27c18558e6 [CSKY] Add missing codegen pattern for 16-bit instruction
In generic cpu model, there are only low 16 registers and little 32-bit instruction. CK801 is the cpu
family with least basic features like generic model.

Add test run and check for generic cpu model in original test case to cover basic LLVM IR functionality.
2022-03-29 16:05:30 +08:00
Zi Xuan Wu
9566cf16ad [CSKY] Add codegen of select/br/cmp instruction and some frame lowering infra
Add basic integer codegen of select/br/cmp instruction. It also includes frame lowering code
such as prologue/epilogue.
2022-01-05 15:59:03 +08:00