[llvm] [Analysis] Avoid running transform passes that have just been run (PR #112092)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 5 06:10:09 PST 2024


================
@@ -0,0 +1,107 @@
+//===- LastRunTrackingAnalysis.h - Avoid running redundant pass -*- C++ -*-===//
+//
+// Part of the LLVM Project, 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
+//
+//===----------------------------------------------------------------------===//
+//
+// This is an analysis pass to track a set of passes that have been run, so that
+// we can avoid running a pass again if there is no change since the last run of
+// the pass.
+//
+// In this analysis we track a set of passes S for each function with the
+// following transition rules:
+//   1. If pass P make changes, set S = {P}.
----------------
nikic wrote:

```suggestion
//   1. If pass P makes changes, set S = {P}.
```

https://github.com/llvm/llvm-project/pull/112092


More information about the llvm-commits mailing list