patch: add a driver flag to turn on function merging optimization

Richard Smith richard at metafoo.co.uk
Thu Oct 23 17:55:44 PDT 2014


On Thu, Oct 23, 2014 at 5:10 PM, Nick Lewycky <nlewycky at google.com> wrote:

> On 23 October 2014 15:27, Richard Smith <richard at metafoo.co.uk> wrote:
>
>> Since this is just for testing the feature, maybe it should be -cc1-only?
>>
>
> Sure.
>
>
>> Right now you allow it in the driver but don't forward it from driver to
>> frontend.
>>
>
> Annotating a flag with Flags<[CC1Option]> inside Options.td causes the
> forwarding to occur implicitly.
>

I just tested it, and it didn't do so for me. =)

Updated patch attached.
>

+def fmerge_functions : Flag <["-"], "fmerge-functions">,

No space after 'Flag'. Otherwise, LGTM, thanks!

(Move the option definition from Options.td to CC1Options.td to fix this.)
>>
>> On Thu, Oct 23, 2014 at 2:47 PM, Nick Lewycky <nlewycky at google.com>
>> wrote:
>>
>>> Sorry, I failed to "svn add" the new test and include it in the patch.
>>> Here's an updated patch with the test in it.
>>>
>>> On 23 October 2014 14:39, Nick Lewycky <nlewycky at google.com> wrote:
>>>
>>>> The attached patch adds -fmerge-functions which is in turn attached to
>>>> PassManagerBuilder::MergeFunctions. This is provided for testing it out,
>>>> and we can decide what we want the default to be after we have experience.
>>>> Note that it does bad things to debug info which doesn't currently have a
>>>> way to represent which function got called if two functions were merged.
>>>>
>>>> Please review!
>>>>
>>>> Nick
>>>>
>>>>
>>>
>>> _______________________________________________
>>> cfe-commits mailing list
>>> cfe-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141023/621e08ed/attachment.html>


More information about the cfe-commits mailing list