[llvm] 66ba9c9 - [MLGO] Ensure cmd_filter is marked Optional (#179781)

via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 4 13:54:32 PST 2026


Author: Aiden Grossman
Date: 2026-02-04T13:54:26-08:00
New Revision: 66ba9c9475c7628893f387f1b9d9d3056b05d995

URL: https://github.com/llvm/llvm-project/commit/66ba9c9475c7628893f387f1b9d9d3056b05d995
DIFF: https://github.com/llvm/llvm-project/commit/66ba9c9475c7628893f387f1b9d9d3056b05d995.diff

LOG: [MLGO] Ensure cmd_filter is marked Optional (#179781)

cmd_filter is supposed to be set to None if there is no filter according
to the API documentation. This is not actually allowed currently though
according to the type information. Update the type information to match
what is intended.

Added: 
    

Modified: 
    llvm/utils/mlgo-utils/mlgo/corpus/extract_ir_lib.py

Removed: 
    


################################################################################
diff  --git a/llvm/utils/mlgo-utils/mlgo/corpus/extract_ir_lib.py b/llvm/utils/mlgo-utils/mlgo/corpus/extract_ir_lib.py
index f434e59524bbf..386dede34ad11 100644
--- a/llvm/utils/mlgo-utils/mlgo/corpus/extract_ir_lib.py
+++ b/llvm/utils/mlgo-utils/mlgo/corpus/extract_ir_lib.py
@@ -122,7 +122,7 @@ def _get_extraction_bc_command(
     def _extract_clang_artifacts(
         self,
         llvm_objcopy_path: str,
-        cmd_filter: str,
+        cmd_filter: Optional[str],
         is_thinlto: bool,
         cmd_section_name: str,
         bitcode_section_name: str,
@@ -343,7 +343,7 @@ def run_extraction(
     objs: List[TrainingIRExtractor],
     num_workers: int,
     llvm_objcopy_path: str,
-    cmd_filter: str,
+    cmd_filter: Optional[str],
     thinlto_build: str,
     cmd_section_name: str,
     bitcode_section_name: str,


        


More information about the llvm-commits mailing list