diff options
author | Nicolas Vasilache <ntv@google.com> | 2020-01-03 15:05:39 -0500 |
---|---|---|
committer | Nicolas Vasilache <ntv@google.com> | 2020-01-03 15:09:23 -0500 |
commit | 447dafdfc9b19acc88ba771ecac6a6ca89836579 (patch) | |
tree | 12401bb0b77e6d631b1b745330774eb31d5b49fb /mlir | |
parent | 1570084d334311907c70c9179c19af8541524fff (diff) | |
download | bcm5719-llvm-447dafdfc9b19acc88ba771ecac6a6ca89836579.tar.gz bcm5719-llvm-447dafdfc9b19acc88ba771ecac6a6ca89836579.zip |
[mlir][Linalg] NFC - Hotfix GenericLoopNestBuilder compilation error on older gcc (-fpermissive)
This fixes the error:
```
mlir/include/mlir/Dialect/Linalg/Utils/Utils.h:72:3: error: from definition of 'template<class LoopTy> mlir::edsc::GenericLoopNestRangeBuilder<LoopTy>::GenericLoopNestRangeBuilder(llvm::ArrayRef<mlir::edsc::ValueHandle*>, llvm::ArrayRef<mlir::Value>)' [-fpermissive]
GenericLoopNestRangeBuilder(ArrayRef<edsc::ValueHandle *> ivs,
```
This was tested independently on a Docker image with gcc-5 by jpienaar@
Diffstat (limited to 'mlir')
-rw-r--r-- | mlir/lib/Dialect/Linalg/Utils/Utils.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mlir/lib/Dialect/Linalg/Utils/Utils.cpp b/mlir/lib/Dialect/Linalg/Utils/Utils.cpp index 771d3139177..24f8874842a 100644 --- a/mlir/lib/Dialect/Linalg/Utils/Utils.cpp +++ b/mlir/lib/Dialect/Linalg/Utils/Utils.cpp @@ -97,15 +97,17 @@ ValueHandle LoopNestRangeBuilder::LoopNestRangeBuilder::operator()( return ValueHandle::null(); } +namespace mlir { + namespace edsc { template <> -mlir::edsc::GenericLoopNestRangeBuilder< +GenericLoopNestRangeBuilder< loop::ForOp>::GenericLoopNestRangeBuilder(ArrayRef<edsc::ValueHandle *> ivs, ArrayRef<Value> ranges) { builder = std::make_unique<LoopNestRangeBuilder>(ivs, ranges); } template <> -mlir::edsc::GenericLoopNestRangeBuilder< +GenericLoopNestRangeBuilder< AffineForOp>::GenericLoopNestRangeBuilder(ArrayRef<ValueHandle *> ivs, ArrayRef<Value> ranges) { SmallVector<ValueHandle, 4> lbs; @@ -121,6 +123,9 @@ mlir::edsc::GenericLoopNestRangeBuilder< } builder = std::make_unique<AffineLoopNestBuilder>(ivs, lbs, ubs, steps); } + +} // namespace edsc +} // namespace mlir static Value emitOrFoldComposedAffineApply(OpBuilder &b, Location loc, AffineMap map, |