[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.
Loading
Please sign in to comment