[llvm] [Pass] Add hyphen to some pass names (PR #74287)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 17 22:03:39 PST 2024


================
@@ -1294,6 +1294,26 @@ static bool isLoopPassName(StringRef Name, CallbacksT &Callbacks,
   return callbacksAcceptPassName<LoopPassManager>(Name, Callbacks);
 }
 
+static StringRef convertToNewPassName(StringRef OldName) {
+  static StringMap<StringRef> NameMap = {{"callbrprepare", "callbr-prepare"},
+                                         {"dwarfehprepare", "dwarf-eh-prepare"},
+                                         {"flattencfg", "flatten-cfg"},
+                                         {"loweratomic", "lower-atomic"},
+                                         {"lowerinvoke", "lower-invoke"},
+                                         {"lowerswitch", "lower-switch"},
+                                         {"winehprepare", "win-eh-prepare"},
+                                         {"targetir", "target-ir"},
+                                         {"targetlibinfo", "target-lib-info"}};
----------------
arsenm wrote:

I'd still drop this alias handling, especially given there's no additional testing for these names 

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


More information about the llvm-commits mailing list