Commit 29eee717 by Nicolas Capens

Generalize dead stores.

Stores are dead if the address is from an alloca and all uses of the address are stores, not just when it's a single store. Change-Id: I5b65a64e21b9e398922e5440c35f0d318c03e911 Reviewed-on: https://swiftshader-review.googlesource.com/8574Tested-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 da721421
......@@ -456,7 +456,7 @@ namespace
if(def && llvm::isa<Ice::InstAlloca>(def))
{
return uses[address].size() == 1; // Dead if this store is the only use
return uses[address].size() == uses[address].stores.size(); // Dead if all uses are stores
}
}
}
......
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