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.