Skip to content

Commit 9c92276

Browse files
committed
[ArgumentPromotion] Fix -Wunused-but-set-variable after #78735
1 parent a00754b commit 9c92276

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

llvm/lib/Transforms/IPO/ArgumentPromotion.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -755,10 +755,6 @@ static bool areTypesABICompatible(ArrayRef<Type *> Types, const Function &F,
755755
/// calls the DoPromotion method.
756756
static Function *promoteArguments(Function *F, FunctionAnalysisManager &FAM,
757757
unsigned MaxElements, bool IsRecursive) {
758-
// Due to complexity of handling cases where the SCC has more than one
759-
// component. We want to limit argument promotion of recursive calls to
760-
// just functions that directly call themselves.
761-
bool IsSelfRecursive = false;
762758
// Don't perform argument promotion for naked functions; otherwise we can end
763759
// up removing parameters that are seemingly 'not used' as they are referred
764760
// to in the assembly.
@@ -804,10 +800,8 @@ static Function *promoteArguments(Function *F, FunctionAnalysisManager &FAM,
804800
if (CB->isMustTailCall())
805801
return nullptr;
806802

807-
if (CB->getFunction() == F) {
803+
if (CB->getFunction() == F)
808804
IsRecursive = true;
809-
IsSelfRecursive = true;
810-
}
811805
}
812806

813807
// Can't change signature of musttail caller

0 commit comments

Comments
 (0)