Commit da721421 by Nicolas Capens

Fix eliminating stores to pointer arguments.

If a store address has no definition, it must be a pointer argument. Unlike stores to alloca's, these are not dead. Change-Id: I66e50b14ffea1cfc61fc756b5545ab8ae28b4bf8 Reviewed-on: https://swiftshader-review.googlesource.com/8573Tested-by: 's avatarNicolas Capens <capn@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent 39061652
...@@ -454,7 +454,7 @@ namespace ...@@ -454,7 +454,7 @@ namespace
{ {
Ice::Inst *def = definition[address]; Ice::Inst *def = definition[address];
if(!def || llvm::isa<Ice::InstAlloca>(def)) if(def && llvm::isa<Ice::InstAlloca>(def))
{ {
return uses[address].size() == 1; // Dead if this store is the only use return uses[address].size() == 1; // Dead if this store is the only use
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment