This is an archive of the discontinued LLVM Phabricator instance.

[MC] avoid create MCFillFragment when bytes is 0
Needs ReviewPublic

Authored by yuntaopan on Mar 20 2023, 4:40 AM.

Details

Summary

In the function emitGlobalConstantFP, we may generate a
0-byte Fill Fragment, which is followed by a Data Fragment,
that will cause the next float constant to recreate a Data
Fragment and repeat,it consumes a lot of memory when the
global variable is a floating point array.

When my global variable is a floating-point array such as [1 x [3 x [12 x [32 x [32 x float]]]]], ASM printer will consume a lot of memory, and 300MB data will consume about 30GB of memory

Diff Detail

Event Timeline

yuntaopan created this revision.Mar 20 2023, 4:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 20 2023, 4:40 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
yuntaopan requested review of this revision.Mar 20 2023, 4:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 20 2023, 4:40 AM
yuntaopan edited the summary of this revision. (Show Details)Mar 20 2023, 4:46 AM