nyash-codex
d7b8f79a75
feat(phase131): LLVM backend re-enable & PHI ordering bug discovery
Phase 131: JoinIR → LLVM individual fixes (minimal scope)
## Modifications
### 1. LLVM Backend Re-enable ✅
- Built with --features llvm to enable real LLVM execution
- Verified Python/llvmlite environment (llvmlite 0.45.1)
- Fixed llvmlite deprecated API: removed llvm.initialize() call
- Successfully moved from Mock backend to real LLVM harness execution
### 2. PHI Instruction Ordering Bug Discovery ⚠️
- Discovered critical bug: PHI nodes placed AFTER terminator instructions
- LLVM IR constraint: PHI must be at block start, before any non-PHI
- Root cause: finalize_phis() in llvm_builder.py emits PHIs after block termination
- Affects all 6 tests with control flow merges
### 3. ConsoleBox LLVM Integration ⚠️
- Confirmed ConsoleBox not registered in Rust VM environment
- Deferred to Phase 132 (prerequisite issue)
## Results
Modified files:
- src/llvm_py/llvm_builder.py: Removed deprecated llvm.initialize()
- docs/development/current/main/phase130_joinir_llvm_baseline.md: Added Phase 131 results
- CURRENT_TASK.md: Added Phase 131 completion report
Test results:
- ✅ peek_expr_block.hako: LLVM execution success (Result: 1)
- ❌ 6/7 tests: PHI ordering bug (requires Phase 132 refactoring)
## Success Criteria
- ✅ LLVM backend minimal re-enable (1/7 test passing)
- ⚠️ PHI ordering bug discovered and documented
- ⚠️ ConsoleBox integration deferred to Phase 132
## Phase 132 Handoff
Priority 1: Fix PHI instruction ordering bug (finalize_phis() refactoring)
Priority 2: Resolve ConsoleBox registration issue
Priority 3: Enable remaining test cases for LLVM
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 11:04:29 +09:00
..
2025-09-17 10:58:12 +09:00
2025-12-04 11:04:29 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-08-26 01:42:18 +09:00
2025-09-05 13:29:17 +09:00
2025-08-21 00:41:26 +09:00
2025-09-24 01:05:44 +09:00
2025-08-28 09:26:58 +09:00
2025-11-06 15:41:52 +09:00
2025-08-21 00:41:26 +09:00
2025-09-24 14:13:15 +09:00
2025-08-26 19:13:57 +09:00
2025-08-26 00:48:09 +09:00