diff options
author | Johannes Doerfert <doerfert@cs.uni-saarland.de> | 2015-03-05 00:43:48 +0000 |
---|---|---|
committer | Johannes Doerfert <doerfert@cs.uni-saarland.de> | 2015-03-05 00:43:48 +0000 |
commit | 7e6424ba5a6d64040346f775e10c7d4e3cb0c92c (patch) | |
tree | b0f9bfbd4718d0418aad51ead1cc695f88f5946e /polly/lib/Transform/DeadCodeElimination.cpp | |
parent | 6745822fd1cf54aa68196b317cdbc139418b8aa0 (diff) | |
download | bcm5719-llvm-7e6424ba5a6d64040346f775e10c7d4e3cb0c92c.tar.gz bcm5719-llvm-7e6424ba5a6d64040346f775e10c7d4e3cb0c92c.zip |
Create a dependence struct to hold dependence information for a SCoP.
The new Dependences struct in the DependenceInfo holds all information
that was formerly part of the DependenceInfo. It also provides the
same interface for the user to access this information.
This is another step to a more general ScopPass interface that does
allow multiple SCoPs to be "in flight".
llvm-svn: 231327
Diffstat (limited to 'polly/lib/Transform/DeadCodeElimination.cpp')
-rw-r--r-- | polly/lib/Transform/DeadCodeElimination.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/polly/lib/Transform/DeadCodeElimination.cpp b/polly/lib/Transform/DeadCodeElimination.cpp index e18fc2c135a..07c7e6cc2f7 100644 --- a/polly/lib/Transform/DeadCodeElimination.cpp +++ b/polly/lib/Transform/DeadCodeElimination.cpp @@ -112,14 +112,15 @@ isl_union_set *DeadCodeElim::getLiveOut(Scop &S) { /// combine a certain number of precise steps with one approximating step that /// simplifies the life set with an affine hull. bool DeadCodeElim::eliminateDeadCode(Scop &S, int PreciseSteps) { - DependenceInfo *D = &getAnalysis<DependenceInfo>(); + DependenceInfo &DI = getAnalysis<DependenceInfo>(); + const Dependences &D = DI.getDependences(); - if (!D->hasValidDependences()) + if (!D.hasValidDependences()) return false; isl_union_set *Live = getLiveOut(S); isl_union_map *Dep = - D->getDependences(DependenceInfo::TYPE_RAW | DependenceInfo::TYPE_RED); + D.getDependences(Dependences::TYPE_RAW | Dependences::TYPE_RED); Dep = isl_union_map_reverse(Dep); if (PreciseSteps == -1) @@ -156,7 +157,7 @@ bool DeadCodeElim::eliminateDeadCode(Scop &S, int PreciseSteps) { // FIXME: We can probably avoid the recomputation of all dependences by // updating them explicitly. if (Changed) - D->recomputeDependences(); + DI.recomputeDependences(); return Changed; } |