Repository navigation
Tags
Tags
Automated Code Change PiperOrigin-RevId: 1033151275
Pass std::string to riegeli::FdReader and FdWriter in XLS tests. `xls/tools/trace_to_perfetto_test.cc` and `xls/interpreter/tracing_observer_test.cc` pass `std::filesystem::path` directly to `riegeli::FdReader` and `riegeli::FdWriter`. Call `.string()` explicitly so they remain compatible when Riegeli removes `PathInitializer` in favor of `absl::string_view`. PiperOrigin-RevId: 1031237430
Fix wiring of 2D io object arrays. When a proc bound a 2D `Source`/`Sink` array element by element, each child got the wrong elements: a column instead of its row. For example, with `to_child: Sink<u32>[2][2]` and child `i` bound to `to_child[i]`: ``` before: child 0 gets _to_child__0_0, _to_child__1_0 after: child 0 gets _to_child__0_0, _to_child__0_1 ``` The elements were matched to channels in a different order than the channels were named. Both now use the same order. PiperOrigin-RevId: 1030245716
xls/dslx/ir_convert: Migrate ir_converter_options_flags.proto to Edit… …ions 2023 with explicit defaults `IrConverterOptionsFlagsProto` previously used `syntax = "proto3"`, so all non-zero boolean defaults (`verify`, `warnings_as_errors`, `lower_to_proc_scoped_channels`, `emit_trace`, `emit_cover`, `emit_assert`) were duplicated across `ir_converter_options_flags.cc`, `ConvertOptions`, and `ir_converter_main.cc`. Passing an empty or partial proto silently disabled verification, warnings-as-errors, traces, covers, and asserts. Default value impact: - CLI flag defaults: `--lower_to_proc_scoped_channels` `ABSL_FLAG` default changes from `false` to `true` to match `ConvertOptions` and existing runtime behavior (it is only populated via `POPULATE_FLAG_IF_SPECIFIED`, so unspecified already ran with `true`). All other `ABSL_FLAG` defaults keep their exact prior values. - Proto defaults: `IrConverterOptionsFlagsProto` now carries explicit non-zero defaults matching the CLI flags and `ConvertOptions` (`verify=true`, `warnings_as_errors=true`, `lower_to_proc_scoped_channels=true`, `emit_trace=true`, `emit_cover=true`, `emit_assert=true`). `dslx_stdlib_path` intentionally stays without an explicit proto default because `kDefaultDslxStdlibPath` differs across build environments. - C++ defaults: unchanged (`ConvertOptions` remains a literal/constexpr type; unit tests now assert parity with `IrConverterOptionsFlagsProto::default_instance()`). Changes: - Migrate `xls/dslx/ir_convert/ir_converter_options_flags.proto` to `edition = "2023"` with explicit `[default = true]` annotations. - Derive boolean `ABSL_FLAG` defaults in `xls/dslx/ir_convert/ir_converter_options_flags.cc` from `IrConverterOptionsFlagsProto::default_instance()`. - Simplify `lower_to_proc_scoped_channels` reading and fall back to `kDefaultDslxStdlibPath` when `dslx_stdlib_path` is unset in `xls/dslx/ir_convert/ir_converter_main.cc`. - Add parity and `--ir_converter_options_proto` fallback unit tests in `xls/dslx/ir_convert/ir_converter_options_flags_test.cc` and `xls/dslx/ir_convert/ir_converter_main_test.py`. PiperOrigin-RevId: 1029590845
Support decoupled proc state access in IR optimization passes. Several IR optimization passes assumed coupled proc state lowering, where every state element has a `StateRead` and every `Next` pairs with one. Under that assumption, `ArrayUntuplePass` and `ProcStateNarrowingPass` skipped or failed on zero-read state elements. `CanonicalizationPass` also kept always-false `StateRead`s alive, while `ConditionalSpecializationPass` intersected `StateRead` access conditions with `Next` predicates. Support zero-read state elements in `ArrayUntuplePass` and `ProcStateNarrowingPass`. Add `decouple_state_access` to `OptimizationPassOptions` and `opt_main`, defaulting to false until Codegen v1.5 scoreboarding lands. When enabled, `CanonicalizationPass` removes always-false `StateRead`s. `ConditionalSpecializationPass` also specializes `StateRead` predicates strictly from data uses, independent of pre-legalization `eliminate_noop_next` cleanup. PiperOrigin-RevId: 1028563699
Automated Code Change PiperOrigin-RevId: 1027628634
Update SelectSimplificationPass and SelectRangeSimplificationPass doc… …umentation comment. Refresh the Gemini-generated C++ header comment in `select_simplification_pass.h` for `SelectSimplificationPass` and `SelectRangeSimplificationPass` to reflect its current implementation, and regenerate the pass documentation Markdown. PiperOrigin-RevId: 1027412303
Integrate LLVM at llvm/llvm-project@86801a03ccc8 Updates LLVM usage to match [86801a03ccc8](llvm/llvm-project@86801a0) PiperOrigin-RevId: 1026858368
Integrate LLVM at llvm/llvm-project@663f3fbeea72 Updates LLVM usage to match [663f3fbeea72](llvm/llvm-project@663f3fb) PiperOrigin-RevId: 1026074645
xls/solvers: Fix Z3 HandleMulp sort-width mismatch on truncating mult… …iplies. `z3::IrTranslator::HandleMulp` previously created its symbolic `offset` constant with width `max(result_size, lhs_size, rhs_size)` even though `DoMul` always returns a bit-vector of width `result_size` (`mul->width()`). Whenever a `smulp` or `umulp` truncated to a width narrower than an operand, Z3 rejected `Z3_mk_bvsub(result, offset)` and the resulting tuple construction with a sort mismatch error. Match `offset`'s bit-vector sort width to `result_size`: * Construct `op_sort` with `result_size` in `IrTranslator::HandleMulp`. * Add `Z3IrTranslatorTest.HandlesTruncatingUMulp` and `Z3IrTranslatorTest.HandlesTruncatingSMulp` covering mixed-width truncating partial-product multiplies. PiperOrigin-RevId: 1025205428
PreviousNext