This is an archive of the discontinued LLVM Phabricator instance.

DADCombiner: Don't simplify the token factor if the node's number of operands already exceeds TokenFactorInlineLimit

Authored by cfang on Jul 20 2020, 3:13 PM.



In parallelizeChainedStores, a TokenFactor was created with the size greater than 3000.
We found that DAGCombiner::visitTokenFactor will consume a huge amount of time on
such nodes. Since the number of operands already exceeds TokenFactorInlineLimit, we propose
to give up simplification with the consideration of compile time.

Diff Detail

Event Timeline

cfang created this revision.Jul 20 2020, 3:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 20 2020, 3:13 PM

Can you add a test with an artificially low limit? See D62633 for reference.

cfang updated this revision to Diff 280272.Jul 23 2020, 3:34 PM

Add a test. Thanks!

spatel accepted this revision.Jul 24 2020, 10:19 AM

LGTM, but I'm not familiar with the original problem, so wait a day at least to see if anyone else has comments.

This revision is now accepted and ready to land.Jul 24 2020, 10:19 AM
This revision was automatically updated to reflect the committed changes.