Sam Parker via llvm-dev
2017-Jul-25 09:48 UTC
[llvm-dev] HUGE constant expression generation
Hi, In running opt -indvars on the attached file, I see a massive constant expression being generated (I stop opt once the output file grows larger than 3GB). The example comes from a reduced version an LNT test. I've been looking into constant folding and indvar simplify to see if there's a way to limit the depth of these expressions, but I haven't figured anything out. Could anyone shine some light into how to handle these expressions? Could they be broken into multiple values? Or can we limit the complexity of constant exprs? Thanks, sam -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170725/7fc9babe/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: constant-folding.ll Type: application/octet-stream Size: 1278 bytes Desc: constant-folding.ll URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170725/7fc9babe/attachment.obj>
Friedman, Eli via llvm-dev
2017-Jul-25 18:37 UTC
[llvm-dev] HUGE constant expression generation
On 7/25/2017 2:48 AM, Sam Parker via llvm-dev wrote:> > Hi, > > > In running opt -indvars on the attached file, I see a massive constant > expression being generated (I stop opt once the output file grows > larger than 3GB). The example comes from a reduced version an LNT > test. I've been looking into constant folding and indvar simplify to > see if there's a way to limit the depth of these expressions, but I > haven't figured anything out. > > > Could anyone shine some light into how to handle these expressions? > Could they be broken into multiple values? Or can we limit the > complexity of constant exprs? >It's a known issue that printing textual IR for constant expressions which have the same operand multiple times can cause an exponential explosion in the size of the text. Other passes generally handle expressions like that without any problem, though. -Eli -- Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170725/198296c3/attachment-0001.html>