mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Actually, leave the check in. This prevents us from counting dead arguments
as IPCP opportunities. llvm-svn: 17680
This commit is contained in:
parent
dba9c2b0ef
commit
1a469385bd
@ -113,7 +113,7 @@ bool IPCP::processFunction(Function &F) {
|
|||||||
bool MadeChange = false;
|
bool MadeChange = false;
|
||||||
for (unsigned i = 0, e = ArgumentConstants.size(); i != e; ++i, ++AI)
|
for (unsigned i = 0, e = ArgumentConstants.size(); i != e; ++i, ++AI)
|
||||||
// Do we have a constant argument!?
|
// Do we have a constant argument!?
|
||||||
if (!ArgumentConstants[i].second) {
|
if (!ArgumentConstants[i].second && !AI->use_empty()) {
|
||||||
Value *V = ArgumentConstants[i].first;
|
Value *V = ArgumentConstants[i].first;
|
||||||
if (V == 0) V = UndefValue::get(AI->getType());
|
if (V == 0) V = UndefValue::get(AI->getType());
|
||||||
AI->replaceAllUsesWith(V);
|
AI->replaceAllUsesWith(V);
|
||||||
|
Loading…
Reference in New Issue
Block a user