You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Never load/store fir.record and character type objects
So far, there were places where lowering was loading/stroring
fir.record type to copy them. This works, but hits LLVM limitations
when the derived type storage size is big [1].
LLVM advise against loading/storing big aggregates types here:
https://llvm.org/docs/Frontend/PerformanceTips.html#avoid-loads-and-stores-of-large-aggregate-type
but falls short of defining what is big.
Simply always copy derived types component by components when a
load/store was previously used.
Note that it was considered keeping load/stores in fir, and transforming
this to element by element copies in codegen, but it is not possible to
ensure the load/store will still be pairs after fir transformation
passes.
Hence, generalize the use of genRecordAssignment helper, and add a new
fir::factory::genScalarAssignement to centralize scalar assignment as
much as possible.
Also prevents the load/store of constant size fir.characters in places
where it was happening (array value copy) since these too are aggregate
types that can grow big.
[1] llvm mailing list question: https://lists.llvm.org/pipermail/llvm-dev/2021-November/153844.html
0 commit comments