| 3fe9c3c7 | 03-Sep-2025 |
Paul Nodet <[email protected]> |
fix: accurate leaf detection (#11581)
* feat: add is_call() method to MachInst trait and VCode analysis
Add is_call() method to MachInst trait to enable accurate leaf function detection during regi
fix: accurate leaf detection (#11581)
* feat: add is_call() method to MachInst trait and VCode analysis
Add is_call() method to MachInst trait to enable accurate leaf function detection during register allocation. Update VCode compute_clobbers() to return (clobbers, is_leaf) tuple by analyzing actual call instructions in machine code.
* feat: implement is_call() method across all architectures
Implement is_call() method for all architecture-specific MachInst implementations:
- x64: Detects CallKnown, CallUnknown, ReturnCall variants, and TLS calls (ElfTlsGetAddr, MachOTlsGetAddr) - aarch64: Detects Call, CallInd, ReturnCall variants, and TLS calls (ElfTlsGetAddr, MachOTlsGetAddr) - riscv64: Detects Call, CallInd, ReturnCall variants, and ElfTlsGetAddr - s390x: Detects CallKnown, CallUnknown, ReturnCall variants - pulley: Detects Call, CallIndirect, ReturnCall variants
Co-authored-by: bjorn3 <[email protected]>
* feat: improve leaf function detection and pass is_leaf to FrameLayout
* test: add filetests for leaf detection
* test: update expected outputs for accurate leaf function detection
* test(riscv64): update filetests output
---------
Co-authored-by: bjorn3 <[email protected]>
show more ...
|