This is an archive of the discontinued LLVM Phabricator instance.

[LAA] Always compute DepId, even for uncomputable bounds.
Needs ReviewPublic

Authored by fhahn on Jan 1 2021, 5:58 AM.

Details

Summary

We can compute the dependency set id before checking for computable
bounds in createCheckForAccess. This allows us to rely on RunningDepId
only to check if runtime checks are required.

Uncomputable bounds are only an issue if runtime memory checks need to
be generated and with this change. Hence we can continue further with
the analysis, if there are uncomputable bounds, but not memchecks are
required.

Diff Detail

Event Timeline

fhahn created this revision.Jan 1 2021, 5:58 AM
fhahn requested review of this revision.Jan 1 2021, 5:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 1 2021, 5:58 AM
fhahn updated this revision to Diff 452502.Aug 14 2022, 3:14 AM

Rebase and ping :)

The updated tests show 2 improvements by the patch. In both cases, the base pointers are noalias, so

  1. whether the pointers have computable bounds should not matter, as only the dependency check in the alias sets are relevant,
  2. scev-inserted-runtime-check.ll incorrectly added !alias.scope metadata; the runtime check is for a SCEV predicate, not noaliasing.
Herald added a project: Restricted Project. · View Herald TranscriptAug 14 2022, 3:14 AM