mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
freedreno/ir3: Get rid of nested functions
This allows building Freedreno with clang Signed-off-by: Bernhard Rosenkränzer <bero@linaro.org> Signed-off-by: Rob Clark <robclark@freedesktop.org>
This commit is contained in:
parent
43d23e879c
commit
e86ba7844f
1 changed files with 14 additions and 14 deletions
|
|
@ -605,21 +605,21 @@ ra_block_compute_live_ranges(struct ir3_ra_ctx *ctx, struct ir3_block *block)
|
|||
struct ir3_ra_block_data *bd;
|
||||
unsigned bitset_words = BITSET_WORDS(ctx->alloc_count);
|
||||
|
||||
void def(unsigned name, struct ir3_instruction *instr)
|
||||
{
|
||||
/* defined on first write: */
|
||||
if (!ctx->def[name])
|
||||
ctx->def[name] = instr->ip;
|
||||
ctx->use[name] = instr->ip;
|
||||
BITSET_SET(bd->def, name);
|
||||
}
|
||||
#define def(name, instr) \
|
||||
do { \
|
||||
/* defined on first write: */ \
|
||||
if (!ctx->def[name]) \
|
||||
ctx->def[name] = instr->ip; \
|
||||
ctx->use[name] = instr->ip; \
|
||||
BITSET_SET(bd->def, name); \
|
||||
} while(0);
|
||||
|
||||
void use(unsigned name, struct ir3_instruction *instr)
|
||||
{
|
||||
ctx->use[name] = MAX2(ctx->use[name], instr->ip);
|
||||
if (!BITSET_TEST(bd->def, name))
|
||||
BITSET_SET(bd->use, name);
|
||||
}
|
||||
#define use(name, instr) \
|
||||
do { \
|
||||
ctx->use[name] = MAX2(ctx->use[name], instr->ip); \
|
||||
if (!BITSET_TEST(bd->def, name)) \
|
||||
BITSET_SET(bd->use, name); \
|
||||
} while(0);
|
||||
|
||||
bd = rzalloc(ctx->g, struct ir3_ra_block_data);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue