Commit Graph

11 Commits

Author SHA1 Message Date
Erik Eckstein
f520ef894a Add the PassKind as a property in SILTransform.
To set the PassKind automatically, I needed to refactor some code of the pass manager and the pass definitions.
The main changes are:
1) SILPassManager now has an add-function for each pass: PM.add(createP()) -> PM.addP()
2) I removed the ARGS argument in Passes.def, which we didn't use anyway.



Swift SVN r26756
2015-03-31 14:08:19 +00:00
Michael Gottesman
8c5b200239 [inst-count] Move InstCount into frontend_main wrapped in performSILInstCount so that we can gather statistics even if we don't run any SIL optimization passes.
Swift SVN r24490
2015-01-17 02:15:18 +00:00
Michael Gottesman
d3a2c70afb [inst-count] Count the number of functions of various linkages.
Swift SVN r24488
2015-01-16 23:35:26 +00:00
Michael Gottesman
f8859ce3bf [inst-count] Distinguish in between bb and insts in functions with external and non-external linkage
Swift SVN r24487
2015-01-16 23:35:25 +00:00
Michael Gottesman
93b92a8f9f Add in Passes.def for metaprogramming with SILPassKinds.
This simplifies some code in SILOpt and SILPasses. The real reason to do it is
to use it to procedurally generate random pipelines.

Swift SVN r23996
2014-12-17 23:56:26 +00:00
Chris Lattner
001c1890e5 put all the SIL*Transform classes in anonymous namespaces, there is
no need for their symbols to be exported out of their implementation
file.


Swift SVN r14714
2014-03-06 01:49:53 +00:00
Nadav Rotem
29cb91a988 Add names to two passes with missing names. Mark the getName method as abstract. Thanks Michael!
Swift SVN r14243
2014-02-21 23:38:17 +00:00
Nadav Rotem
27a1a63134 Remove unneeded empty virtual destructors.
Swift SVN r13599
2014-02-06 22:24:33 +00:00
Nadav Rotem
1ef0d157ca PassManager: Inject the function/module into the Transformation.
Now the pass does not need to know about the pass manager. We also don't have
runOnFunction or runOnModule anymore because the trnasformation knows
which module it is processing. The Pass itself knows how to invalidate the
analysis, based on the injected pass manager that is internal to the
transformation.

Now our DCE transformation looks like this:

class DCE : public SILModuleTransform {
  void run() {
    performSILDeadCodeElimination(getModule());
    invalidateAnalysis(SILAnalysis::InvalidationKind::All);
  }
};





Swift SVN r13598
2014-02-06 22:11:21 +00:00
Nadav Rotem
99b075c32a Rename SILFunctionTrans -> SILFunctionTransform
Swift SVN r13536
2014-02-06 01:32:10 +00:00
Michael Gottesman
d369b6dbed Add simple inst count pass for counting the various instructions in a module.
Swift SVN r13510
2014-02-05 22:11:40 +00:00