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: GCC driver to "Compile twice, score the assembly, choose the best"?

> -----Original Message-----
> From: [] On Behalf
> Of Ian Bolton
> Sent: 15 May 2014 12:47
> To:
> Subject: GCC driver to "Compile twice, score the assembly, choose the
> best"?
> Hi, fellow GCC developers!
> I was wondering if the "gcc" driver could be made to invoke "cc1"
> twice, with different flags, and then just keep the better of the two
> .s files that comes out?
> I'm sure this is not a new idea, but I'm not aware of anything being
> done in this area, so I've made this post to gather your views. :)
> The kinds of flags I am thinking could be toggled are register
> allocation and instruction scheduling ones, since it's very hard to
> find one-size-fits-all there and we don't really want to have the user
> depend on knowing the right one.
> Obviously, compilation time will go up, but the run-time benefits
> could be huge.
> What are your thoughts?  What work in this area have I failed to dig
> up in my limited research?

This looks like something that should be done outside of cc1. Other people have thought about it and what you suggest is exactly the example found in OpenTuner ( announcement paper:

The difference is that you don't compare .s files but instead choose the metric based on the execution of the program on a test bench.


Paulo Matos

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