This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: one question: tree-ssa vs no tree-ssa? no such global optimization exists.


On 20 October 2007 16:40, J.C. Pizarro wrote:

> * Was it useful the implementation of the complicated tree-ssa code
> waited for long time (many years)?
> 
> * Was it better the optimization without tree-ssa code?

  Why in a style like Yoda these questions you are asking?

> If doesn't exist a method for global optimization to use tree-ssa then
> * why did not it implement the simplest trial-and-error method for
> local optimization (e.g. minima/maxima local) following the K.I.S.S.
> principle without tree-ssa code?

  Because 99% of the optimisations performed by gcc cannot be easily modeled
as a problem of local minima determination in a scalar field, and to do so
would be massively inefficient and overgeneralised compared to implementing
more specialised code to run the optimisation.

> IMHO,

  Your opinion is based on uninformed guesswork.  Why don't you try making the
change yourself and performing *measurements*.  This is science, not religion:
we make observations of the universe to find out what is the case, rather than
pronouncing that whatever we wish must somehow be true.

> There are other methods of search of minima/maxima local as Hill
> Climbing, Beam Search, Genetic Algorithms, Simulated Annealing, Tabu
> Search, A*, Alfa-Beta, Min-Max, Branch-and-Bound, Greedy, etc.

  Well done.  You've got a hammer.  That doesn't mean that every problem in
the world just suddenly turned into a nail.

> The extension with more optimization's features is more easy without
> tree-ssa code.

  Massively wrong, but you don't have to take my word for it: try it and see.

  A few limited areas of some of the optimisations could be usefully modelled
in this way - for instance, it might be a useful technique for making better
decisions about when the costs and benefits of inlining a function were, or
combining insns whilst bearing in mind all the related costs; but that's only
helping you make the decision about whether or not to optimise in a particular
case, and you still need all the code that can parse the source under
compilation, spot opportunities for optimisation, and rearrange the IR into
the optimised form.  That's where all the real complexity lies, and that's
what SSA makes a whole lot more efficient, reliable, and debuggable and
maintainable.

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]