Skip to content
Unverified Commit 87b2682a authored by jeanPerier's avatar jeanPerier Committed by GitHub
Browse files

[flang][hlfir] use fir.type_info to skip runtime call if nofinal is set (#68397)

HLFIR was always calling Destroy runtime when doing derived type scalar
assignments because the IR did not contain the info of whether
finalization was needed or not.

This info is now available in fir.type_info which allow skipping the
runtime call when not needed.

Also, when finalization is needed, simply use Assign runtime. This makes
no difference from a semantic point of view with the current code that
generated a call to Destroy and did the assignment inline, but if some
piece of runtime must be called anyway, it is simpler to just call
Assign that deals with everything.
parent f47914a7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment