tomoaki
41d28330e9
feat(select): Task 2-E complete - VM/LLVM backend support for Select instruction
Phase 256 P1.5: Implement Select instruction (ternary conditional) across entire MIR pipeline
Task 2-E Implementation:
- Added Select ValueId entry to effects() in instruction/methods.rs (pure operation)
- Added Select case to dst_value() for definition tracking
- Added Select case to used_values() for use-def chains (cond, then_val, else_val)
- Fixed non-exhaustive pattern matches in 5 locations:
* src/mir/instruction/methods.rs: 3 match arms (effects, dst_value, used_values)
* src/mir/printer_helpers.rs: format_instruction display
* src/mir/query.rs: reads_of and writes_of MirQuery trait
- Created VM backend: src/llvm_py/instructions/select.py
* lower_select() implements ternary: dst = cond ? then_val : else_val
* Converts cond to i1 for boolean test
* Uses llvmlite builder.select() for LLVM IR generation
- Integrated Select dispatch in instruction_lower.py
* Imported lower_select module
* Added select case to instruction dispatch (after barrier, before while)
* Passes resolver, ValueIds, and CFG context
Compilation Status: ✅ 0 errors (cargo build --release succeeded)
MIR Output: ✅ Select instructions present in generated MIR
Next: Investigate SSA undefined value issue in Pattern7 loop_step
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-20 03:20:55 +09:00
..
2025-12-20 03:11:58 +09:00
2025-12-19 17:03:56 +09:00
2025-11-21 06:25:17 +09:00
2025-12-08 23:43:26 +09:00
2025-12-20 03:20:55 +09:00
2025-11-30 04:35:40 +09:00
2025-12-20 01:24:04 +09:00
2025-12-20 03:11:58 +09:00
2025-12-11 20:54:33 +09:00
2025-12-17 21:24:46 +09:00
2025-12-19 20:38:57 +09:00
2025-11-30 14:30:28 +09:00
2025-12-11 20:54:33 +09:00
2025-12-11 20:54:33 +09:00
2025-12-11 20:54:33 +09:00
2025-12-16 07:02:14 +09:00
2025-11-30 09:38:28 +09:00
2025-12-16 07:02:14 +09:00
2025-11-24 15:02:51 +09:00
2025-11-21 06:25:17 +09:00
2025-12-11 17:16:10 +09:00
2025-12-13 05:34:56 +09:00
2025-12-19 08:36:45 +09:00
2025-12-07 23:45:55 +09:00
2025-12-03 13:59:06 +09:00
2025-12-03 13:59:06 +09:00
2025-11-21 06:25:17 +09:00
2025-12-05 17:22:14 +09:00
2025-12-15 22:03:34 +09:00
2025-09-17 07:43:07 +09:00
2025-12-20 03:11:58 +09:00
2025-12-05 15:45:42 +09:00
2025-12-16 07:02:14 +09:00
2025-12-16 03:33:56 +09:00
2025-11-24 14:17:02 +09:00
2025-12-19 08:36:45 +09:00
2025-11-24 14:17:02 +09:00
2025-09-17 07:43:07 +09:00
2025-12-03 13:59:06 +09:00
2025-12-20 03:20:55 +09:00
2025-12-05 19:39:54 +09:00
2025-12-20 03:20:55 +09:00
2025-09-24 09:30:42 +09:00
2025-11-24 15:02:51 +09:00
2025-11-21 06:25:17 +09:00
2025-11-17 09:45:03 +09:00
2025-11-24 15:02:51 +09:00
2025-11-21 06:25:17 +09:00
2025-12-03 13:59:06 +09:00