From 97a618f91a6e06db277ec5583b1bac6d9841411f Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Tue, 12 Jan 2021 16:36:18 -0800 Subject: [PATCH] Integrate LLVM at llvm/llvm-project@6f4d46076200 Updates LLVM usage to match [6f4d46076200](https://github.com/llvm/llvm-project/commit/6f4d46076200) PiperOrigin-RevId: 351474229 --- WORKSPACE | 4 ++-- build_tools/llvm_version.txt | 2 +- lib/Dialect/mhlo/transforms/lhlo_fuse_linalg.cc | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index abfc762..d018e0f 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -15,9 +15,9 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -LLVM_COMMIT = "c8a914db5c60dbeb5b638f30a9915855a67805f7" +LLVM_COMMIT = "6f4d460762006af17826693abc1e7139a76aa1f2" -LLVM_SHA256 = "c19479a75745dae2722bfc6a4da2f83605ce8fdf00f05e784c6272753df4c830" +LLVM_SHA256 = "1b0dd96fead94bbef25ad3bacb2ad3de2a42456d85b43c5f0bc3ed5a60a1977c" LLVM_BAZEL_TAG = "llvm-project-{commit}".format(commit = LLVM_COMMIT) diff --git a/build_tools/llvm_version.txt b/build_tools/llvm_version.txt index 8c1d4a4..4940785 100644 --- a/build_tools/llvm_version.txt +++ b/build_tools/llvm_version.txt @@ -1,2 +1,2 @@ -c8a914db5c60dbeb5b638f30a9915855a67805f7 +6f4d460762006af17826693abc1e7139a76aa1f2 diff --git a/lib/Dialect/mhlo/transforms/lhlo_fuse_linalg.cc b/lib/Dialect/mhlo/transforms/lhlo_fuse_linalg.cc index 98a6ab5..a421d63 100644 --- a/lib/Dialect/mhlo/transforms/lhlo_fuse_linalg.cc +++ b/lib/Dialect/mhlo/transforms/lhlo_fuse_linalg.cc @@ -171,10 +171,10 @@ class LhloFuseLinalgPass SmallVector linalg_ops; func.walk([&](LinalgOp op) { linalg_ops.push_back(op); }); for (LinalgOp op : llvm::reverse(linalg_ops)) { - for (unsigned id = 0, e = op.getNumInputs(); id < e; ++id) { + for (OpOperand& inputOperand : op.getInputOpOperands()) { linalg::Aliases aliases; linalg::LinalgDependenceGraph graph(aliases, linalg_ops); - if (auto info = fuseProducerOfBuffer(b, op, id, graph)) { + if (auto info = fuseProducerOfBuffer(b, inputOperand, graph)) { auto originalOp = info->originalProducer.getOperation(); erase_set.insert(originalOp); auto originalOpInLinalgOpsVector = std::find_if(