forked from OSchip/llvm-project
Remove unnecessary check for inalloca in IPConstantPropagation
Summary: This was added in https://reviews.llvm.org/D2449, but I'm not sure it's necessary since an inalloca value is never a Constant (should be an AllocaInst). Reviewers: hans, rnk Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D79350
This commit is contained in:
parent
22829ab5fa
commit
d056c0c71f
|
@ -129,7 +129,7 @@ static bool PropagateConstantsIntoArguments(Function &F) {
|
|||
for (unsigned i = 0, e = ArgumentConstants.size(); i != e; ++i, ++AI) {
|
||||
// Do we have a constant argument?
|
||||
if (ArgumentConstants[i].getInt() || AI->use_empty() ||
|
||||
AI->hasInAllocaAttr() || (AI->hasByValAttr() && !F.onlyReadsMemory()))
|
||||
(AI->hasByValAttr() && !F.onlyReadsMemory()))
|
||||
continue;
|
||||
|
||||
Value *V = ArgumentConstants[i].getPointer();
|
||||
|
|
Loading…
Reference in New Issue