[llvm] [CodeGen] TwoAddressInstructionPass: Control NumVisited limit via command line option (PR #100046)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 23 03:24:12 PDT 2024


================
@@ -80,6 +80,13 @@ EnableRescheduling("twoaddr-reschedule",
                    cl::desc("Coalesce copies by rescheduling (default=true)"),
                    cl::init(true), cl::Hidden);
 
+// Limit the number of rescheduling visits to dependent instructions.
+// FIXME: Arbitrary limit to reduce compile time cost.
+static cl::opt<unsigned>
+    MaxVisits("twoaddr-visit-limit", cl::Hidden, cl::init(100),
----------------
RKSimon wrote:

For this PR, it would be better to keep the original value as default (10) - but add test coverage for setting twoaddr-visit-limit to higher (and lower?) values. We can then do another PR that alters the default value in the future.

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


More information about the llvm-commits mailing list