8000 xls/tools: Extract pass pipeline flags library by copybara-service[bot] · Pull Request #5549 · google/xls · GitHub
[go: up one dir, main page]

Skip to content

xls/tools: Extract pass pipeline flags library - #5549

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_1028349989
Nov 25, 2026
Merged

copybara-service[bot] merged 1 commit into
mainfrom
test_1028349989

Conversation

@copybara-service
@copybara-service copybara-service Bot commented Nov 24, 2026 •
Copy link
Copy Markdown

xls/tools: Extract pass pipeline flags library

Move the nine optimization pass-pipeline ABSL_FLAG definitions and their
parsing/validation logic out of opt_flags into //xls/tools:pass_pipeline_flags
so other tools can share them without linking colliding flags (--top,
--opt_level, --ir_dump_path, --delay_model, --area_model):

  • Flags moved: --passes, --passes_proto, --passes_textproto,
    --pipeline_proto, --pipeline_textproto, --skip_passes,
    --passes_bisect_limit, --passes_bisect_limit_is_error, and
    --debug_optimizations.
  • Exposes GetPassPipelineFlags() returning PassPipelineFlagsResult
    ({config, any_flags_set}).
  • Keeps OptFlagsProto field tags unchanged for backwards compatibility.
  • Updates opt_flags to delegate pass-pipeline flag reading to
    GetPassPipelineFlags().

Also fixes bugs encountered during extraction:

  • Handle explicit --passes= (parsed by Abseil as std::nullopt for
    std::optional<std::string>) as an empty no-op pipeline rather than falling
    back to the default pipeline.
  • Fix --pipeline__textproto typo in the conflict error message.
  • Drop redundant invariant-checker attachment before ToProto().
  • Mark any_flags_set when --ram_rewrites_pb is passed so combining it with
    --opt_options_proto is rejected instead of silently overwritten.
  • Fix stale pass short names in the --passes example (arith_simp,
    map_inlining).

@copybara-service
copybara-service Bot force-pushed the test_1028349989 branch 2 times, most recently from 9b4c04d to 6d069b4 Compare November 24, 2026 23:52
Move the nine optimization pass-pipeline `ABSL_FLAG` definitions and their
parsing/validation logic out of `opt_flags` into `//xls/tools:pass_pipeline_flags`
so other tools can share them without linking colliding flags (`--top`,
`--opt_level`, `--ir_dump_path`, `--delay_model`, `--area_model`):

- Flags moved: `--passes`, `--passes_proto`, `--passes_textproto`,
  `--pipeline_proto`, `--pipeline_textproto`, `--skip_passes`,
  `--passes_bisect_limit`, `--passes_bisect_limit_is_error`, and
  `--debug_optimizations`.
- Exposes `GetPassPipelineFlags()` returning `PassPipelineFlagsResult`
  (`{config, any_flags_set}`).
- Keeps `OptFlagsProto` field tags unchanged for backwards compatibility.
- Updates `opt_flags` to delegate pass-pipeline flag reading to
  `GetPassPipelineFlags()`.

Also fixes bugs encountered during extraction:
- Handle explicit `--passes=` (parsed by Abseil as `std::nullopt` for
  `std::optional<std::string>`) as an empty no-op pipeline rather than falling
  back to the default pipeline.
- Fix `--pipeline__textproto` typo in the conflict error message.
- Drop redundant invariant-checker attachment before `ToProto()`.
- Mark `any_flags_set` when `--ram_rewrites_pb` is passed so combining it with
  `--opt_options_proto` is rejected instead of silently overwritten.
- Fix stale pass short names in the `--passes` example (`arith_simp`,
  `map_inlining`).

PiperOrigin-RevId: 1029419183
@copybara-service
copybara-service Bot merged commit 8652739 into main Nov 25, 2026
4 checks passed
@copybara-service
copybara-service Bot deleted the test_1028349989 branch November 25, 2026 00:20

This branch was previously deployed

1 inactive deployment
github-pages — 8652739e Deployed Nov 25, 2026 by copybara-service[bot] via deploy #14978
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0