This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Add TK_EntireMemSpace invalidation trait.
ClosedPublic

Authored by dcoughlin on Sep 19 2015, 10:21 AM.

Details

Summary

This is a patch to support Sean Eveson's work on loop widening. It adds a new
TK_EntireMemSpace invalidation trait that, when applied to a MemSpaceRegion, indicates
that the entire memory space should be invalidated.

Clients would add this trait before invalidating. For example:

RegionAndSymbolInvalidationTraits ITraits;
ITraits.setTrait(MRMgr.getStackLocalsRegion(STC),
                 RegionAndSymbolInvalidationTraits::TK_EntireMemSpace);

This patch updates the existing logic invalidating global memspace regions for calls to
additionally handle arbitrary memspaces. When generating initial clusters during
cluster analysis we will now add a cluster to the worklist if the memspace for its
base is marked with TK_EntireMemSpace.

The patch also moves the logic for invalidating globals from ClusterAnalysis to
invalidateRegionsWorker so that it is not shared with removeDeadBindingsWorker.

There are no explicit tests with this patch -- but when applied to Sean's patch in
http://reviews.llvm.org/D12358 and after updating his code to set the trait,
the failing tests in that patch now pass.

Diff Detail

Repository
rL LLVM

Event Timeline

dcoughlin updated this revision to Diff 35170.Sep 19 2015, 10:21 AM
dcoughlin retitled this revision from to [analyzer] Add TK_EntireMemSpace invalidation trait..
dcoughlin updated this object.
dcoughlin added reviewers: krememek, zaks.anna.
dcoughlin added subscribers: cfe-commits, seaneveson.

Thank you for working on this! I have updated my patch (http://reviews.llvm.org/D12358) to depend on this one.

zaks.anna accepted this revision.Sep 21 2015, 5:33 PM
zaks.anna edited edge metadata.
This revision is now accepted and ready to land.Sep 21 2015, 5:33 PM

Could you update this patch to the latest trunk please? There's a conflict with http://reviews.llvm.org/rL248516.

Thanks.

This revision was automatically updated to reflect the committed changes.

Sean, I've committed this patch. You can update to trunk to get it.