i965/fs: Add reads_flag() and writes_flag() to fs_inst.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
This commit is contained in:
Matt Turner 2013-10-20 11:32:01 -07:00
parent f768f998e0
commit 20d0297ff2
2 changed files with 16 additions and 0 deletions

View File

@ -732,6 +732,19 @@ fs_inst::regs_read(fs_visitor *v, int arg)
return 1;
}
bool
fs_inst::reads_flag()
{
return predicate;
}
bool
fs_inst::writes_flag()
{
return (conditional_mod && opcode != BRW_OPCODE_SEL) ||
opcode == FS_OPCODE_MOV_DISPATCH_TO_FLAGS;
}
/**
* Returns how many MRFs an FS opcode will write over.
*

View File

@ -151,6 +151,9 @@ public:
bool is_partial_write();
int regs_read(fs_visitor *v, int arg);
bool reads_flag();
bool writes_flag();
fs_reg dst;
fs_reg src[3];
bool saturate;