This is the mail archive of the 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: [PATCH]: Code sinking patch

Daniel Berlin wrote:

I've been asked by a number of people over the past few weeks to submit, for 4.0, the code sinking patch i was working on for 4.1, because it provides significantly better scalar code than what we generate now in some cases for real world code compared to other compilers (such as MSVC).

Code where this helps is code where we can move a computation or store from an always-executed place to a not-always-executed place that still reaches all of it's uses.

I've timed this code on cc1-i-files, and the compile time change is in the noise (506 seconds without this patch, 504 seconds with it)

I've also timed it on the large switch statement PR's, a full bootstrap, and some other miscellanous large PR's, there is no time regression.

Almost all the time in this optimization ends up being spent in the loop optimizer init (which we use to make sure we don't move things into loops)

I have bootstrapped and regtested this optimization on i686-pc-linux-gnu, ppc64-linux, and powerpc-darwin.

To me, this looks like a very well-done patch, although I'm not an expert on all of the tree-ssa stuff, so there might be things in there that are not optimal. Your testing seems to confirm the safety of your patch, and it's not terribly big, which is also encouraging.

However, this is clearly a project that was not approved for this release, so we'd have to have a really good reason to do this, and consensus from the community, including people's whose changes didn't get accepted. To that end, do you have SPEC numbers? Or other benchmarks? With the many thousands of cases where this fires for GCC, do you see any improvement in non-optimizing compile-time performance? (For example, if you compile a big file without this optimization enabled when you compile the file, but where the compiler your using was built by a compiler that did have this optimization, do you see faster compile times?) In short, do you have performance numbers that make people really want to have this patch, at this late date?

Mark Mitchell
CodeSourcery, LLC
(916) 791-8304

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