[LLVMdev] Proposal: type uniquing of debug info for LTO
David Blaikie
dblaikie at gmail.com
Fri Jun 21 13:05:48 PDT 2013
> What is wrong with having the map in LLVMContext?
General principle of keeping things in the least scope necessary.
> MDNode has easy access to the context.
Ease of access isn't really the base requirement - otherwise we could
just put everything in LLVMContext. Reducing scope helps code
maintenance by making the influence of certain data is only accessed
within a certain scope.
> And we need the map in LLVMContext for option b as well.
Yes, but option (b) is a generic LLVM-wide feature necessarily
impacting such data structures. Option (a) is not, and should not have
such broad affects.
> David mentioned it is too central. But we already have a few DI related data structures in LLVMContext.
Several of those data structures (so far as I know) are needed outside
the domain of debug info emission (the couldn't exist just inside
DwarfDebug, for example).
- David
More information about the llvm-dev
mailing list