omp: Reorder call for TARGET_SIMD_CLONE_ADJUST
commitea4a3d08f11a59319df7b750a955ac613a3f438a
authorAndre Vieira <andre.simoesdiasvieira@arm.com>
Wed, 1 Nov 2023 17:02:41 +0000 (1 17:02 +0000)
committerAndre Vieira <andre.simoesdiasvieira@arm.com>
Wed, 1 Nov 2023 17:02:41 +0000 (1 17:02 +0000)
treed62154f0ad91cfdaae30d83e07e55dc231f71f39
parent64f3a1937a2b87ebe5f3c1bf2ceec48bfbcd4ccf
omp: Reorder call for TARGET_SIMD_CLONE_ADJUST

This patch moves the call to TARGET_SIMD_CLONE_ADJUST until after the arguments
and return types have been transformed into vector types.  It also constructs
the adjuments and retval modifications after this call, allowing targets to
alter the types of the arguments and return of the clone prior to the
modifications to the function definition.

gcc/ChangeLog:

* omp-simd-clone.cc (simd_clone_adjust_return_type): Hoist out code to
create return array and don't return new type.
(simd_clone_adjust_argument_types): Hoist out code that creates
ipa_param_body_adjustments and don't return them.
(simd_clone_adjust): Call TARGET_SIMD_CLONE_ADJUST after return and
argument types have been vectorized, create adjustments and return array
after the hook.
(expand_simd_clones): Call TARGET_SIMD_CLONE_ADJUST after return and
argument types have been vectorized.
gcc/omp-simd-clone.cc