Re: [PATCH 1/2] forwprop: Eliminate redundant calls to to_constant()

2025-01-15 Thread Richard Biener
On Wed, 15 Jan 2025, Christoph Müllner wrote: > When extracting the amount of vector elements, we currently > first check if the value is a contant with is_constant(), > followed by obtaining the value with to_constant(), > which internally calls is_constant() again. > We can address this by using

[PATCH 1/2] forwprop: Eliminate redundant calls to to_constant()

2025-01-15 Thread Christoph Müllner
When extracting the amount of vector elements, we currently first check if the value is a contant with is_constant(), followed by obtaining the value with to_constant(), which internally calls is_constant() again. We can address this by using is_constant (T*), which also provides the constant value