Remove redundant overlap check from MergeAllocas

The check is also done in AddNonOverlappingAlloca making in
unncecessary.
This commit is contained in:
Stefan Ilic
2025-10-27 09:54:29 +00:00
committed by igcbot
parent 61653f9c0a
commit 7106daa2da

View File

@ -218,9 +218,6 @@ bool MergeAllocas::runOnFunction(Function &F) {
// We check if the current alloca overlaps with any of the previously added.
bool added = false;
for (auto *MergableAlloca : MergableAllocas) {
if (AllocaInfo.livenessData->OverlapsWith(*MergableAlloca->livenessData)) {
continue;
}
added = AddNonOverlappingAlloca(MergableAlloca, &AllocaInfo);
if (added) {
break;