[llvm-dev] Removing pointers from MCInstrDesc for less relocations
Nicolai Hähnle via llvm-dev
llvm-dev at lists.llvm.org
Sun May 8 20:35:13 PDT 2016
Hi everybody,
I noticed today that my libLLVM-3.9svn.so has a ~1.7MB .data.rel.ro
segment - i.e. data that needs to be touched by the dynamic linker even
though it's ultimately read-only, and data that cannot be shared between
multiple processes using LLVM.
It turns out that a solid ~1.3MB of that data is in the tablegen'd
MCInstrDesc tables - there a pointers for ImplicitUses, ImplicitDefs,
and OpInfo that need to be relocated.
This can be fixed of course by having target-global arrays for those
structures referenced by MCInstrInfo (and hence TargetInstrInfo), and
only storing offsets into those global arrays in MCInstrDesc.
The downside is that several relevant accessors need to be augmented
with MCInstrInfo parameters, but in the long run it seems worth it to me.
Any objections or suggestions? Is this something that people can agree
on, i.e. do patches going in this direction have a good chance of being
accepted?
Cheers,
Nicolai
More information about the llvm-dev
mailing list