summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-06-11 13:01:31 -0700
committerMatt Turner <[email protected]>2014-06-11 20:09:22 -0700
commitf51a7e00da25e25bd84e0f49df0a7423dbfd4acf (patch)
treeb3882a6faa6c4fa8e6a6f4b1342bf1aab76cb542 /src/mesa/drivers/dri/i965
parent4bb9d16fd3b75140b87d156a5a9f58ab69c0c37f (diff)
i965/fs: Clean up tabs in brw_fs_cse.cpp.
I'm adding vec4 CSE, and I want to diff the files.
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_cse.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
index e0e3935a4a3..3414d50d1f5 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
@@ -136,39 +136,39 @@ fs_visitor::opt_cse_local(bblock_t *block, exec_list *aeb)
int ip = block->start_ip;
for (fs_inst *inst = (fs_inst *)block->start;
- inst != block->end->next;
- inst = (fs_inst *) inst->next) {
+ inst != block->end->next;
+ inst = (fs_inst *) inst->next) {
/* Skip some cases. */
if (is_expression(inst) && !inst->is_partial_write() &&
(inst->dst.file != HW_REG || inst->dst.is_null()))
{
- bool found = false;
-
- aeb_entry *entry;
- foreach_list(entry_node, aeb) {
- entry = (aeb_entry *) entry_node;
-
- /* Match current instruction's expression against those in AEB. */
- if (instructions_match(inst, entry->generator)) {
- found = true;
- progress = true;
- break;
- }
- }
-
- if (!found) {
- /* Our first sighting of this expression. Create an entry. */
- aeb_entry *entry = ralloc(cse_ctx, aeb_entry);
- entry->tmp = reg_undef;
- entry->generator = inst;
- aeb->push_tail(entry);
- } else {
- /* This is at least our second sighting of this expression.
- * If we don't have a temporary already, make one.
- */
- bool no_existing_temp = entry->tmp.file == BAD_FILE;
- if (no_existing_temp && !entry->generator->dst.is_null()) {
+ bool found = false;
+
+ aeb_entry *entry;
+ foreach_list(entry_node, aeb) {
+ entry = (aeb_entry *) entry_node;
+
+ /* Match current instruction's expression against those in AEB. */
+ if (instructions_match(inst, entry->generator)) {
+ found = true;
+ progress = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ /* Our first sighting of this expression. Create an entry. */
+ aeb_entry *entry = ralloc(cse_ctx, aeb_entry);
+ entry->tmp = reg_undef;
+ entry->generator = inst;
+ aeb->push_tail(entry);
+ } else {
+ /* This is at least our second sighting of this expression.
+ * If we don't have a temporary already, make one.
+ */
+ bool no_existing_temp = entry->tmp.file == BAD_FILE;
+ if (no_existing_temp && !entry->generator->dst.is_null()) {
int written = entry->generator->regs_written;
fs_reg orig_dst = entry->generator->dst;
@@ -186,9 +186,9 @@ fs_visitor::opt_cse_local(bblock_t *block, exec_list *aeb)
orig_dst.reg_offset++;
tmp.reg_offset++;
}
- }
+ }
- /* dest <- temp */
+ /* dest <- temp */
if (!inst->dst.is_null()) {
int written = inst->regs_written;
assert(written == entry->generator->regs_written);
@@ -214,17 +214,17 @@ fs_visitor::opt_cse_local(bblock_t *block, exec_list *aeb)
inst->remove();
- /* Appending an instruction may have changed our bblock end. */
- if (inst == block->end) {
- block->end = prev;
- }
+ /* Appending an instruction may have changed our bblock end. */
+ if (inst == block->end) {
+ block->end = prev;
+ }
inst = prev;
- }
+ }
}
foreach_list_safe(entry_node, aeb) {
- aeb_entry *entry = (aeb_entry *)entry_node;
+ aeb_entry *entry = (aeb_entry *)entry_node;
/* Kill all AEB entries that write a different value to or read from
* the flag register if we just wrote it.
@@ -239,17 +239,17 @@ fs_visitor::opt_cse_local(bblock_t *block, exec_list *aeb)
}
}
- for (int i = 0; i < entry->generator->sources; i++) {
+ for (int i = 0; i < entry->generator->sources; i++) {
fs_reg *src_reg = &entry->generator->src[i];
/* Kill all AEB entries that use the destination we just
* overwrote.
*/
if (inst->overwrites_reg(entry->generator->src[i])) {
- entry->remove();
- ralloc_free(entry);
- break;
- }
+ entry->remove();
+ ralloc_free(entry);
+ break;
+ }
/* Kill any AEB entries using registers that don't get reused any
* more -- a sure sign they'll fail operands_match().
@@ -257,9 +257,9 @@ fs_visitor::opt_cse_local(bblock_t *block, exec_list *aeb)
if (src_reg->file == GRF && virtual_grf_end[src_reg->reg] < ip) {
entry->remove();
ralloc_free(entry);
- break;
+ break;
}
- }
+ }
}
ip++;