Commit Graph

8 Commits

Author SHA1 Message Date
Nadav Rotem
240ff14db1 Split DominanceAnalysis into Dom and PDom using FunctionAnalysisBase.
This commit splits DominanceAnalysis into two analysis (Dom and PDom) that
can be cached and invalidates using the common FunctionAnalysisBase interface
independent of one another.

Swift SVN r26643
2015-03-27 20:54:28 +00:00
Nadav Rotem
da92b6f81b Turn the analysis invalidation code into an early exit. NFC.
Swift SVN r26450
2015-03-23 21:19:04 +00:00
Nadav Rotem
d78b376d07 [passes] Replace the old invalidation lattice with a new invalidation scheme.
The old invalidation lattice was incorrect because changes to control flow could cause changes to the
call graph, so we've decided to change the way passes invalidate analysis.  In the new scheme, the lattice
is replaced with a list of traits that passes preserve or invalidate. The current traits are Calls and Branches.
Now, passes report which traits they preserve, which is the opposite of the previous implementation where
passes needed to report what they invalidate.

Node: I tried to limit the changes in this commit to mechanical changes to ease the review. I will cleanup some
of the code in a following commit.

Swift SVN r26449
2015-03-23 21:18:58 +00:00
Nadav Rotem
bff2349442 [compile time] Rewrite the code to reduce the number of map lookups.
Swift SVN r26387
2015-03-21 03:26:07 +00:00
Nadav Rotem
bbeee760c2 Remove the old API for preserving LoopInfo and DomInfo
Swift SVN r26377
2015-03-20 22:53:10 +00:00
Arnold Schwaighofer
c50e396103 Add APIs to update preserved analysis information for dominance and loop info
Use it in loop rotation.

The pattern to update analysis information is:

  // The AnalysisInfo was preserved for this function.
  if (Changed) {
    // Preserve the analyis for this function by decoupling it from the analysis
    // cache.
    auto PreservedAnalysis = Analysis.preserveAnalysis(Function);

    // Invalidate analysis for this function.
    PM.invalidateAnalysis(Function, InvalidationKind::CFG);

    // Update the preserved analysis for this function.
    Analysis.updateAnalysis(F, std::move(PreservedAnalysis));
  }

Swift SVN r19918
2014-07-14 03:42:39 +00:00
Andrew Trick
53cbc3e858 Add a ColdBlockInfo analysis based on DominanceAnalysis.
This will be used by PerformanceInliner, GlobalOpt, and other passes in the future.

Swift SVN r19454
2014-07-02 06:35:09 +00:00
Nadav Rotem
0651b9bbd0 Add a new Dominance Analysis that wraps DomInfo and PDomInfo, and migrate the
passes that use them.



Swift SVN r13571
2014-02-06 07:52:16 +00:00