Add -fauto-profile option to Clang driver

Alp Toker alp at nuanti.com
Mon Oct 21 08:52:32 PDT 2013


On 21/10/2013 16:30, Diego Novillo wrote:
> On Mon, Oct 21, 2013 at 11:28 AM, David Blaikie <dblaikie at gmail.com> wrote:
>> On Oct 21, 2013 8:18 AM, "Diego Novillo" <dnovillo at google.com> wrote:
>>> On Thu, Oct 10, 2013 at 2:48 PM, Hans Wennborg <hans at chromium.org> wrote:
>>>> On Mon, Oct 7, 2013 at 11:09 AM, Diego Novillo <dnovillo at google.com>
>>>> wrote:
>>>>> This adds a new option -fauto-profile=filename to Clang. It tells the
>>>>> driver to schedule the auto-profile pass and passes on the name of the
>>>>> profile file to use.
>>>>>
>>>>> This patch depends on the initial auto profile patch I posted a
>>>>> couple of weeks ago:
>>>>> http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130923/188838.html
>>>> This looks good as far as I can tell, just minor comments:
>>> Thanks, Hans.
>>>
>>>>> From bcfe88d501ad4ea299f0b64ce98b375c248a45c9 Mon Sep 17 00:00:00 2001
>>>>> From: Diego Novillo <dnovillo at google.com>
>>>>> Date: Wed, 2 Oct 2013 10:46:34 -0400
>>>>> Subject: [PATCH] Add -fauto-profile to Clang's driver.
>>>>>
>>>>> This adds a new option -fauto-profile=filename to Clang. It tells the
>>>>> driver to schedule the auto-profile pass and passes on the name of the
>>>>> profile file to use.
>>>>> +++ b/lib/CodeGen/BackendUtil.cpp
>>>>> @@ -154,6 +154,14 @@ static void addObjCARCOptPass(const
>>>>> PassManagerBuilder &Builder, PassManagerBase
>>>>>      PM.add(createObjCARCOptPass());
>>>>>  }
>>>>>
>>>>> +static void addAutoProfilePass(const PassManagerBuilder &Builder,
>>>>> +                               PassManagerBase &PM) {
>>>>> +  const PassManagerBuilderWrapper &BuilderWrapper =
>>>>> +      static_cast<const PassManagerBuilderWrapper&>(Builder);
>>>>> +  const CodeGenOptions &opts = BuilderWrapper.getCGOpts();
>>>> I'd have called the variable CGOpts, but whatever.
>>> Is there a guideline for capitalization in names?  I don't mind camel
>>> case, but camel casing in local symbols is confusing to me (I tend to
>>> think of them as external symbols).
>> http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly
> Bugger, thanks.  A search for llvm coding standards returned an old
> version: http://llvm.org/releases/2.7/docs/CodingStandards.html
>
> I had missed the version number.

I wonder if it'd be worth adding to llvm.org/robots.txt:

Disallow: /releases/*/docs

The downside of this is that the historical ReleaseNotes.html files
would be hidden from search because robots.txt doesn't have an Allow
directive. Perhaps they could be symlinked to a different path to get
around that?

I'm probably not the only one to have made the same mistake as Diego and
it's a total pain to realise you've been reading obsolete docs.

Alp.

> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

-- 
http://www.nuanti.com
the browser experts




More information about the cfe-commits mailing list