This is the mail archive of the gcc-bugs@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]

[Bug tree-optimization/61481] Poor optimization of simple small-sized matrix routines with constant data


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61481

--- Comment #3 from Craig Schroeder <cas43 at cs dot stanford.edu> ---
Created attachment 32930
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32930&action=edit
More practical (but more complex) example

I am trying to optimize an auto-differentiation utility.  The example above was
the result of simplifying a very complex program down to a simple one that
exhibits many of the same problems.  Auto-differentiation frequently produces
calculations that are trivial or unused, but shaving those computations out in
the code would be quite difficult.

Attached is portion of an application of it, stripped down to the routines that
are actually used and with some unneeded templatization removed.

As in the simpler example, the relative order of loop unrolling and sccp seems
to be the source of problem.  After flattening, there are three loops, with no
nested loops.  None are unrolled during prog.cpp.058t.cunrolli.  All three are
unrolled during prog.cpp.118t.cunroll, but that is too late for the
prog.cpp.103t.sccp step.


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