[Attributor] Avoid work for GEPs and wait till the users are visited

This commit is contained in:
Johannes Doerfert 2021-03-01 17:16:08 -06:00
parent f3f88287c5
commit c8c93fdf0a
1 changed files with 2 additions and 3 deletions

View File

@ -3690,10 +3690,9 @@ static unsigned getKnownAlignForUse(Attributor &A, AAAlign &QueryingAA,
return 0;
}
if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) {
if (GEP->hasAllConstantIndices()) {
if (GEP->hasAllConstantIndices())
TrackUse = true;
return 0;
}
return 0;
}
MaybeAlign MA;