On Fri, Sep 19, 2025 at 02:15:30PM +0100, Tvrtko Ursulin wrote:
> At the moment the TTM code has a few places which exibit sub-optimal
> patterns regarding local variable usage:
> 
>  * Having a local with some object cached but not always using it.
>  * Having a local for a single use object member access.
>  * Failed opportunities to use a local to cache a pointer.
> 
> Lets tidy this a little bit and apply some more consistency.
> 
> It is mostly for consistency and redability but I have also checked that
> there are not negative code generation effects. In fact there are more
> positives:
> 
> add/remove: 0/0 grow/shrink: 3/9 up/down: 12/-175 (-163)
> Function                                     old     new   delta
> ttm_pool_restore_and_alloc                   415     423      +8
> ttm_bo_vunmap                                147     149      +2
> ttm_bo_evict                                 521     523      +2
> ttm_bo_vm_fault_reserved                     972     970      -2
> ttm_bo_vm_dummy_page                         155     152      -3
> ttm_bo_vm_fault                              203     196      -7
> ttm_bo_populate                              158     150      -8
> ttm_bo_move_memcpy                           600     592      -8
> ttm_bo_kmap                                  667     644     -23
> ttm_bo_shrink                                333     305     -28
> ttm_bo_release                               750     720     -30
> ttm_bo_swapout_cb                            691     625     -66
> Total: Before=42717, After=42554, chg -0.38%
> 
> Signed-off-by: Tvrtko Ursulin <[email protected]>

Reviewed-by: Thadeu Lima de Souza Cascardo <[email protected]>

Reply via email to