llvm-project/mlir/lib
Rainer Orth 9159675535 [MLIR][Presburger] Disambiguate call to floor
While testing LLVM 14.0.0 rc1 on Solaris, compilation of `FAIL`ed with

  /var/llvm/llvm-14.0.0-rc1/rc1/llvm-project/mlir/lib/Analysis/Presburger/Utils.cpp: In lambda function:
  /var/llvm/llvm-14.0.0-rc1/rc1/llvm-project/mlir/lib/Analysis/Presburger/Utils.cpp:48:58: error: call of overloaded ‘floor(int64_t)’ is ambiguous
     48 |                  [gcd](int64_t &n) { return floor(n / gcd); });
        |                                                          ^
  ...
  /usr/gcc/10/lib/gcc/sparcv9-sun-solaris2.11/10.3.0/include-fixed/iso/math_iso.h:201:21:
note: candidate: ‘long double std::floor(long double)’
    201 |  inline long double floor(long double __X) { return __floorl(__X); }
        |                     ^~~~~
  /usr/gcc/10/lib/gcc/sparcv9-sun-solaris2.11/10.3.0/include-fixed/iso/math_iso.h:165:15:
note: candidate: ‘float std::floor(float)’
    165 |  inline float floor(float __X) { return __floorf(__X); }
        |               ^~~~~
  /usr/gcc/10/lib/gcc/sparcv9-sun-solaris2.11/10.3.0/include-fixed/iso/math_iso.h:78:15:
note: candidate: ‘double std::floor(double)’
     78 | extern double floor __P((double));
        |               ^~~~~

The same issue had already occured in the past, cf. D108750
<https://reviews.llvm.org/D108750>, and the solution is the same: cast the
`floor` arg to `double`.

Tested on `amd64-pc-solaris2.11` and `sparcv9-sun-solaris2.11`.

Differential Revision: https://reviews.llvm.org/D119324
2022-02-09 22:01:55 +01:00
..
Analysis [MLIR][Presburger] Disambiguate call to floor 2022-02-09 22:01:55 +01:00
Bindings/Python [mlir][python] 8b/16b DenseIntElements access 2022-01-21 05:21:09 +00:00
CAPI [mlir][capi] Add DialectRegistry to MLIR C-API 2022-02-01 13:42:06 -07:00
Conversion [MLIR][GPU] Update GPUToROCDL to account for ControlFlow dialect 2022-02-08 16:34:34 +00:00
Dialect [mlir][GPU] Add ShuffleOp builder for constant offset/width 2022-02-10 02:55:44 +09:00
ExecutionEngine [mlir][sparse] Rename index_t to index_type again 2022-02-09 21:59:52 +01:00
IR [mlir] Update uses of `parser`/`printer` ODS op field to `hasCustomAssemblyFormat` 2022-02-07 19:03:58 -08:00
Interfaces [mlir] Add isa/dyn_cast support for dialect interfaces 2022-01-31 19:24:34 -08:00
Parser [mlir] Silence warnings when building with MSVC 2022-01-30 17:31:35 -05:00
Pass [mlir][NFC] Add a using for llvm::SMLoc/llvm::SMRange to LLVM.h 2022-01-26 21:37:23 -08:00
Reducer Apply clang-tidy fixes for performance-move-const-arg in ReductionNode.cpp (NFC) 2022-01-10 01:05:14 +00:00
Rewrite [MLIR][PDL] Integration test of multi-root matching and related fixes. 2022-01-04 08:03:45 +05:30
Support Replace OwningModuleRef with OwningOpRef<ModuleOp> 2022-01-30 14:07:10 -08:00
TableGen [mlir][ods] Optional Attribute or Type Parameters 2022-02-08 20:09:44 +00:00
Target [mlir][spirv] Fix verification of nested array constants 2022-02-07 13:48:53 -08:00
Tools [mlir][NFC] Add a using for llvm::SMLoc/llvm::SMRange to LLVM.h 2022-01-26 21:37:23 -08:00
Transforms [mlir] Add pass to privatize symbols unless excluded. 2022-02-03 20:20:54 -08:00
Translation [mlir-translate] Teach these tools about --allow-unregistered-dialect 2022-02-03 09:00:38 -08:00
CMakeLists.txt [mlir] Ensure a newline at the end of a file (NFC) 2022-01-23 13:59:59 -08:00