This is an archive of the discontinued LLVM Phabricator instance.

[LAA] Do not set CanDoRT to false for AS that do not need RT checks.
ClosedPublic

Authored by fhahn on May 27 2020, 4:10 AM.

Details

Summary

Alternative approach to D80570.

canCheckPtrAtRT already contains checks the figure out for which alias
sets runtime checks are needed. But it currently sets CanDoRT to false
for alias sets for which we cannot do RT checks but also do not need
any.

If we know that we do not need RT checks based on the number of
reads/writes in the alias set, we can skip processing the AS.

This patch also adds an assertion to ensure that DepCands does not
contain more than one write from the alias set.

This patch still needs a test.

Diff Detail

Event Timeline

fhahn created this revision.May 27 2020, 4:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 27 2020, 4:10 AM
Herald added a subscriber: hiraditya. · View Herald Transcript

This seems to make sense. Do you have a testcase? Maybe the one from D80570 with some cleanup?

llvm/lib/Analysis/LoopAccessAnalysis.cpp
763

I think you need brackets around the ||

fhahn updated this revision to Diff 270375.Jun 12 2020, 6:38 AM
fhahn marked an inline comment as done.

Add reduced tests based on D80570., add missing ()

dmgreen accepted this revision.Jun 12 2020, 7:22 AM

Thanks. LGTM

This revision is now accepted and ready to land.Jun 12 2020, 7:22 AM
This revision was automatically updated to reflect the committed changes.
bmahjour removed a subscriber: bmahjour.Jun 15 2020, 6:39 AM