Merge google -> main (#2544)

* b2145c7f Synchronize submodules                                                          
* 13bdb7e0 Integrate TF at https://github.com/tensorflow/tensorflow/commit/33a4c1a0aba     
* c89e8ee2 Merge pull request #2543 from ScottTodd:main-to-google                          
* 8be92426 Synchronize submodules                                                          
* b0737d29 Integrate LLVM at https://github.com/llvm/llvm-project/commit/1067d3e176ea      
* 3e574a9e Synchronize submodules                                                          
* d875628e Integrate LLVM at https://github.com/llvm/llvm-project/commit/b2018198c32a      
* 28e7bc29 Synchronize submodules                                                          
* 3f7687c3 Integrate LLVM at https://github.com/llvm/llvm-project/commit/f233b92f92a6      
* af5f1502 Adds a way to register modules with the context through the java API            
* 79586bdd Synchronize submodules                                                          
* 95d8c9f5 Integrate TF at ebcd2928f5b0                                                    
* 3aadd21f Synchronize submodules                                                          
* 0ee95249 Integrate LLVM at https://github.com/llvm/llvm-project/commit/c11c78a1bd0b      
* 0bdd8f2a Synchronize submodules                                                          
* 89bf08f5 Integrate LLVM at https://github.com/llvm/llvm-project/commit/f782d9c7002e      
* 764c9dde Merge pull request #2512 from ScottTodd:main-to-google                          
diff --git a/SUBMODULE_VERSIONS b/SUBMODULE_VERSIONS
index be3c045..33099a9 100644
--- a/SUBMODULE_VERSIONS
+++ b/SUBMODULE_VERSIONS
@@ -3,7 +3,7 @@
 4c13807b7d43ff0946b7ffea0ae3aee9e611d778 third_party/dear_imgui
 a5d9d0f7d368054fd1691aedf1db4116efcc233e third_party/flatbuffers
 f2fb48c3b3d79a75a88a99fba6576b25d42ec528 third_party/googletest
-84a1bc7f2c0c7bd5f18a4ecaf91e27644aa94190 third_party/llvm-project
+1067d3e176ea7b0b1942c163bf8c6c90107768c1 third_party/llvm-project
 17b12a4481daa150e2d1ea3ada086b551b856707 third_party/marl
 67f3ccebee84f3488b46a8d3ac005178c52ff264 third_party/mlir-emitc
 80d452484c5409444b0ec19383faa84bb7a4d351 third_party/pybind11
@@ -11,7 +11,7 @@
 b73f111094da3e380a1774b56b15f16c90ae8e23 third_party/sdl2
 f8bf11a0253a32375c32cad92c841237b96696c0 third_party/spirv_headers
 57eb48aed36160c4876bc8310d9ca84d42ee9e2a third_party/swiftshader
-2f4444c1cff8ac07ab2c31d1ae23d23c66147126 third_party/tensorflow
+33a4c1a0abaf93656992d11205eabcdb21980bc9 third_party/tensorflow
 864d86e8b6d21449474db5e9313dbff90aa9c24f third_party/tracy
 9bd3f561bcee3f01d22912de10bb07ce4e23d378 third_party/vulkan_headers
 909f36b714c9239ee0b112a321220213a474ba53 third_party/vulkan_memory_allocator
diff --git a/bindings/java/com/google/iree/Context.java b/bindings/java/com/google/iree/Context.java
index 3e221bd..b2a4399 100644
--- a/bindings/java/com/google/iree/Context.java
+++ b/bindings/java/com/google/iree/Context.java
@@ -16,9 +16,12 @@
 
 package com.google.iree;
 
+import java.util.List;
+
 /** An isolated execution context. */
 final class Context {
   public Context(Instance instance) throws Exception {
+    isStatic = false;
     nativeAddress = nativeNew();
     Status status = Status.fromCode(nativeCreate(instance.getNativeAddress()));
 
@@ -27,6 +30,30 @@
     }
   }
 
+  // TODO(jennik): Consider using ImmutableList here.
+  public Context(Instance instance, List<Module> modules) throws Exception {
+    isStatic = true;
+    nativeAddress = nativeNew();
+    long[] moduleAdresses = getModuleAdresses(modules);
+    Status status =
+        Status.fromCode(nativeCreateWithModules(instance.getNativeAddress(), moduleAdresses));
+    if (!status.isOk()) {
+      throw status.toException("Could not create Context");
+    }
+  }
+
+  public void registerModules(List<Module> modules) throws Exception {
+    if (isStatic) {
+      throw new IllegalStateException("Cannot register modules to a static context");
+    }
+
+    long[] moduleAdresses = getModuleAdresses(modules);
+    Status status = Status.fromCode(nativeRegisterModules(moduleAdresses));
+    if (!status.isOk()) {
+      throw status.toException("Could not register Modules");
+    }
+  }
+
   public int getId() {
     return nativeGetId();
   }
@@ -35,12 +62,26 @@
     nativeFree();
   }
 
+  private static long[] getModuleAdresses(List<Module> modules) {
+    long[] moduleAddresses = new long[modules.size()];
+    for (int i = 0; i < modules.size(); i++) {
+      moduleAddresses[i] = modules.get(i).getNativeAddress();
+    }
+    return moduleAddresses;
+  }
+
   private final long nativeAddress;
 
+  private final boolean isStatic;
+
   private native long nativeNew();
 
   private native int nativeCreate(long instanceAddress);
 
+  private native int nativeCreateWithModules(long instanceAddress, long[] moduleAddresses);
+
+  private native int nativeRegisterModules(long[] moduleAddresses);
+
   private native void nativeFree();
 
   private native int nativeGetId();
diff --git a/bindings/java/com/google/iree/Module.java b/bindings/java/com/google/iree/Module.java
index 4eee4a5..b4b0771 100644
--- a/bindings/java/com/google/iree/Module.java
+++ b/bindings/java/com/google/iree/Module.java
@@ -19,6 +19,7 @@
 import java.nio.ByteBuffer;
 
 /** A VM module. */
+// TODO(jennik): Add BytecodeModule and HALModule classes.
 final class Module {
   /**
    * Creates a VM module from a flatbuffer. The input ByteBuffer must be direct, and acceptable
@@ -34,6 +35,10 @@
     }
   }
 
+  public long getNativeAddress() {
+    return nativeAddress;
+  }
+
   public void free() {
     nativeFree();
   }
diff --git a/bindings/java/com/google/iree/native/context_jni.cc b/bindings/java/com/google/iree/native/context_jni.cc
index 55c8099..341dad2 100644
--- a/bindings/java/com/google/iree/native/context_jni.cc
+++ b/bindings/java/com/google/iree/native/context_jni.cc
@@ -16,6 +16,7 @@
 
 #include "bindings/java/com/google/iree/native/context_wrapper.h"
 #include "bindings/java/com/google/iree/native/instance_wrapper.h"
+#include "bindings/java/com/google/iree/native/module_wrapper.h"
 #include "iree/base/logging.h"
 
 #define JNI_FUNC extern "C" JNIEXPORT
@@ -23,6 +24,7 @@
 
 using iree::java::ContextWrapper;
 using iree::java::InstanceWrapper;
+using iree::java::ModuleWrapper;
 
 namespace {
 
@@ -38,6 +40,22 @@
   return reinterpret_cast<ContextWrapper*>(env->GetLongField(obj, field));
 }
 
+std::vector<ModuleWrapper*> GetModuleWrappersFromAdresses(
+    JNIEnv* env, jlongArray moduleAddresses) {
+  // Get the addresses of the ModuleWrappers.
+  jsize modules_size = env->GetArrayLength(moduleAddresses);
+  std::vector<int64_t> module_addresses(modules_size);
+  env->GetLongArrayRegion(moduleAddresses, 0, modules_size,
+                          reinterpret_cast<jlong*>(module_addresses.data()));
+
+  // Convert the addresses to ModuleWrappers.
+  std::vector<ModuleWrapper*> modules(modules_size);
+  for (int i = 0; i < modules_size; i++) {
+    modules[i] = (ModuleWrapper*)module_addresses[i];
+  }
+  return modules;
+}
+
 }  // namespace
 
 JNI_FUNC jlong JNI_PREFIX(nativeNew)(JNIEnv* env, jobject thiz) {
@@ -60,6 +78,29 @@
   return (jint)status.code();
 }
 
+JNI_FUNC jint JNI_PREFIX(nativeCreateWithModules)(JNIEnv* env, jobject thiz,
+                                                  jlong instanceAddress,
+                                                  jlongArray moduleAddresses) {
+  ContextWrapper* context = GetContextWrapper(env, thiz);
+  CHECK_NE(context, nullptr);
+
+  auto instance = (InstanceWrapper*)instanceAddress;
+  auto modules = GetModuleWrappersFromAdresses(env, moduleAddresses);
+
+  auto status = context->CreateWithModules(*instance, modules);
+  return (jint)status.code();
+}
+
+JNI_FUNC jint JNI_PREFIX(nativeRegisterModules)(JNIEnv* env, jobject thiz,
+                                                jlongArray moduleAddresses) {
+  ContextWrapper* context = GetContextWrapper(env, thiz);
+  CHECK_NE(context, nullptr);
+
+  auto modules = GetModuleWrappersFromAdresses(env, moduleAddresses);
+  auto status = context->RegisterModules(modules);
+  return (jint)status.code();
+}
+
 JNI_FUNC jint JNI_PREFIX(nativeGetId)(JNIEnv* env, jobject thiz) {
   ContextWrapper* context = GetContextWrapper(env, thiz);
   CHECK_NE(context, nullptr);
diff --git a/bindings/java/com/google/iree/native/context_wrapper.cc b/bindings/java/com/google/iree/native/context_wrapper.cc
index f6c0448..eb3d354 100644
--- a/bindings/java/com/google/iree/native/context_wrapper.cc
+++ b/bindings/java/com/google/iree/native/context_wrapper.cc
@@ -20,15 +20,78 @@
 namespace iree {
 namespace java {
 
-Status ContextWrapper::Create(InstanceWrapper instance_wrapper) {
-  return FromApiStatus(iree_vm_context_create(instance_wrapper.instance(),
-                                              IREE_ALLOCATOR_SYSTEM, &context_),
+namespace {
+
+std::vector<iree_vm_module_t*> GetModulesFromModuleWrappers(
+    const std::vector<ModuleWrapper*>& module_wrappers) {
+  std::vector<iree_vm_module_t*> modules(module_wrappers.size());
+  for (int i = 0; i < module_wrappers.size(); i++) {
+    modules[i] = module_wrappers[i]->module();
+  }
+  return modules;
+}
+
+}  // namespace
+
+Status ContextWrapper::Create(const InstanceWrapper& instance_wrapper) {
+  RETURN_IF_ERROR(
+      FromApiStatus(iree_vm_context_create(instance_wrapper.instance(),
+                                           IREE_ALLOCATOR_SYSTEM, &context_),
+                    IREE_LOC));
+  RETURN_IF_ERROR(CreateDefaultModules());
+  std::vector<iree_vm_module_t*> default_modules = {hal_module_};
+  return FromApiStatus(
+      iree_vm_context_register_modules(context_, default_modules.data(),
+                                       default_modules.size()),
+      IREE_LOC);
+}
+
+Status ContextWrapper::CreateWithModules(
+    const InstanceWrapper& instance_wrapper,
+    const std::vector<ModuleWrapper*>& module_wrappers) {
+  auto modules = GetModulesFromModuleWrappers(module_wrappers);
+  RETURN_IF_ERROR(CreateDefaultModules());
+
+  // The ordering of modules matters, so default modules need to be at the
+  // beginning of the vector.
+  modules.insert(modules.begin(), hal_module_);
+
+  return FromApiStatus(iree_vm_context_create_with_modules(
+                           instance_wrapper.instance(), modules.data(),
+                           modules.size(), IREE_ALLOCATOR_SYSTEM, &context_),
+                       IREE_LOC);
+}
+
+Status ContextWrapper::RegisterModules(
+    const std::vector<ModuleWrapper*>& module_wrappers) {
+  auto modules = GetModulesFromModuleWrappers(module_wrappers);
+  return FromApiStatus(iree_vm_context_register_modules(
+                           context_, modules.data(), modules.size()),
                        IREE_LOC);
 }
 
 int ContextWrapper::id() const { return iree_vm_context_id(context_); }
 
-ContextWrapper::~ContextWrapper() { iree_vm_context_release(context_); }
+ContextWrapper::~ContextWrapper() {
+  iree_vm_context_release(context_);
+  iree_vm_module_release(hal_module_);
+  iree_hal_device_release(device_);
+  iree_hal_driver_release(driver_);
+}
+
+// TODO(jennik): Also create default string and tensorlist modules.
+Status ContextWrapper::CreateDefaultModules() {
+  RETURN_IF_ERROR(FromApiStatus(
+      iree_hal_driver_registry_create_driver(iree_make_cstring_view("vmla"),
+                                             IREE_ALLOCATOR_SYSTEM, &driver_),
+      IREE_LOC));
+  RETURN_IF_ERROR(FromApiStatus(iree_hal_driver_create_default_device(
+                                    driver_, IREE_ALLOCATOR_SYSTEM, &device_),
+                                IREE_LOC));
+  return FromApiStatus(
+      iree_hal_module_create(device_, IREE_ALLOCATOR_SYSTEM, &hal_module_),
+      IREE_LOC);
+}
 
 }  // namespace java
 }  // namespace iree
diff --git a/bindings/java/com/google/iree/native/context_wrapper.h b/bindings/java/com/google/iree/native/context_wrapper.h
index eb54ebd..380d587 100644
--- a/bindings/java/com/google/iree/native/context_wrapper.h
+++ b/bindings/java/com/google/iree/native/context_wrapper.h
@@ -16,7 +16,10 @@
 #define IREE_BINDINGS_JAVA_COM_GOOGLE_IREE_NATIVE_CONTEXT_WRAPPER_H_
 
 #include "bindings/java/com/google/iree/native/instance_wrapper.h"
+#include "bindings/java/com/google/iree/native/module_wrapper.h"
 #include "iree/base/status.h"
+#include "iree/hal/api.h"
+#include "iree/modules/hal/hal_module.h"
 #include "iree/vm/context.h"
 
 namespace iree {
@@ -24,14 +27,25 @@
 
 class ContextWrapper {
  public:
-  Status Create(InstanceWrapper instance_wrapper);
+  Status Create(const InstanceWrapper& instance_wrapper);
+
+  Status CreateWithModules(const InstanceWrapper& instance_wrapper,
+                           const std::vector<ModuleWrapper*>& module_wrappers);
+
+  Status RegisterModules(const std::vector<ModuleWrapper*>& module_wrappers);
 
   int id() const;
 
   ~ContextWrapper();
 
  private:
+  Status CreateDefaultModules();
+
   iree_vm_context_t* context_ = nullptr;
+  // TODO(jennik): These need to be configurable on the java side.
+  iree_hal_driver_t* driver_ = nullptr;
+  iree_hal_device_t* device_ = nullptr;
+  iree_vm_module_t* hal_module_ = nullptr;
 };
 
 }  // namespace java
diff --git a/bindings/java/com/google/iree/native/instance_wrapper.cc b/bindings/java/com/google/iree/native/instance_wrapper.cc
index 0ba6a8e..3a25893 100644
--- a/bindings/java/com/google/iree/native/instance_wrapper.cc
+++ b/bindings/java/com/google/iree/native/instance_wrapper.cc
@@ -15,6 +15,7 @@
 #include "bindings/java/com/google/iree/native/instance_wrapper.h"
 
 #include "iree/base/api_util.h"
+#include "iree/base/init.h"
 #include "iree/modules/hal/hal_module.h"
 #include "iree/modules/strings/strings_module.h"
 #include "iree/modules/tensorlist/native_module.h"
@@ -25,6 +26,13 @@
 namespace {
 
 void SetupVm() {
+  // TODO(jennik): Pass flags through from java.
+  char binname[] = "libiree.so";
+  char* argv[] = {binname};
+  char** aargv = argv;
+  int argc = 1;
+  InitializeEnvironment(&argc, &aargv);
+
   CHECK_EQ(IREE_STATUS_OK, iree_vm_register_builtin_types());
   CHECK_EQ(IREE_STATUS_OK, iree_hal_module_register_types());
   CHECK_EQ(IREE_STATUS_OK, iree_tensorlist_module_register_types());
diff --git a/bindings/java/com/google/iree/native/module_wrapper.cc b/bindings/java/com/google/iree/native/module_wrapper.cc
index 15f1fa1..221da63 100644
--- a/bindings/java/com/google/iree/native/module_wrapper.cc
+++ b/bindings/java/com/google/iree/native/module_wrapper.cc
@@ -28,6 +28,8 @@
       IREE_LOC);
 }
 
+iree_vm_module_t* ModuleWrapper::module() const { return module_; }
+
 ModuleWrapper::~ModuleWrapper() { iree_vm_module_release(module_); }
 
 }  // namespace java
diff --git a/bindings/java/com/google/iree/native/module_wrapper.h b/bindings/java/com/google/iree/native/module_wrapper.h
index 24097bc..100b526 100644
--- a/bindings/java/com/google/iree/native/module_wrapper.h
+++ b/bindings/java/com/google/iree/native/module_wrapper.h
@@ -25,6 +25,8 @@
  public:
   Status Create(const uint8_t* flatbuffer_data, iree_host_size_t length);
 
+  iree_vm_module_t* module() const;
+
   ~ModuleWrapper();
 
  private:
diff --git a/bindings/javatests/com/google/iree/IntegrationTest.java b/bindings/javatests/com/google/iree/IntegrationTest.java
index 2589278..499a9c8 100644
--- a/bindings/javatests/com/google/iree/IntegrationTest.java
+++ b/bindings/javatests/com/google/iree/IntegrationTest.java
@@ -26,6 +26,8 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.List;
 import org.apache.commons.io.IOUtils;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -42,7 +44,29 @@
   }
 
   @Test
-  public void simpleMul() throws Exception {
+  public void simpleMulWithStaticContext() throws Exception {
+    Instance.loadNativeLibrary();
+    Instance instance = new Instance();
+
+    Context context = ApplicationProvider.getApplicationContext();
+    Resources resources = context.getResources();
+    InputStream moduleInputStream = resources.openRawResource(R.raw.simple_mul_bytecode_module);
+    ByteBuffer moduleByteBuffer = convertInputStreamToByteBuffer(moduleInputStream);
+    Module module = new Module(moduleByteBuffer);
+
+    List<Module> modules = new ArrayList<>();
+    modules.add(module);
+    com.google.iree.Context ireeContext = new com.google.iree.Context(instance, modules);
+
+    assertNotEquals(ireeContext.getId(), -1);
+
+    module.free();
+    ireeContext.free();
+    instance.free();
+  }
+
+  @Test
+  public void simpleMulWithDynamicContext() throws Exception {
     Instance.loadNativeLibrary();
     Instance instance = new Instance();
     com.google.iree.Context ireeContext = new com.google.iree.Context(instance);
@@ -54,7 +78,10 @@
     InputStream moduleInputStream = resources.openRawResource(R.raw.simple_mul_bytecode_module);
     ByteBuffer moduleByteBuffer = convertInputStreamToByteBuffer(moduleInputStream);
     Module module = new Module(moduleByteBuffer);
-    // TODO(jennik): Register modules with the context.
+
+    List<Module> modules = new ArrayList<>();
+    modules.add(module);
+    ireeContext.registerModules(modules);
 
     module.free();
     ireeContext.free();
diff --git a/build_tools/bazel/third_party_import/llvm-project/overlay/mlir/BUILD.bazel b/build_tools/bazel/third_party_import/llvm-project/overlay/mlir/BUILD.bazel
index 18a7c4d..ec0574f 100644
--- a/build_tools/bazel/third_party_import/llvm-project/overlay/mlir/BUILD.bazel
+++ b/build_tools/bazel/third_party_import/llvm-project/overlay/mlir/BUILD.bazel
@@ -32,45 +32,32 @@
     textual_hdrs = ["include/mlir/IR/DialectSymbolRegistry.def"],
 )
 
-gentbl(
-    name = "OpAsmInterfacesIncGen",
-    strip_include_prefix = "include",
-    tbl_outs = [
-        (
-            "-gen-op-interface-decls",
-            "include/mlir/IR/OpAsmInterface.h.inc",
-        ),
-        (
-            "-gen-op-interface-defs",
-            "include/mlir/IR/OpAsmInterface.cpp.inc",
-        ),
-    ],
-    tblgen = ":mlir-tblgen",
-    td_file = "include/mlir/IR/OpAsmInterface.td",
-    td_srcs = [
-        ":OpBaseTdFiles",
-    ],
-)
-
-gentbl(
-    name = "SymbolInterfacesIncGen",
-    strip_include_prefix = "include",
-    tbl_outs = [
-        (
-            "-gen-op-interface-decls",
-            "include/mlir/IR/SymbolInterfaces.h.inc",
-        ),
-        (
-            "-gen-op-interface-defs",
-            "include/mlir/IR/SymbolInterfaces.cpp.inc",
-        ),
-    ],
-    tblgen = ":mlir-tblgen",
-    td_file = "include/mlir/IR/SymbolInterfaces.td",
-    td_srcs = [
-        ":OpBaseTdFiles",
-    ],
-)
+[
+    gentbl(
+        name = name + "IncGen",
+        strip_include_prefix = "include",
+        tbl_outs = [
+            (
+                "-gen-op-interface-decls",
+                "include/mlir/IR/" + name + ".h.inc",
+            ),
+            (
+                "-gen-op-interface-defs",
+                "include/mlir/IR/" + name + ".cpp.inc",
+            ),
+        ],
+        tblgen = ":mlir-tblgen",
+        td_file = "include/mlir/IR/" + name + ".td",
+        td_srcs = [
+            ":OpBaseTdFiles",
+        ],
+    )
+    for name in [
+        "OpAsmInterface",
+        "RegionKindInterface",
+        "SymbolInterfaces",
+    ]
+]
 
 cc_library(
     name = "IR",
@@ -88,7 +75,8 @@
         ":CallOpInterfacesIncGen",
         ":DialectSymbolRegistry",
         ":InferTypeOpInterfaceIncGen",
-        ":OpAsmInterfacesIncGen",
+        ":OpAsmInterfaceIncGen",
+        ":RegionKindInterfaceIncGen",
         ":SideEffectInterfacesIncGen",
         ":Support",
         ":SymbolInterfacesIncGen",
@@ -3732,16 +3720,13 @@
         "include/mlir/Interfaces/ViewLikeInterface.td",
         "include/mlir/Dialect/LLVMIR/LLVMOpBase.td",
         "include/mlir/Dialect/StandardOps/IR/Ops.td",
+        "include/mlir/Dialect/Shape/IR/ShapeOps.td",
+        "include/mlir/Dialect/Shape/IR/ShapeBase.td",
         "include/mlir/IR/OpAsmInterface.td",
         "include/mlir/IR/OpBase.td",
+        "include/mlir/IR/RegionKindInterface.td",
         "include/mlir/IR/SymbolInterfaces.td",
         "include/mlir/Transforms/InliningUtils.h",
-    ],
-    visibility = [":friends"],
-)
-
-exports_files(
-    [
         "include/mlir/Interfaces/InferTypeOpInterface.td",
         "include/mlir/Interfaces/LoopLikeInterface.td",
     ],
diff --git a/build_tools/bazel/third_party_import/llvm-project/overlay/mlir/test/BUILD.bazel b/build_tools/bazel/third_party_import/llvm-project/overlay/mlir/test/BUILD.bazel
index e096605..36e68ac 100644
--- a/build_tools/bazel/third_party_import/llvm-project/overlay/mlir/test/BUILD.bazel
+++ b/build_tools/bazel/third_party_import/llvm-project/overlay/mlir/test/BUILD.bazel
@@ -73,6 +73,7 @@
     td_srcs = [
         "@llvm-project//mlir:OpBaseTdFiles",
         "@llvm-project//mlir:include/mlir/IR/OpAsmInterface.td",
+        "@llvm-project//mlir:include/mlir/IR/RegionKindInterface.td",
         "@llvm-project//mlir:include/mlir/IR/SymbolInterfaces.td",
         "@llvm-project//mlir:include/mlir/Interfaces/CallInterfaces.td",
         "@llvm-project//mlir:include/mlir/Interfaces/ControlFlowInterfaces.td",
diff --git a/build_tools/third_party/tensorflow/tensorflow/compiler/mlir/hlo/CMakeLists.txt b/build_tools/third_party/tensorflow/tensorflow/compiler/mlir/hlo/CMakeLists.txt
index bf06af4..0327062 100644
--- a/build_tools/third_party/tensorflow/tensorflow/compiler/mlir/hlo/CMakeLists.txt
+++ b/build_tools/third_party/tensorflow/tensorflow/compiler/mlir/hlo/CMakeLists.txt
@@ -85,6 +85,7 @@
     tensorflow_mlir_hlo_chlo_ops_gen
     tensorflow_mlir_hlo_hlo_ops_base_gen
     tensorflow_mlir_hlo_hlo_ops_gen
+    tensorflow_mlir_hlo_hlo_ops_pattern_gen
     tensorflow_mlir_hlo_infer_fusibility_op_interface_gen
     tensorflow_mlir_hlo_legalize_to_standard_patterns_gen
     tensorflow_mlir_hlo_lhlo_ops_gen
@@ -146,6 +147,21 @@
   PACKAGE
     tensorflow
   NAME
+    mlir_hlo_hlo_ops_pattern_gen
+  TBLGEN
+    MLIR
+  ROOT
+    ${TF_MLIR_HLO_SRC_ROOT}
+  SRCS
+    "lib/Dialect/mhlo/IR/hlo_patterns.td"
+  OUTS
+    -gen-rewriters include/mlir-hlo/Dialect/mhlo/IR/hlo_patterns.cc.inc
+)
+
+external_tablegen_library(
+  PACKAGE
+    tensorflow
+  NAME
     mlir_hlo_lhlo_ops_gen
   TBLGEN
     MLIR
diff --git a/integrations/tensorflow/bindings/python/pyiree/tf/support/tf_utils.py b/integrations/tensorflow/bindings/python/pyiree/tf/support/tf_utils.py
index d1e5726..2752629 100644
--- a/integrations/tensorflow/bindings/python/pyiree/tf/support/tf_utils.py
+++ b/integrations/tensorflow/bindings/python/pyiree/tf/support/tf_utils.py
@@ -145,8 +145,8 @@
       backend_info: an element of BackendInfo corresponding to the backend to
         compile to. If a TF 'backend' is provided then the module is wrapped in
         a TfCompiledModule.
-      exported_names: an optional iterable of strings representing which of
-        the tf.Module's functions to compile. If exported_names is empty all
+      exported_names: an optional iterable of strings representing which of the
+        tf.Module's functions to compile. If exported_names is empty all
         functions will be compiled.
       artifacts_dir: an optional path to save compilation artifacts to.
     """
@@ -180,8 +180,8 @@
         subclass instance.
       backend_info: an element of BackendInfo corresponding to the IREE backend
         to compile to.
-      exported_names: an optional iterable of strings representing which of
-        the tf.Module's functions to compile. If exported_names is empty all
+      exported_names: an optional iterable of strings representing which of the
+        tf.Module's functions to compile. If exported_names is empty all
         functions will be compiled.
       artifacts_dir: an optional path to save compilation artifacts to.
     """
diff --git a/integrations/tensorflow/e2e/README.md b/integrations/tensorflow/e2e/README.md
index 928bbe0..341aa56 100644
--- a/integrations/tensorflow/e2e/README.md
+++ b/integrations/tensorflow/e2e/README.md
@@ -26,11 +26,10 @@
 ## Compiling `tf.Module`s
 
 Compatible TensorFlow modules can be compiled to specific IREE backends using
-`IreeCompiledModule.compile(...)`. This also optionally saves
-compilation artifacts to a specified directory. These artifacts include: MLIR
-across various lowerings, a TensorFlow SavedModel, and the compiled VM
-FlatBuffer. A basic example of creating and calling an `IreeCompiledModule` can
-be found in
+`IreeCompiledModule.compile(...)`. This also optionally saves compilation
+artifacts to a specified directory. These artifacts include: MLIR across various
+lowerings, a TensorFlow SavedModel, and the compiled VM FlatBuffer. A basic
+example of creating and calling an `IreeCompiledModule` can be found in
 [`tf_utils_test.py`](https://github.com/google/iree/blob/main/integrations/tensorflow/bindings/python/pyiree/tf/support/tf_utils_test.py)
 
 When using Keras models or tf.Modules with functions that IREE can't compile,
diff --git a/third_party/llvm-project b/third_party/llvm-project
index 84a1bc7..1067d3e 160000
--- a/third_party/llvm-project
+++ b/third_party/llvm-project
@@ -1 +1 @@
-Subproject commit 84a1bc7f2c0c7bd5f18a4ecaf91e27644aa94190
+Subproject commit 1067d3e176ea7b0b1942c163bf8c6c90107768c1
diff --git a/third_party/tensorflow b/third_party/tensorflow
index 2f4444c..33a4c1a 160000
--- a/third_party/tensorflow
+++ b/third_party/tensorflow
@@ -1 +1 @@
-Subproject commit 2f4444c1cff8ac07ab2c31d1ae23d23c66147126
+Subproject commit 33a4c1a0abaf93656992d11205eabcdb21980bc9