[PATCH] D73894: [MLIR] Add mapping based on ValueRange to BlockAndValueMapper.

Stephan Herhut via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 4 09:26:25 PST 2020


herhut marked 3 inline comments as done.
herhut added a comment.

@rriddle Is this what you had in mind?



================
Comment at: mlir/include/mlir/IR/BlockAndValueMapping.h:30
   /// it is overwritten.
-  void map(Block *from, Block *to) { valueMap[from] = to; }
-  void map(Value from, Value to) {
-    valueMap[from.getAsOpaquePointer()] = to.getAsOpaquePointer();
+  template <typename S, typename T,
+            std::enable_if_t<std::is_assignable<Value, S>::value &&
----------------
rriddle wrote:
> nit: I would just keep these the same for now. Is there a reason to templatize these yet?
No, this was more me figuring out specifying the right template constraints. I have reverted that part.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73894





More information about the llvm-commits mailing list