[clang] [clang][cmake] Apply bolt optimizations as part of the clang target (PR #119896)

Petr Hosek via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 19 01:07:48 PST 2024


================
@@ -558,7 +560,107 @@ def genOrderFile(args):
     return 0
 
 
+def bolt_optimize(args):
+    parser = argparse.ArgumentParser("%prog  [options] ")
+    parser.add_argument("--method")
+    parser.add_argument("--input")
+    parser.add_argument("--instrumented-output")
+    parser.add_argument("--fdata")
+    parser.add_argument("--perf-training-binary-dir")
+    parser.add_argument("--readelf")
+    parser.add_argument("--bolt")
+    parser.add_argument("--lit")
+    parser.add_argument("--merge-fdata")
+
+    opts = parser.parse_args(args)
+
+    readelf = opts.readelf
+    bolt = opts.bolt
+    lit = opts.lit
----------------
petrhosek wrote:

This is just a nit, but these variables are only used a few times so I'd probably just inline them for simplicity.

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


More information about the cfe-commits mailing list