Commit Graph

164595 Commits

Author SHA1 Message Date
ziliangzl 60f388930d [VENTUS][fix]Assign initial value for VastartStoreFrameIndex
VastartStoreFrameIndex havn't initial value, caused issue THU-DSP-LAB/llvm-project#117
2024-05-15 13:39:07 +08:00
zhoujing 573ae5e8ee [VENTUS][workaround] Fix flw/fsw assembly errors
Signed-off-by: zhoujing <jing.zhou@terapines.com>

This is just a workarond, when new instruction is added by HW, revert this commit
2024-04-26 15:14:22 +08:00
ziliangzl 8be3150696 [#112][fix]Remove flw/fsw InstAlias
1.Removed flw/fsw InstAlias for now,cause flw/fsw could not match correctly.
2.Modified kernel_arg testcase.
2024-04-26 10:59:35 +08:00
ziliangzl 4354b039f3 [VENTUS][fix]Fix FLW/FSW instruction coding conflict
Replace FLW/FSW instruction with PseudoFLW/PseudoFSW
2024-04-25 10:44:57 +08:00
zhoujingya 1347c06d50
Merge pull request #109 from ziliangzl/divergent-analyse
[VENTUS][fix] Fix kernel divergent analysis
2024-04-22 15:58:52 +08:00
ziliangzl d138bdacf6 [VENTUS][fix]Fix kernel divergent analysis 2024-04-22 15:53:36 +08:00
qinfan f781479b52 [VENTUS][RISCV] Fix move instructions after JOIN move forward bug
1. If the move instruction needs to be moved forward, it will only be inserted after the last corresponding move instruction in the predecessor basic block.
2. The first instruction of the predecessor is also counted as a possible insertion point.
2024-03-29 16:15:12 +08:00
zhoujing 797c85d829 [patch] Add a fix patch from terapines_dev branch 2024-03-08 18:23:47 +08:00
zhoujingya efef613b61
Merge pull request #83 from THU-DSP-LAB/34_local_addressed_variables_into_stack
[VENTUS][fix] Put local variables declared in kernel function into shared memory
2024-03-06 09:19:25 +08:00
zhoujing 87fe5f3ce8 [VENTUS][fix] Put local variables declared in kernel function into shared memory 2024-03-05 16:32:59 +08:00
zhoujing a909be0434 [VENTUS][fix] Fix insert vmv instruction bug when vmv instruction is in JOIN MBB 2024-03-05 15:26:43 +08:00
qinfan c42c00f67e [VENTUS][fix] Modified the resource statistics interface
1. The origin interface will not be called under the -O0 optimization.
2. New interfaces added to epilogue pass.
2024-03-04 15:44:30 +08:00
zhoujingya 49c039a902
Merge pull request #89 from THU-DSP-LAB/eliminate_call_frame
[VENTUS][fix] Fix framelowering and calculation method of stack offset
2024-02-01 14:54:42 +08:00
zhoujingya 6b17accc5f
Merge pull request #70 from THU-DSP-LAB/resource_manage
[VENTUS][fix] Fix the mechanism of statistical register resources
2024-02-01 13:17:45 +08:00
zhoujingya 965f8c1fb6
Merge branch 'main' into eliminate_call_frame 2024-02-01 13:15:03 +08:00
zhoujingya 0b7be4b4a5
Merge branch 'main' into 39_parameter_types 2024-01-24 11:43:08 +08:00
zhoujingya a87bae445c
Merge pull request #49 from THU-DSP-LAB/instructions-remove
[VENTUS][fix] Remove instructions not supported by hardware
2024-01-24 09:41:33 +08:00
qinfan 71caf2361b [VENTUS][fix] Fix register extension
Fix register extension.
2024-01-23 09:59:51 +08:00
zhoujingya 7adec4402a [VENTUS][fix] Support the regexti instruction
Support the regexti instruction with or, xor, sub, and, setne, seteq, add test file.
2024-01-23 09:59:51 +08:00
qinfan 93c99240db [VENTUS][fix] Fix the calculation of stack size
Fix the calculation of stack size.
2023-12-25 13:26:25 +08:00
qinfan d809d3a2bd [VENTUS][fix] Fix the Offset of private variable offset on stack
Fix the Offset of private variable offset on stack.
2023-12-22 16:47:19 +08:00
qinfan 755797e27c [VENTUS][fix] Fix framelowering and calculation method of stack offset
1. Add VMV_V_X in emitEpilogue.
2. Change all the positive numbers added by TP to negative numbers(in LowerCall).
3. Fix the LowerCall function to generate correct store instruction transferring the function parameters.
4. Fix hasReservedCallFrame function to return false.
5. Align the convention between caller and callee in the case of passing parameters by stack.
6. Change the stack offset calculation method of TP.
7. Unify the calculation of TP stack and SP stack offset.
8. Node that needing to manually modify the calculation of sp offset in the workitem.S. Since the growth direction of the stack is different from that of the traditional RISCV, it is now stipulated that for both the SP stack and the TP stack, the data is stored where the stack pointer is not offset.
9. There is a SPAdj check in eliminateFrameIndex function. but we don't need this value at all so that adding a getSPAdjust function to return zero.
10. V33 is a wrong value when parameters pushed to TP stack so there must be a MV instruction to refresh V33 after ADJCALLSTACKDOWN.
2023-12-20 17:03:01 +08:00
qinfan e35b2e4fed [VENTUS][fix] Distinguish the resource usage of each kernel function
Distinguish the resource usage of each kernel function in the same source file.
2023-12-14 17:18:20 +08:00
qinfan 304a2c1284 [VENTUS][fix] Fix the mechanism of statistical register resources
1. Fix the bug of repeated calculation of register resources.
2. Add resource calculation with stack register.
2023-11-28 11:29:13 +08:00
zhoujingya d32d735ea4 [VENTUS][fix] Remove instructions not supported by hardware
These instructions included belows:

* float load/store instructions
* vfmv instruction
* "Single-Width Floating-Point/Integer Type-Convert Instructions" in RISCV manual
2023-11-24 17:26:50 +08:00
zhoujingya f85215d671
Revert "[VENTUS][fix] Add subregclass and flag to distinguish GPR and GPRF32" (#68)
This reverts commit 5e424e2b64.
2023-11-24 15:18:18 +08:00
qinfan 6b002e6c5d [#39][fix] Modify the code failed to merge
Modify the code failed to merge.
2023-11-09 13:31:31 +08:00
qinfan 99a81dd407 [#39][fix] Fix scalar and vector kernel parameter bugs
The alignment method for kernel function parameters finally determined by the software.
2023-11-09 13:18:48 +08:00
qinfan 8dfd3561c4 [VENTUS][RISCV][feat] Legalized vector parameters
Summary: LegaLegalized vector parameters, but not been added FileCheck now.

Test Plan: Legalized vector parameters

Differential Revision: http://www.tpt.com/D740
2023-11-09 13:09:54 +08:00
zhoujingya 1e0fad0aef [#54][fix] Fix integer compare instructions pattern 2023-11-08 14:56:10 +08:00
qinfan 8fb493873a [VENTUS][RISCV][fix] Add subregclass and flag to distinguish GPR and GPRF32
Add subregclass and flag to distinguish GPR and GPRF32
2023-10-26 09:46:07 +08:00
zhoujingya 5c2738eb80 [VENTUS][fix] Fix address space mapping error for constant address 2023-10-16 17:30:49 +08:00
zhoujingya f48875e9fe Revert "[VENTUS][fix] Add subregclass and flag to distinguish GPR and GPRF32"
This reverts commit 5e424e2b64.
2023-10-16 16:45:15 +08:00
qinfan 5e424e2b64 [VENTUS][fix] Add subregclass and flag to distinguish GPR and GPRF32
Summary: fix float COPY instruction bug

Test Plan: fix float COPY instruction bug

Reviewers: zhoujing

Differential Revision: http://www.tpt.com/D747
2023-10-16 13:51:10 +08:00
zhoujingya 294b5b4e5e [VENTUS][fix] Remove illegal VMV_X_S/VFMV_F_S instructions' definition and patterns
https://github.com/THU-DSP-LAB/llvm-project/issues/31
2023-10-10 17:30:47 +08:00
zhoujingya de2295fa43 [VENTUS][fix] Fix flw/fsw instruction pattern match bug 2023-10-10 16:05:57 +08:00
zhoujingya f9a20984b5 [VENTUS][fix] Comment out illegal fmv.w.x instruction and change vmv instructions' format
https://github.com/THU-DSP-LAB/llvm-project/issues/30
2023-10-09 14:04:55 +08:00
zhoujingya 2b376d146a Revert "[VENTUS][RISCV][fix] Fix the float COPY instruction bug"
This reverts commit 80a3ef9b04.
2023-10-08 17:35:20 +08:00
zhoujingya 0a45eabde0 Revert "[VENTUS][RISCV][feat] Legalized vector parameters"
This reverts commit 7bd98c0ff8.
2023-10-08 17:31:53 +08:00
zhoujingya 8bea355dbe Revert "[VENTUS][RISCV][feat] Legalized vector parameters"
This reverts commit 12195ac947.
2023-10-08 17:31:09 +08:00
qinfan 80a3ef9b04 [VENTUS][RISCV][fix] Fix the float COPY instruction bug
Fix the translation error of the COPY instruction in IR. Previously,
the COPY instruction for float registers would be translated into vmv incorrectly.
This is because the GPRF class inherits from the GPR class, so float registers
were also considered GPR. Now an additional check has been added to translate
COPY instructions accurately.
2023-10-08 11:28:04 +08:00
qinfan 12195ac947 [VENTUS][RISCV][feat] Legalized vector parameters 2023-10-08 11:28:04 +08:00
qinfan 7bd98c0ff8 [VENTUS][RISCV][feat] Legalized vector parameters
Summary: LegaLegalized vector parameters, but not been added FileCheck now.

Test Plan: Legalized vector parameters

Differential Revision: http://www.tpt.com/D740
2023-10-08 11:28:04 +08:00
Aries b9fa6ff2d8 [VENTUS] Improve coding style and performance 2023-09-28 16:52:27 +08:00
qinfan e6937f5ead [VENTUS][RISCV][fix] Fix the undefined physical register bug
Fix the undefined physical register bug when inserting VMV_V_X instruction
in "checkJoinMBB" funtion to compile with "--verify-machineinstr" parameter.
2023-09-28 10:24:45 +08:00
zhoujingya 6630f81570 [VENTUS][NFC] Modify coding style 2023-09-26 15:49:25 +08:00
zhoujingya 9fa870aace [VENTUS][fix] Fix vmv.v instruction bug in JOIN MBB after BranchBB
When vmv instruction is in join block, need to check the register definition
are in both else&if predecessors or not
Github issue: https://github.com/THU-DSP-LAB/llvm-project/issues/16
2023-09-26 12:57:20 +08:00
zhoujingya f9c37399dd [VENTUS][fix] No need to move vmv.v instruction when MBB has only one predecessor 2023-09-20 19:41:21 +08:00
zhoujingya fb8e1be577 [VENTUS][fix] Fix illegal bitcast 2023-09-20 11:55:22 +08:00
zhoujingya 4bfde6aa71 [VENTUS][fix] Check vmv instruction position in JOIN block 2023-09-15 17:24:34 +08:00