Update github branch names etc (NFC) (#15482)

Outdated branch names given renaming.
diff --git a/build_tools/bazel/build_core.sh b/build_tools/bazel/build_core.sh
index 8f30d64..4df8f2c 100755
--- a/build_tools/bazel/build_core.sh
+++ b/build_tools/bazel/build_core.sh
@@ -13,11 +13,11 @@
 # set.
 # IREE_VULKAN_DISABLE: Do not run tests that require Vulkan. Default: 0
 # BUILD_TAG_FILTERS: Passed to bazel to filter targets to build.
-#   See https://docs.bazel.build/versions/master/command-line-reference.html#flag--build_tag_filters)
+#   See https://bazel.build/reference/command-line-reference.html#flag--build_tag_filters)
 #   Default: "-nokokoro"
 # TEST_TAG_FILTERS: Passed to bazel to filter targets to test. Note that test
 #   targets excluded this way will also not be built.
-#   See https://docs.bazel.build/versions/master/command-line-reference.html#flag--test_tag_filters)
+#   See https://bazel.build/reference/command-line-reference.html#flag--test_tag_filters)
 #   Default: If IREE_VULKAN_DISABLE=1, "-nokokoro,-driver=vulkan". Else "-nokokoro".
 
 set -xeuo pipefail
diff --git a/build_tools/bazel/iree.bazelrc b/build_tools/bazel/iree.bazelrc
index 1b9920e..e0643e7 100644
--- a/build_tools/bazel/iree.bazelrc
+++ b/build_tools/bazel/iree.bazelrc
@@ -23,7 +23,7 @@
 # Enables unix-style runfiles link trees on Windows. Requires enabling symlink
 # permissions: Enable Developer Mode in the Developer Settings page of the
 # system settings. See
-# https://docs.bazel.build/versions/master/windows.html#enable-symlink-support
+# https://bazel.build/configure/windows#enable-symlink-support
 # and https://blogs.windows.com/windowsdeveloper/2016/12/02/symlinks-windows-10/
 startup --windows_enable_symlinks
 build --enable_runfiles
diff --git a/build_tools/bazel_to_cmake/bazel_to_cmake_converter.py b/build_tools/bazel_to_cmake/bazel_to_cmake_converter.py
index fec440d..8410473 100644
--- a/build_tools/bazel_to_cmake/bazel_to_cmake_converter.py
+++ b/build_tools/bazel_to_cmake/bazel_to_cmake_converter.py
@@ -343,7 +343,7 @@
                 # bazel's glob has some specific restrictions about crossing package
                 # boundaries. We have no uses of recursive globs. Rather than try to
                 # emulate them or silently give different behavior, just error out.
-                # See https://docs.bazel.build/versions/master/be/functions.html#glob
+                # See https://bazel.build/reference/be/functions.html#glob
                 raise NotImplementedError("Recursive globs not supported")
             # Bazel `*.mlir` glob -> CMake Variable `_GLOB_X_MLIR`
             var = "_GLOB_" + pattern.replace("*", "X").replace(".", "_").upper()
diff --git a/compiler/src/iree/compiler/Dialect/HAL/Target/LLVMCPU/internal/WasmLinkerTool.cpp b/compiler/src/iree/compiler/Dialect/HAL/Target/LLVMCPU/internal/WasmLinkerTool.cpp
index c21fb05..75892a8 100644
--- a/compiler/src/iree/compiler/Dialect/HAL/Target/LLVMCPU/internal/WasmLinkerTool.cpp
+++ b/compiler/src/iree/compiler/Dialect/HAL/Target/LLVMCPU/internal/WasmLinkerTool.cpp
@@ -23,7 +23,7 @@
 //
 // For details on the linking process and file formats, see:
 // * https://lld.llvm.org/WebAssembly.html
-// * https://github.com/WebAssembly/tool-conventions/blob/master/Linking.md
+// * https://github.com/WebAssembly/tool-conventions/blob/main/Linking.md
 //
 // For more background on WebAssembly, see:
 // * https://webassembly.org/
diff --git a/compiler/src/iree/compiler/Dialect/Vulkan/IR/VulkanAttributes.td b/compiler/src/iree/compiler/Dialect/Vulkan/IR/VulkanAttributes.td
index 61eda11..413dfac 100644
--- a/compiler/src/iree/compiler/Dialect/Vulkan/IR/VulkanAttributes.td
+++ b/compiler/src/iree/compiler/Dialect/Vulkan/IR/VulkanAttributes.td
@@ -36,7 +36,7 @@
 
 // TODO(antiagainst): consider auto-generating this file (or part of it) from
 // vk.xml:
-// https://raw.githubusercontent.com/KhronosGroup/Vulkan-Docs/master/xml/vk.xml
+// https://raw.githubusercontent.com/KhronosGroup/Vulkan-Docs/main/xml/vk.xml
 
 // Dictionary attribute containing various Vulkan capability bits. This is
 // aggregated from various Vulkan properties, limits, features from the spec.
diff --git a/compiler/src/iree/compiler/Tools/iree_compile_lib.cc b/compiler/src/iree/compiler/Tools/iree_compile_lib.cc
index a259251..ba1bcf3 100644
--- a/compiler/src/iree/compiler/Tools/iree_compile_lib.cc
+++ b/compiler/src/iree/compiler/Tools/iree_compile_lib.cc
@@ -78,7 +78,7 @@
       "o", llvm::cl::desc("Output filename"), llvm::cl::value_desc("filename"),
       llvm::cl::init("-"), llvm::cl::cat(mainOptions));
 
-  // The output format flag is the master control for what we do with the
+  // The output format flag is the primary control for what we do with the
   // in-memory compiled form.
   llvm::cl::opt<OutputFormat> outputFormat(
       "output-format", llvm::cl::desc("Format of compiled output"),
diff --git a/docs/api_docs/python/index.rst b/docs/api_docs/python/index.rst
index 20478cb..cf23858 100644
--- a/docs/api_docs/python/index.rst
+++ b/docs/api_docs/python/index.rst
@@ -1,4 +1,4 @@
-.. IREE Python API documentation master file, created by
+.. IREE Python API documentation main file, created by
    sphinx-quickstart on Sat Sep 25 16:59:09 2021.
    You can adapt this file completely to your liking, but it should at least
    contain the root `toctree` directive.
diff --git a/docs/website/docs/building-from-source/riscv.md b/docs/website/docs/building-from-source/riscv.md
index a9a9d6e..b9be8e1 100644
--- a/docs/website/docs/building-from-source/riscv.md
+++ b/docs/website/docs/building-from-source/riscv.md
@@ -143,13 +143,13 @@
  toolchain and the emulator, build the tools from the following sources:
 
 * RISC-V toolchain is built from
-<https://github.com/llvm/llvm-project> (main branch).
+<https://github.com/llvm/llvm-project>.
     * Currently, the LLVM compiler is built on GNU toolchain, including libgcc,
       GNU linker, and C libraries. You need to build GNU toolchain first.
     * Clone GNU toolchain from:
-      <https://github.com/riscv/riscv-gnu-toolchain>
-      (master branch). Switch the "riscv-binutils" submodule to
-      `git://sourceware.org/git/binutils-gdb.git` (master branch) manually.
+      <https://github.com/riscv/riscv-gnu-toolchain>.
+      Switch the "riscv-binutils" submodule to
+      `git://sourceware.org/git/binutils-gdb.git` manually.
 * RISC-V QEMU is built from
 <https://gitlab.com/qemu-project/qemu/tree/v8.1.2>.
 
diff --git a/docs/website/docs/developers/building/cmake-options.md b/docs/website/docs/developers/building/cmake-options.md
index 2c6d007..c144c3d 100644
--- a/docs/website/docs/developers/building/cmake-options.md
+++ b/docs/website/docs/developers/building/cmake-options.md
@@ -170,7 +170,7 @@
 ## Cross-compilation
 
 When cross compiling (using a toolchain file like
-[`android.toolchain.cmake`](https://android.googlesource.com/platform/ndk/+/master/build/cmake/android.toolchain.cmake)),
+[`android.toolchain.cmake`](https://android.googlesource.com/platform/ndk/+/main/build/cmake/android.toolchain.cmake)),
 first build and install IREE's tools for your host configuration, then use the
 `IREE_HOST_BIN_DIR` CMake option to point the cross compiled build at the
 host tools.
diff --git a/docs/website/docs/developers/performance/profiling-cpu-events.md b/docs/website/docs/developers/performance/profiling-cpu-events.md
index 892217b..79c23e0 100644
--- a/docs/website/docs/developers/performance/profiling-cpu-events.md
+++ b/docs/website/docs/developers/performance/profiling-cpu-events.md
@@ -185,7 +185,7 @@
 
 There is no `simpleperf annotate`. The `simpleperf` documentation lists a couple
 of
-[ways](https://android.googlesource.com/platform/system/extras/+/master/simpleperf/doc/README.md#show-annotated-source-code-and-disassembly)
+[ways](https://android.googlesource.com/platform/system/extras/+/main/simpleperf/doc/README.md#show-annotated-source-code-and-disassembly)
 of achieving the same thing.
 
 However:
diff --git a/docs/website/docs/developers/vulkan-environment-setup.md b/docs/website/docs/developers/vulkan-environment-setup.md
index 36c76eb..68a8f0c 100644
--- a/docs/website/docs/developers/vulkan-environment-setup.md
+++ b/docs/website/docs/developers/vulkan-environment-setup.md
@@ -207,12 +207,12 @@
 export DISPLAY=:0
 ```
 
-[VulkanArchOverview]: https://github.com/KhronosGroup/Vulkan-Loader/blob/master/loader/LoaderAndLayerInterface.md#overview
-[VulkanArchPicture]: https://raw.githubusercontent.com/KhronosGroup/Vulkan-Loader/master/docs/images/high_level_loader.png
-[VulkanICD]: https://github.com/KhronosGroup/Vulkan-Loader/blob/master/loader/LoaderAndLayerInterface.md#installable-client-drivers
-[VulkanLayer]: https://github.com/KhronosGroup/Vulkan-Loader/blob/master/loader/LoaderAndLayerInterface.md#layers
-[VulkanLoader]: https://github.com/KhronosGroup/Vulkan-Loader/blob/master/loader/LoaderAndLayerInterface.md#the-loader
-[VulkanLoaderEnvVars]: https://github.com/KhronosGroup/Vulkan-Loader/blob/master/loader/LoaderAndLayerInterface.md#table-of-debug-environment-variables
+[VulkanArchOverview]: https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderInterfaceArchitecture.md#overview
+[VulkanArchPicture]: https://raw.githubusercontent.com/KhronosGroup/Vulkan-Loader/main/docs/images/high_level_loader.png
+[VulkanICD]: https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderInterfaceArchitecture.md#installable-client-drivers
+[VulkanLayer]: https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderInterfaceArchitecture.md#layers
+[VulkanLoader]: https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderInterfaceArchitecture.md#the-loader
+[VulkanLoaderEnvVars]: https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderInterfaceArchitecture.md#table-of-debug-environment-variables
 [VulkanLoaderSource]: https://github.com/KhronosGroup/Vulkan-Loader
 [VulkanSDK]: https://www.lunarg.com/vulkan-sdk/
 [VulkanValidationLayersSource]: https://github.com/KhronosGroup/Vulkan-ValidationLayers
diff --git a/runtime/src/iree/base/internal/fpu_state.c b/runtime/src/iree/base/internal/fpu_state.c
index 6ec80b3..049c968 100644
--- a/runtime/src/iree/base/internal/fpu_state.c
+++ b/runtime/src/iree/base/internal/fpu_state.c
@@ -20,7 +20,7 @@
 // iree_fpu_state_t
 //==============================================================================
 // https://github.com/petewarden/tensorflow_makefile/blob/master/tensorflow/core/platform/denormal.cc
-// https://chromium.googlesource.com/chromium/blink/+/master/Source/platform/audio/DenormalDisabler.h
+// https://chromium.googlesource.com/chromium/blink/+/main/Source/platform/audio/DenormalDisabler.h
 
 static uint64_t iree_fpu_state_set_dtz(uint64_t state, bool denormals_to_zero);
 
diff --git a/runtime/src/iree/base/internal/synchronization.h b/runtime/src/iree/base/internal/synchronization.h
index 0db86d2..e26b9b4 100644
--- a/runtime/src/iree/base/internal/synchronization.h
+++ b/runtime/src/iree/base/internal/synchronization.h
@@ -339,7 +339,7 @@
 // http://www.1024cores.net/home/lock-free-algorithms/eventcounts
 // https://software.intel.com/en-us/forums/intel-threading-building-blocks/topic/299245
 // https://github.com/r10a/Event-Counts
-// https://github.com/facebook/folly/blob/master/folly/experimental/EventCount.h
+// https://github.com/facebook/folly/blob/main/folly/experimental/EventCount.h
 // https://github.com/concurrencykit/ck/blob/master/include/ck_ec.h
 typedef struct iree_notification_t {
 #if IREE_SYNCHRONIZATION_DISABLE_UNSAFE
diff --git a/samples/colab/README.md b/samples/colab/README.md
index aa1896a..f4c524a 100644
--- a/samples/colab/README.md
+++ b/samples/colab/README.md
@@ -19,7 +19,7 @@
 ## Working with GitHub
 
 Refer to
-[Colab's GitHub demo](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
+[Colab's GitHub demo](https://colab.research.google.com/github/googlecolab/colabtools/blob/main/notebooks/colab-github-demo.ipynb)
 for general information about using Colab with GitHub.
 
 To make changes to a notebook in this repository, one possible workflow is:
diff --git a/samples/colab/dummy.py b/samples/colab/dummy.py
deleted file mode 100644
index e457cb5..0000000
--- a/samples/colab/dummy.py
+++ /dev/null
@@ -1,5 +0,0 @@
-# Copyright 2019 The IREE Authors
-#
-# Licensed under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
diff --git a/tools/android/run_module_app/README.md b/tools/android/run_module_app/README.md
index 9f7ae4d..6b7dfaa 100644
--- a/tools/android/run_module_app/README.md
+++ b/tools/android/run_module_app/README.md
@@ -57,5 +57,5 @@
 VM FlatBuffer and invocation information and run it.
 
 [native-activity]: https://developer.android.com/reference/android/app/NativeActivity
-[native-activity-example]: https://github.com/android/ndk-samples/tree/master/native-activity
+[native-activity-example]: https://github.com/android/ndk-samples/tree/main/native-activity
 [native-activity-tutorial]: https://medium.com/androiddevelopers/getting-started-with-c-and-android-native-activities-2213b402ffff