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

-fipa-pta drastically increases compilation time #854

Open
yshui opened this issue Aug 29, 2022 · 11 comments
Open

-fipa-pta drastically increases compilation time #854

yshui opened this issue Aug 29, 2022 · 11 comments

Comments

@yshui
Copy link

yshui commented Aug 29, 2022

I noticed this when building renderdoc. With -fipa-pta, the build lasted more than 8 hours, and I had to interrupt it. Without it, the build finished in a couple of minutes.

There are other examples, not as dramatic, usually it's single digit minutes -> half an hour-ish.

How much does -fipa-pta help performance? Is it worthwhile?

@TheMBL09898
Copy link

@yshui
Copy link
Author

yshui commented Aug 29, 2022

@TheMBL09898 Thanks, but I feel that doesn't answer the question I was asking.

@leg7
Copy link

leg7 commented Aug 29, 2022

Has this option been benchmarked? If the compilation times are hit so hard it better give a significant performance boost.

@TheMBL09898
Copy link

Since a typical program contains a large number of functions, with a huge number of possible call sequences, this kind of analysis can be very expensive.

Maybe you should disable the flag with package.cflags for the packages that are giving you trouble.

*FLAGS-="-fipa-pta"  media-gfx/renderdoc

But if it were me I'd just leave it on and perform the compilation overnight, as it supposedly "improves performance".

@mccarverone
Copy link

I just compiled renderdoc-1.20-r1 with the default parameters from gentooLTO in less than 2 minutes.

@yshui
Copy link
Author

yshui commented Sep 9, 2022

@mccarverone did you enable qt and python in the use flags?

@mccarverone
Copy link

Now I did and it actually did fail compiling at [283/288].

log.txt

@yshui
Copy link
Author

yshui commented Sep 9, 2022

Looks like cc1plus ate too much memory. Does it compile without -fipa-pta?

@mccarverone
Copy link

Yes it does.

So media-gfx/renderdoc *FLAGS-="${IPAPTA}" should be added to ipa-pta.conf. Would you submit a pull request?

@yshui
Copy link
Author

yshui commented Sep 9, 2022

@mccarverone i am more wondering if -fipa-pta should not be enabled at all. is there some representative benchmarks I could run?

@mccarverone
Copy link

Can't answer about that, sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants