diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2010-05-26 11:32:52 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-05-26 15:23:25 -0700 |
commit | b067db2e253059e83249b1e4d5f3c626b0e33807 (patch) | |
tree | f9deff26e662c3e3b1c62ec3ca7729627676af09 /ir_dead_code_local.cpp | |
parent | 36ea28646c666ac2af9b43c47e65f9f53ffcc390 (diff) |
Refactor whole-variable assigment checking into member function
Diffstat (limited to 'ir_dead_code_local.cpp')
-rw-r--r-- | ir_dead_code_local.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/ir_dead_code_local.cpp b/ir_dead_code_local.cpp index 9ac209df57..e83b300390 100644 --- a/ir_dead_code_local.cpp +++ b/ir_dead_code_local.cpp @@ -139,10 +139,7 @@ process_assignment(ir_assignment *ir, exec_list *assignments) } /* Now, check if we did a whole-variable assignment. */ - ir_dereference *lhs_deref = ir->lhs->as_dereference(); - if (always_assign && - lhs_deref && - lhs_deref->mode == ir_dereference::ir_reference_variable) { + if (always_assign && (ir->lhs->whole_variable_referenced() != NULL)) { /* We did a whole-variable assignment. So, any instruction in * the assignment list with the same LHS is dead. */ |