[LLVMdev] [lld] contentHash in the Reader ?
kledzik at apple.com
Tue May 7 22:08:53 PDT 2013
Do you mean add a method like:
virtual unsigned contentHash() const = 0;
virtual llvm::hash_code contentHash() const = 0
to lld::DefinedAtom? That seems good to me. We just need to figure out what should happen with atoms not intended to be merged. Should the method assert? In the case where we want there to be a hash available, is it computed lazily?
Regarding the NativeReader/NativeWriter if the resolver is using the hash, then it would make sense to add the hash to the file format so reading native format is faster.
On May 7, 2013, at 4:43 PM, Shankar Easwaran wrote:
> Can we add a atomContentHash for DefinedAtoms when the atoms are being created. This can essentially speed up comparisons of atoms especially for
> * ICF (Identical code folding)
> * Section groups (to identify similiar sections)
> Not sure where else this would help. This would essentially be used only by the Reader and the Resolver.
> There would be no change to the NativeReader/NativeWriter.
> Shankar Easwaran
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation
More information about the llvm-dev