Re: [PATCH v1 03/15] tcg: Fix register allocation constraints

2024-08-14 Thread LIU Zhiwei
On 2024/8/14 12:18, Richard Henderson wrote: On 8/14/24 13:30, LIU Zhiwei wrote: On 2024/8/14 11:08, Richard Henderson wrote: On 8/14/24 12:27, LIU Zhiwei wrote: On 2024/8/14 10:04, Richard Henderson wrote: On 8/14/24 10:58, LIU Zhiwei wrote: Thus if we want to use all registers of vector

Re: [PATCH v1 03/15] tcg: Fix register allocation constraints

2024-08-13 Thread Richard Henderson
On 8/14/24 13:30, LIU Zhiwei wrote: On 2024/8/14 11:08, Richard Henderson wrote: On 8/14/24 12:27, LIU Zhiwei wrote: On 2024/8/14 10:04, Richard Henderson wrote: On 8/14/24 10:58, LIU Zhiwei wrote: Thus if we want to use all registers of vectors, we have to add a dynamic constraint on regis

Re: [PATCH v1 03/15] tcg: Fix register allocation constraints

2024-08-13 Thread LIU Zhiwei
On 2024/8/14 11:08, Richard Henderson wrote: On 8/14/24 12:27, LIU Zhiwei wrote: On 2024/8/14 10:04, Richard Henderson wrote: On 8/14/24 10:58, LIU Zhiwei wrote: Thus if we want to use all registers of vectors, we have to add a dynamic constraint on register allocation based on IR types.

Re: [PATCH v1 03/15] tcg: Fix register allocation constraints

2024-08-13 Thread Richard Henderson
On 8/14/24 12:27, LIU Zhiwei wrote: On 2024/8/14 10:04, Richard Henderson wrote: On 8/14/24 10:58, LIU Zhiwei wrote: Thus if we want to use all registers of vectors, we have to add a dynamic constraint on register allocation based on IR types. My comment vs patch 4 is that you can't do that,

Re: [PATCH v1 03/15] tcg: Fix register allocation constraints

2024-08-13 Thread LIU Zhiwei
On 2024/8/14 10:04, Richard Henderson wrote: On 8/14/24 10:58, LIU Zhiwei wrote: Thus if we want to use all registers of vectors, we have to add a dynamic constraint on register allocation based on IR types. My comment vs patch 4 is that you can't do that, at least not without large changes

Re: [PATCH v1 03/15] tcg: Fix register allocation constraints

2024-08-13 Thread Richard Henderson
On 8/14/24 10:58, LIU Zhiwei wrote: Thus if we want to use all registers of vectors, we have to add a dynamic constraint on register allocation based on IR types. My comment vs patch 4 is that you can't do that, at least not without large changes to TCG. In addition, I said that the register

Re: [PATCH v1 03/15] tcg: Fix register allocation constraints

2024-08-13 Thread LIU Zhiwei
On 2024/8/13 19:52, Richard Henderson wrote: On 8/13/24 21:34, LIU Zhiwei wrote: From: TANG Tiancheng When allocating registers for input and output, ensure they match the available registers to avoid allocating illeagal registers. We should respect RISC-V vector extension's variable-length

Re: [PATCH v1 03/15] tcg: Fix register allocation constraints

2024-08-13 Thread Richard Henderson
On 8/13/24 21:34, LIU Zhiwei wrote: From: TANG Tiancheng When allocating registers for input and output, ensure they match the available registers to avoid allocating illeagal registers. We should respect RISC-V vector extension's variable-length registers and LMUL-based register grouping. Coor

[PATCH v1 03/15] tcg: Fix register allocation constraints

2024-08-13 Thread LIU Zhiwei
From: TANG Tiancheng When allocating registers for input and output, ensure they match the available registers to avoid allocating illeagal registers. We should respect RISC-V vector extension's variable-length registers and LMUL-based register grouping. Coordinate with tcg_target_available_regs