mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-11-30 11:00:40 +00:00
freedreno/ir3: make falsedep use's optional
Add option when collecting uses to control whether they include falsedeps or not. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4440>
This commit is contained in:
parent
d09e3afdcc
commit
860f5981f0
@ -1170,7 +1170,7 @@ ir3_lookup_array(struct ir3 *ir, unsigned id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ir3_find_ssa_uses(struct ir3 *ir, void *mem_ctx)
|
ir3_find_ssa_uses(struct ir3 *ir, void *mem_ctx, bool falsedeps)
|
||||||
{
|
{
|
||||||
/* We could do this in a single pass if we can assume instructions
|
/* We could do this in a single pass if we can assume instructions
|
||||||
* are always sorted. Which currently might not always be true.
|
* are always sorted. Which currently might not always be true.
|
||||||
@ -1184,7 +1184,9 @@ ir3_find_ssa_uses(struct ir3 *ir, void *mem_ctx)
|
|||||||
foreach_instr (instr, &block->instr_list) {
|
foreach_instr (instr, &block->instr_list) {
|
||||||
struct ir3_instruction *src;
|
struct ir3_instruction *src;
|
||||||
|
|
||||||
foreach_ssa_src (src, instr) {
|
foreach_ssa_src_n (src, n, instr) {
|
||||||
|
if (__is_false_dep(instr, n) && !falsedeps)
|
||||||
|
continue;
|
||||||
if (!src->uses)
|
if (!src->uses)
|
||||||
src->uses = _mesa_pointer_set_create(mem_ctx);
|
src->uses = _mesa_pointer_set_create(mem_ctx);
|
||||||
_mesa_set_add(src->uses, instr);
|
_mesa_set_add(src->uses, instr);
|
||||||
|
@ -609,7 +609,7 @@ void ir3_clear_mark(struct ir3 *shader);
|
|||||||
|
|
||||||
unsigned ir3_count_instructions(struct ir3 *ir);
|
unsigned ir3_count_instructions(struct ir3 *ir);
|
||||||
|
|
||||||
void ir3_find_ssa_uses(struct ir3 *ir, void *mem_ctx);
|
void ir3_find_ssa_uses(struct ir3 *ir, void *mem_ctx, bool falsedeps);
|
||||||
|
|
||||||
#include "util/set.h"
|
#include "util/set.h"
|
||||||
#define foreach_ssa_use(__use, __instr) \
|
#define foreach_ssa_use(__use, __instr) \
|
||||||
|
@ -141,7 +141,7 @@ ir3_cf(struct ir3 *ir)
|
|||||||
{
|
{
|
||||||
void *mem_ctx = ralloc_context(NULL);
|
void *mem_ctx = ralloc_context(NULL);
|
||||||
|
|
||||||
ir3_find_ssa_uses(ir, mem_ctx);
|
ir3_find_ssa_uses(ir, mem_ctx, false);
|
||||||
|
|
||||||
foreach_block (block, &ir->block_list) {
|
foreach_block (block, &ir->block_list) {
|
||||||
foreach_instr_safe (instr, &block->instr_list) {
|
foreach_instr_safe (instr, &block->instr_list) {
|
||||||
|
Loading…
Reference in New Issue
Block a user