[LLVMdev] RFC: ThinLTO Impementation Plan

Teresa Johnson tejohnson at google.com
Tue May 19 13:11:49 PDT 2015


On Fri, May 15, 2015 at 2:45 PM, Duncan P. N. Exon Smith
<dexonsmith at apple.com> wrote:
>
>> On 2015-May-15, at 13:06, Teresa Johnson <tejohnson at google.com> wrote:
>>
>> On Fri, May 15, 2015 at 12:36 PM, Xinliang David Li
>> <xinliangli at gmail.com> wrote:
>>>
>>>
>>> The difference is that for thinLTO, the lazy import happens in backend
>>> compilation instead of running at linker plugin time. It is really lazy and
>>> imports bare minimal depends on only references from imported functions.
>>>
>>> Say module B has 1000 functions. Module A only imports 2 function foo1 and
>>> foo2 from Module B transitively. The lazy reading will import necessary
>>> module level data from B only to satisfy foo1 and foo2.
>>
>> Right, so there are a couple of differences. As David mentions, we do
>> this later and also in an iterative fashion. I.e. it may import
>> function foo1 from module B, then in function foo1 see hot calls to
>> functions bar1 in module C and bar2 in module D,
>
> How do you know they're hot?  Are you selectively reading the profile
> metadata?
>

The callee function hotness is something we should record in the
function summary. But the callsite hotness can be determined from the
caller function's profile/frequency info (particularly in conjunction
with the new function entry counts).

-- 
Teresa Johnson | Software Engineer | tejohnson at google.com | 408-460-2413



More information about the llvm-dev mailing list