Академический Документы
Профессиональный Документы
Культура Документы
Machine
independent
optimizations:
Applying optimizations to the part of code that does not
involve any CPU registers and memory allocations.
Number of operands
Live range size
Number of floating point operations
Number of memory operations
2) Loop unrolling
Loop nest level (the number of loops present within a
given loop)
Number of operands
Number of operations
Number of floating point operations
Number of memory operations
Number of branches
Live range size
Known trip count (This is the number of times loop
executes)
Number of parallel computations in a loop
The minimum memory to memory loop carried
dependency
3) Loop fusion
Number of consecutive loops
Trip counts of loops should be the same
Variable dependence of the loops to be fused
Loop nest level (the number of loops present within a
given loop)
Number of operands
Number of operations
Number of floating point operations
Number of memory operations
Number of branches
Live range size
Known trip count (This is the number of times loop
executes)
Number of parallel computations in a loop.
The minimum memory to memory loop carried
dependency.
F) FP-Growth
FP growth or frequent pattern growth adopts a divide
and conquer strategy to find frequent patterns, of any size.
We start with ordering the items in the database by
decreasing order of occurrence. We start with a null node,
which first branches to the item that has the most
occurrence. Then according to the item-sets in the
database, a tree is constructed, going from most frequent
item-set to least frequent. If any item-set does not contain
the most frequent item, then another branch from the null
node is created. Each node, which is made of individual
items, is assigned a number. Following any path from the
root (null) to the leaf gives us a frequent pattern, given
that all nodes satisfy the minimum threshold.
It is fairly obvious that in our case, the item of
dimension optimization will occur the least times, as
compared to the other features that make up the items in
our case. We can also use the Apriori priority to neglect
those items that have an even lesser occurrence than the
result item. We can assign the minimum threshold equal
to the frequency of the result item. On creation of the fptree, we can easily follow a path, and hence, determine the
order of application of optimizations, in order to
maximize performance.
G) Decision Trees
It is a flowchart structure, in which each node denotes
a test on a feature, the branches lead to other tests based
on the outcome of the previous test, and the leaf nodes
denote the final classifier.
Decision tree, in conjunction with neural networks or
any other supervised learning algorithm, is a good method
for determining the order of optimizations.
The given figure 2 depicts the working of the above
most appropriately.
H) Principle Component Analysis
Also called the PCA, it is a technique for
dimensionality reduction.
It coalesces all the variables, possibly correlated, to
arrive at a smaller number of uncorrelated variables that
can serve as descriptors of the underlying structure of the
data.
The idea is to apply PCA to shortlist the most
important features from a list of all features that a code
can employ. The input to the PCA algorithm would be a
list of all the features of the codes that make up the sample
space, from the most simple, to the most complex. We
doing the analysis, we would get a short list of features
that have the most probability of influencing the
performance of a code. We could use this new list of
features to run any of the machine learning algorithms.
We propose using PCA to isolate the features, instead of
considering all the possible features.
I) Genetic Programming
The concept uses heuristics of search and optimization
techniques which imitates the process of natural evolution
.Since early age the survival of the fittest is observed, the
same analogy can be applied in terms of optimization.
Being an evolutionary algorithm it incorporates gradual
and progressive enhancement of the subject.
Optimization of compiler can be obtained by reducing
the execution time or reducing the code size basically.
Genetic algorithms use compiler flags to obtain the
necessary optimal results; an optimal flag is one which
optimizes a particular feature of the code whereas an
optimization level helps optimizing a number of features
via setting many flags.
Now the algorithm has ways to approach an optimal
solution wiz selection, crossover and mutation.
Selection: Is the process of selecting the best and
discarding the rest, in a pool of optimal solution it chooses
the best and uses fitness function to determine the same.
For compiler optimizations we have
E: execution time
C: compilation time
Fitness function = 1/E+C
The greater the value of fitness function, the more the
solution is optimal. The inverse requires the Execution
and compilation time to be less.
Crossover and mutation
REFERENCES