[LLVMdev] [lld] contentHash in the Reader ?
shankare at codeaurora.org
Wed May 8 12:54:11 PDT 2013
On 5/8/2013 2:45 PM, Nick Kledzik wrote:
> I'd rather we use a crypto hash so we don't have to compare content at all.
> The crypto hashes work well if the atom content is const data (e.g. c-string or other literals), since you just point the hash function at the range of bytes in the constant data. Where it gets messier is if you are trying to coalesce non-leaf functions or non-const data because it is not just the content bytes that need to be compared but also all the references must somehow be incorporated into the hash. For example, two functions have the exact same instruction bytes, but one calls foo and one calls bar.
I was thinking that we just do ICF for leaf functions only, non leaf
functions can fold only if all the references end up calling the same
targets isnt it ? (Which could result from templated code ?)
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation
More information about the llvm-dev