[llvm-dev] Deleting function IR after codegen

Pete Cooper via llvm-dev llvm-dev at lists.llvm.org
Mon Mar 7 19:02:00 PST 2016


> On Mar 7, 2016, at 6:46 PM, Rafael Espíndola <rafael.espindola at gmail.com> wrote:
> 
> I like the idea of deleting IR once we are at MC. Hopefully one day
> even just after codegen.
Yeah, that would be ideal.  Better is some time inside codegen, but the issue inside codegen is AA, but thats not solvable any time soon I think.
> 
>> - The AsmPrinter is calling canBeOmittedFromSymbolTable on GlobalValue’s which then walks all their uses.  I think this should be done earlier in codegen as an analysis whose results are available to the AsmPrinter.
> 
> Starting with an analysis is probably the way to go. At some point it
> might make sense to cache that information in the IR somehow for use
> in LTO, but that will require some benchmarking to see if it is really
> worth it.
I agree.  I think it was escape analysis, and I can similarly imagine ‘escapes’ being a useful function argument attribute, so we could add it to both globals and arguments.

Cheers,
Pete
> 
> Cheers,
> Rafael



More information about the llvm-dev mailing list