Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate cases where running llvm optimizer twice slows down code #1300

Closed
lattner opened this issue Sep 28, 2006 · 5 comments
Closed

Investigate cases where running llvm optimizer twice slows down code #1300

lattner opened this issue Sep 28, 2006 · 5 comments
Assignees
Labels
bugzilla Issues migrated from bugzilla code-quality llvm-tools All llvm tools that do not have corresponding tag worksforme Resolved as "works for me"

Comments

@lattner
Copy link
Collaborator

lattner commented Sep 28, 2006

Bugzilla Link 928
Resolution WORKSFORME
Resolved on Feb 19, 2008 03:36
Version 1.8
OS All

Extended Description

These two nightly tester tests:

http://llvm.org/nightlytest/test.php?machine=36&night=1063
http://llvm.org/nightlytest/test.php?machine=23&night=1064

Capture performance changes that were due to running llvm-gcc at -O0 instead of -O2. The basic
impact is that we're now runing 'gccas' once instead of twice on the input programs (far more realistic).

Some of these programs got slower, e.g. fldry. This turns out to be a phase-ordering issue. If these
can be tracked down and improved, that would be good.

More important, however, are the programs that sped up by disabling the run of the optimizer. This
implies that running the optimizer twice on the programs actually slowed them down, which is clearly
bad.

-Chris

@lattner
Copy link
Collaborator Author

lattner commented Sep 28, 2006

assigned to @isanbard

@lattner
Copy link
Collaborator Author

lattner commented Sep 28, 2006

@isanbard
Copy link
Contributor

I'll give this a crack after I get back from vacation on Tuesday.

@isanbard
Copy link
Contributor

isanbard commented Oct 5, 2006

I'm having a problem reproducing this. If I use -O2 and -O0, and this is what I get:

$ time ./fibo.O0.llc
701408733

real 0m11.558s
user 0m10.503s
sys 0m0.067s

$ time ./fibo.O2.llc
701408733

real 0m10.617s
user 0m9.828s
sys 0m0.060s

This is on a PPC system. I get similar results on an x86 system.

@isanbard
Copy link
Contributor

This doesn't appear to be happening anymore. The fibo execution time with -O0 and with -O2 is pretty much the same:

[Gaz:Shootout-C++] time ./Output/fibo.llc # With -O2
701408733

real 0m10.129s
user 0m9.935s
sys 0m0.034s
[Gaz:Shootout-C++] time ./fibo.O0.llc # With -O0
701408733

real 0m10.125s
user 0m9.935s
sys 0m0.034s
[Gaz:Shootout-C++] time ./Output/fibo.native
701408733

real 0m10.752s
user 0m10.339s
sys 0m0.041s

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
@Quuxplusone Quuxplusone added the worksforme Resolved as "works for me" label Jan 20, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla code-quality llvm-tools All llvm tools that do not have corresponding tag worksforme Resolved as "works for me"
Projects
None yet
Development

No branches or pull requests

3 participants