[PATCH] D36351: [lld][ELF] Add profile guided section layout

Rafael Ávila de Espíndola via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 8 04:47:26 PST 2018


rafael added a comment.

Michael Spencer via Phabricator via llvm-commits
<llvm-commits at lists.llvm.org> writes:

> +struct Section {
>  +  Section(const InputSectionBase *IS) : ISB(IS) { Size = ISB->getSize(); }
>  +
>  +  Double getDensity() const {
>  +    if (Size == 0)
>  +      return 0;
>  +    return Double(Weight) / Double(Size);
>  +  }
>  +
>  +  int64_t Size = 0;

Why is Size signed? With the previous errors fixed I get a warning:

CallGraphSort.cpp:302:30: warning: comparison of integers of different
signs: 'long' and 'const uint64_t' (aka 'const unsigned long')

Cheers,
Rafael


https://reviews.llvm.org/D36351





More information about the llvm-commits mailing list