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

Nick Lewycky nlewycky at google.com
Thu Oct 23 18:00:06 PDT 2014


On 23 October 2014 17:55, Richard Smith <richard at metafoo.co.uk> wrote:

> 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. =)
>

I capitulate!

Updated patch attached.
>>
>
> +def fmerge_functions : Flag <["-"], "fmerge-functions">,
>
> No space after 'Flag'. Otherwise, LGTM, thanks!
>

r220543. 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/f72dfa35/attachment.html>


More information about the cfe-commits mailing list