[PATCH] D108750: [PowerPC] common chains to reuse offsets to reduce register pressure

Rainer Orth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 29 02:01:50 PDT 2021


ro added a comment.

This patch broke the Solaris build:

  /vol/llvm/src/llvm-project/dist/llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp: In member function ‘bool {anonymous}::PPCLoopInstrFormPrep::prepareBasesForCommoningChains({anonymous}::Bucket&)’:
  /vol/llvm/src/llvm-project/dist/llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp:497:37: error: call of overloaded ‘sqrt(unsigned int&)’ is ambiguous
    497 |     ChainNum = (unsigned)sqrt(EleNum);
        |                                     ^
  In file included from /vol/gcc-10/.11.4-gas-64/lib/gcc/amd64-pc-solaris2.11/10.1.0/include-fixed/math.h:24,
                   from /vol/gcc-10/.11.4-gas-64/include/c++/10.1.0/bits/std_abs.h:40,
                   from /vol/gcc-10/.11.4-gas-64/include/c++/10.1.0/cstdlib:77,
                   from /vol/gcc-10/.11.4-gas-64/include/c++/10.1.0/bits/stl_algo.h:59,
                   from /vol/gcc-10/.11.4-gas-64/include/c++/10.1.0/algorithm:62,
                   from /vol/llvm/src/llvm-project/dist/llvm/include/llvm/ADT/Hashing.h:51,
                   from /vol/llvm/src/llvm-project/dist/llvm/include/llvm/ADT/Optional.h:18,
                   from /vol/llvm/src/llvm-project/dist/llvm/include/llvm/ADT/STLExtras.h:19,
                   from /vol/llvm/src/llvm-project/dist/llvm/lib/Target/PowerPC/PPCFrameLowering.h:15,
                   from /vol/llvm/src/llvm-project/dist/llvm/lib/Target/PowerPC/PPCSubtarget.h:16,
                   from /vol/llvm/src/llvm-project/dist/llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp:79:
  /vol/gcc-10/.11.4-gas-64/lib/gcc/amd64-pc-solaris2.11/10.1.0/include-fixed/iso/math_iso.h:220:21: note: candidate: ‘long double std::sqrt(long double)’
    220 |  inline long double sqrt(long double __X) { return __sqrtl(__X); }
        |                     ^~~~
  /vol/gcc-10/.11.4-gas-64/lib/gcc/amd64-pc-solaris2.11/10.1.0/include-fixed/iso/math_iso.h:186:15: note: candidate: ‘float std::sqrt(float)’
    186 |  inline float sqrt(float __X) { return __sqrtf(__X); }
        |               ^~~~
  /vol/gcc-10/.11.4-gas-64/lib/gcc/amd64-pc-solaris2.11/10.1.0/include-fixed/iso/math_iso.h:74:15: note: candidate: ‘double std::sqrt(double)’
     74 | extern double sqrt __P((double));
        |               ^~~~

Can be fixed e.g. by casting `EleNum` to `double`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108750/new/

https://reviews.llvm.org/D108750



More information about the llvm-commits mailing list