[PATCH] Don't ever call materializeAllPermanently during LTO
Duncan P. N. Exon Smith
dexonsmith at apple.com
Fri Oct 24 08:12:37 PDT 2014
> On 2014-Oct-23, at 21:44, Rafael EspĂndola <rafael.espindola at gmail.com> wrote:
>
> A pet peeve I had with our lazy loading of IR is that isDeclaration
> returns the wrong result. It sees a function with no body and says it
> is a declaration.
>
> This was just a pet peeve until now since very few places actually
> have to handle lazy loaded IR.
>
> The issue is that the existing representation also prevents one from
> removing a function body without reading in the entire module. The
> problem is that if the body is removed, it will just be read back in
> afterwards since the two situations look identical.
>
> The attached patch changes llvm to use an explicit bit in Functions to
> say that they are materializable. With this change isDeclaration now
> always returns the correct value and we can drop functions without
> calling materializeAllPermanently.
>
LGTM. Nice cleanup.
> By itself this patch has a small impact. Its main advantage is opening
> the way for trying to make debug reading lazy too.
How?
More information about the llvm-commits
mailing list