[PATCH] D60242: Add IR support, ELF section and user documentation for partitioning feature.

ben via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 5 02:45:55 PDT 2019


bd1976llvm added a comment.

Hi Peter,

I really like the concept. I had some nebulous concerns when I read the RFC; but, I didn't comment as I couldn't think of any alternatives to what you were proposing. What I am writing here is still not fully formed.. so feel free to ignore if it is unhelpful.

My main concern is that this is supporting a rare usecase and I don't really like the idea of adding complexity to the core tools for niche cases.

I feel like it would be better if this could be implemented via post-processing in some way; outside of the core tools.

Some aspect of this, like the linker being able to report all of the functions reachable from  a given set of entry points, are of general utility though.

I wonder if there is any scope for implementing something different along the lines of:

1. Do an initial link.
2. Analyse the resulting elf and report all of the functions in each partition.
3. Do another link but this time provide an ordering file so that all of the functions for each partition are placed contiguously.
4. Extract the functions for each partition, apart form the first, into a partition file which also contains metadata specifying the address range.
5. Write zeros over all of the functions apart from those in the main partition and then compress the executable (saving the file space).
6. A loader extension patches in the missing functions for each partition when needed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60242/new/

https://reviews.llvm.org/D60242





More information about the llvm-commits mailing list