DADCombiner: Don't simplify the token factor if the node's number of operands already...
authorChangpeng Fang <changpeng.fang@gmail.com>
Sun, 26 Jul 2020 04:20:59 +0000 (21:20 -0700)
committerChangpeng Fang <changpeng.fang@gmail.com>
Sun, 26 Jul 2020 04:20:59 +0000 (21:20 -0700)
commit9162b70e510475a044ee98332c9cdabf094b0e9b
treed77259c82a8036fca9bbe15bde35bd5d67014a4c
parent1df8804ce57576ff0c655073df082042cdf970f6
DADCombiner: Don't simplify the token factor if the node's number of operands already exceeds TokenFactorInlineLimit

Summary:
  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.

Reviewers:
  @spatel, @arsenm

Differential Revision:
  https://reviews.llvm.org/D84204
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/AMDGPU/token-factor-inline-limit-test.ll [new file with mode: 0644]