[llvm-commits] [llvm-gcc-4.2] r55718 - /llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp

Devang Patel dpatel at apple.com
Tue Sep 23 10:22:56 PDT 2008


On Sep 22, 2008, at 1:35 PM, Chris Lattner wrote:

>
> On Sep 22, 2008, at 11:21 AM, Devang Patel wrote:
>
>>
>> On Sep 21, 2008, at 8:43 PM, Chris Lattner wrote:
>>
>>>> +    else {
>>>> +      // The inliner pass won't be inserted based on command  
>>>> line options.
>>>> +      // Use AlwaysInliner to handle functions that are marked  
>>>> as always_inline.
>>>> +      bool NeedAlwaysInliner = false;
>>>> +      for (Module::iterator I = TheModule->begin(), E =  
>>>> TheModule->end();
>>>> +         I != E; ++I)
>>>> +        if (!I->isDeclaration() && I->getNotes() ==  
>>>> FN_NOTE_AlwaysInline) {
>>>> +          NeedAlwaysInliner = true;
>>>> +          break;
>>>> +        }
>>>> +      if (NeedAlwaysInliner)
>>>> +        PM->add(createAlwaysInlinerPass());
>>>
>>> Please don't do this loop here, just unconditionally add it to the  
>>> passmgr.  Is there some advantage to checking here (in llvmgcc)  
>>> rather than in the pass itself?
>>
>>
>> Only one advantage is a small convenience to llvm developers. When  
>> we are using -analyze or -print or intentionally running selected  
>> pass for debugging/testing then you do not want PassManager to  
>> annoy you. This is not a big deal, and I do not see any advantage  
>> for end users.
>
> How would it be annoying?  I don't understand.  It is just an  
> optimization to speed up the pass.

OK.  I spent some time investigating this, now the big question is  
"Where in the pass sequence ?"
-
Devang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20080923/2243ac98/attachment.html>


More information about the llvm-commits mailing list