mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-14 02:33:53 +00:00
Actually, leave the check in. This prevents us from counting dead arguments
as IPCP opportunities. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17680 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3e062eacab
commit
d79c7b43f4
@ -113,7 +113,7 @@ bool IPCP::processFunction(Function &F) {
|
||||
bool MadeChange = false;
|
||||
for (unsigned i = 0, e = ArgumentConstants.size(); i != e; ++i, ++AI)
|
||||
// Do we have a constant argument!?
|
||||
if (!ArgumentConstants[i].second) {
|
||||
if (!ArgumentConstants[i].second && !AI->use_empty()) {
|
||||
Value *V = ArgumentConstants[i].first;
|
||||
if (V == 0) V = UndefValue::get(AI->getType());
|
||||
AI->replaceAllUsesWith(V);
|
||||
|
Loading…
x
Reference in New Issue
Block a user