diff options
| author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2020-01-18 22:10:46 +0100 |
|---|---|---|
| committer | Hans Wennborg <hans@chromium.org> | 2020-03-06 14:36:11 +0100 |
| commit | edcd83a669b68a2d371a54dc46e647a2efe97a4f (patch) | |
| tree | 1da16db9c64752dd35d196b1ad0d5b7a6654bb2f /mlir/docs | |
| parent | 50eedc134a219ef6d2345e4efc5471a2e3824223 (diff) | |
| download | bcm5719-llvm-edcd83a669b68a2d371a54dc46e647a2efe97a4f.tar.gz bcm5719-llvm-edcd83a669b68a2d371a54dc46e647a2efe97a4f.zip | |
[mlir] NFC: Rename index_t to index_type
mlir currently fails to build on Solaris:
/vol/llvm/src/llvm-project/dist/mlir/lib/Conversion/VectorToLoops/ConvertVectorToLoops.cpp:78:20: error: reference to 'index_t' is ambiguous
IndexHandle zero(index_t(0)), one(index_t(1));
^
/usr/include/sys/types.h:103:16: note: candidate found by name lookup is 'index_t'
typedef short index_t;
^
/vol/llvm/src/llvm-project/dist/mlir/include/mlir/EDSC/Builders.h:27:8: note: candidate found by name lookup is 'mlir::edsc::index_t'
struct index_t {
^
and many more.
Given that POSIX reserves all identifiers ending in `_t` 2.2.2 The Name Space <https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html>, it seems
quite unwise to use such identifiers in user code, even more so without a distinguished
prefix.
The following patch fixes this by renaming `index_t` to `index_type`.
cases.
Tested on `amd64-pc-solaris2.11` and `sparcv9-sun-solaris2.11`.
Differential Revision: https://reviews.llvm.org/D72619
(cherry picked from commit 002ec79f979b9da9dedafe7ea036e00c90a9fbb7)
Diffstat (limited to 'mlir/docs')
| -rw-r--r-- | mlir/docs/EDSC.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mlir/docs/EDSC.md b/mlir/docs/EDSC.md index eaaeb6c7009..0b84d238358 100644 --- a/mlir/docs/EDSC.md +++ b/mlir/docs/EDSC.md @@ -54,11 +54,11 @@ concise and structured loop nests. i7(constant_int(7, 32)), i13(constant_int(13, 32)); AffineLoopNestBuilder(&i, lb, ub, 3)([&]{ - lb * index_t(3) + ub; - lb + index_t(3); + lb * index_type(3) + ub; + lb + index_type(3); AffineLoopNestBuilder(&j, lb, ub, 2)([&]{ - ceilDiv(index_t(31) * floorDiv(i + j * index_t(3), index_t(32)), - index_t(32)); + ceilDiv(index_type(31) * floorDiv(i + j * index_type(3), index_type(32)), + index_type(32)); ((f7 + f13) / f7) % f13 - f7 * f13; ((i7 + i13) / i7) % i13 - i7 * i13; }); |

